Skip to content

Commit 3bf207a

Browse files
committed
Changed variable names and dataframe orders
1 parent 1774b08 commit 3bf207a

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

02_Filtering_&_Sorting/Chipotle/Exercises_with_solutions.ipynb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
{
2121
"cell_type": "code",
22-
"execution_count": 3,
22+
"execution_count": 1,
2323
"metadata": {
2424
"collapsed": false
2525
},
@@ -44,7 +44,7 @@
4444
},
4545
{
4646
"cell_type": "code",
47-
"execution_count": 4,
47+
"execution_count": 3,
4848
"metadata": {
4949
"collapsed": false
5050
},
@@ -64,7 +64,7 @@
6464
},
6565
{
6666
"cell_type": "code",
67-
"execution_count": 168,
67+
"execution_count": 4,
6868
"metadata": {
6969
"collapsed": false
7070
},
@@ -75,7 +75,7 @@
7575
"1130"
7676
]
7777
},
78-
"execution_count": 168,
78+
"execution_count": 4,
7979
"metadata": {},
8080
"output_type": "execute_result"
8181
}
@@ -104,7 +104,7 @@
104104
},
105105
{
106106
"cell_type": "code",
107-
"execution_count": 176,
107+
"execution_count": 9,
108108
"metadata": {
109109
"collapsed": false
110110
},
@@ -430,7 +430,7 @@
430430
"34 Bottled Water 1.09"
431431
]
432432
},
433-
"execution_count": 176,
433+
"execution_count": 9,
434434
"metadata": {},
435435
"output_type": "execute_result"
436436
}
@@ -439,11 +439,11 @@
439439
"# delete the duplicates in item_name and quantity\n",
440440
"chipo_filtered = chipo.drop_duplicates(['item_name','quantity'])\n",
441441
"\n",
442-
"# select only the ones with quantity equals to 1\n",
443-
"price_per_item = chipo_filtered[chipo_filtered.quantity == 1]\n",
442+
"# select only the products with quantity equals to 1\n",
443+
"chipo_one_prod = chipo_filtered[chipo_filtered.quantity == 1]\n",
444444
"\n",
445-
"#\n",
446-
"price_per_item = chipo_end[['item_name', 'item_price']]\n",
445+
"# select only the item_name and item_price columns\n",
446+
"price_per_item = chipo_one_prod[['item_name', 'item_price']]\n",
447447
"\n",
448448
"# sort the values from the most to less expensive\n",
449449
"price_per_item.sort_values(by = \"item_price\", ascending = False)"
@@ -665,8 +665,9 @@
665665
}
666666
],
667667
"metadata": {
668+
"anaconda-cloud": {},
668669
"kernelspec": {
669-
"display_name": "Python 2",
670+
"display_name": "Python [default]",
670671
"language": "python",
671672
"name": "python2"
672673
},
@@ -680,7 +681,7 @@
680681
"name": "python",
681682
"nbconvert_exporter": "python",
682683
"pygments_lexer": "ipython2",
683-
"version": "2.7.11"
684+
"version": "2.7.12"
684685
}
685686
},
686687
"nbformat": 4,

0 commit comments

Comments
 (0)