From 20ce83ee0749aa86a4eb6d6d3faa3d3d502dee96 Mon Sep 17 00:00:00 2001 From: IVDOT80 Date: Sun, 2 Nov 2025 15:52:01 +0330 Subject: [PATCH 1/2] Fixing 01> Chipotle> Step 9 --- .../Chipotle/Exercise_with_Solutions.ipynb | 65 +++++++++++++------ 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/01_Getting_&_Knowing_Your_Data/Chipotle/Exercise_with_Solutions.ipynb b/01_Getting_&_Knowing_Your_Data/Chipotle/Exercise_with_Solutions.ipynb index 162700786..9f49b6781 100644 --- a/01_Getting_&_Knowing_Your_Data/Chipotle/Exercise_with_Solutions.ipynb +++ b/01_Getting_&_Knowing_Your_Data/Chipotle/Exercise_with_Solutions.ipynb @@ -77,6 +77,19 @@ "data": { "text/html": [ "
\n", + "\n", "\n", " \n", " \n", @@ -253,13 +266,15 @@ "\n", "RangeIndex: 4622 entries, 0 to 4621\n", "Data columns (total 5 columns):\n", - "order_id 4622 non-null int64\n", - "quantity 4622 non-null int64\n", - "item_name 4622 non-null object\n", - "choice_description 3376 non-null object\n", - "item_price 4622 non-null object\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 order_id 4622 non-null int64 \n", + " 1 quantity 4622 non-null int64 \n", + " 2 item_name 4622 non-null object\n", + " 3 choice_description 3376 non-null object\n", + " 4 item_price 4622 non-null object\n", "dtypes: int64(2), object(3)\n", - "memory usage: 180.6+ KB\n" + "memory usage: 180.7+ KB\n" ] } ], @@ -315,8 +330,8 @@ { "data": { "text/plain": [ - "Index([u'order_id', u'quantity', u'item_name', u'choice_description',\n", - " u'item_price'],\n", + "Index(['order_id', 'quantity', 'item_name', 'choice_description',\n", + " 'item_price'],\n", " dtype='object')" ] }, @@ -376,23 +391,33 @@ "data": { "text/html": [ "
\n", + "\n", "
\n", " \n", " \n", " \n", - " \n", " \n", " \n", " \n", " \n", " \n", - " \n", " \n", " \n", " \n", " \n", " \n", - " \n", " \n", " \n", " \n", @@ -400,9 +425,9 @@ "" ], "text/plain": [ - " order_id quantity\n", - "item_name \n", - "Chicken Bowl 713926 761" + " quantity\n", + "item_name \n", + "Chicken Bowl 761" ] }, "execution_count": 9, @@ -411,7 +436,7 @@ } ], "source": [ - "c = chipo.groupby('item_name')\n", + "c = chipo[['item_name','quantity']].groupby('item_name')\n", "c = c.sum()\n", "c = c.sort_values(['quantity'], ascending=False)\n", "c.head(1)" @@ -797,21 +822,21 @@ "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [default]", + "display_name": "mo_aval", "language": "python", - "name": "python2" + "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.12" + "pygments_lexer": "ipython3", + "version": "3.12.4" } }, "nbformat": 4, From d485cfd75ad2338cb0309feb9c9e8cd4e5ddf4ed Mon Sep 17 00:00:00 2001 From: IVDOT80 Date: Sun, 2 Nov 2025 15:57:28 +0330 Subject: [PATCH 2/2] Fixing 01> Chipotle> Step 10 --- .../Chipotle/Exercise_with_Solutions.ipynb | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/01_Getting_&_Knowing_Your_Data/Chipotle/Exercise_with_Solutions.ipynb b/01_Getting_&_Knowing_Your_Data/Chipotle/Exercise_with_Solutions.ipynb index 9f49b6781..43085d95a 100644 --- a/01_Getting_&_Knowing_Your_Data/Chipotle/Exercise_with_Solutions.ipynb +++ b/01_Getting_&_Knowing_Your_Data/Chipotle/Exercise_with_Solutions.ipynb @@ -460,23 +460,33 @@ "data": { "text/html": [ "
\n", + "\n", "
order_idquantity
item_name
Chicken Bowl713926761
\n", " \n", " \n", " \n", - " \n", " \n", " \n", " \n", " \n", " \n", - " \n", " \n", " \n", " \n", " \n", " \n", - " \n", " \n", " \n", " \n", @@ -484,9 +494,9 @@ "" ], "text/plain": [ - " order_id quantity\n", - "item_name \n", - "Chicken Bowl 713926 761" + " quantity\n", + "item_name \n", + "Chicken Bowl 761" ] }, "execution_count": 10, @@ -495,7 +505,7 @@ } ], "source": [ - "c = chipo.groupby('item_name')\n", + "c = chipo[['item_name','quantity']].groupby('item_name')\n", "c = c.sum()\n", "c = c.sort_values(['quantity'], ascending=False)\n", "c.head(1)"
order_idquantity
item_name
Chicken Bowl713926761