Skip to content

Update solution 02_Filtering_&_Sorting/Chipotle/Exercises_with_solutions.ipynb/Question 5 #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
673 changes: 63 additions & 610 deletions 02_Filtering_&_Sorting/Chipotle/Exercises_with_solutions.ipynb
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -44,7 +44,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -756,666 +756,119 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>order_id</th>\n",
" <th>quantity</th>\n",
" <th>item_name</th>\n",
" <th>choice_description</th>\n",
" <th>item_price</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa (Mild), [Rice, Cheese, Sou...</td>\n",
" <td>10.98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>7</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Fajita Vegetables, Rice,...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Red Chili Salsa, [Fajita Vegetables...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>13</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa (Medium), [Pinto Bea...</td>\n",
" <td>8.49</td>\n",
" </tr>\n",
" <tr>\n",
" <th>42</th>\n",
" <td>20</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Rice, Black Beans,...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>76</th>\n",
" <td>34</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Pinto...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>78</th>\n",
" <td>34</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Chees...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>44</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Red Chili Salsa, [Rice, Fajita Vege...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>110</th>\n",
" <td>49</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Red Chili Salsa, [Rice, Black Beans...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>123</th>\n",
" <td>54</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Guacamole, Cheese, Sour ...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>138</th>\n",
" <td>62</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Fajita Vegetables,...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>140</th>\n",
" <td>63</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Green Chili Salsa, [Rice, Sour Crea...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>142</th>\n",
" <td>64</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Fajita Vegetables, Rice,...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>160</th>\n",
" <td>73</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa (Mild), [Black Beans, Rice...</td>\n",
" <td>8.49</td>\n",
" </tr>\n",
" <tr>\n",
" <th>176</th>\n",
" <td>79</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa (Medium), [Black Bea...</td>\n",
" <td>10.98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>182</th>\n",
" <td>82</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Sour ...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>193</th>\n",
" <td>86</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Cheese, Sour Cream]]</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199</th>\n",
" <td>89</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[[Roasted Chili Corn Salsa (Medium), Tomatillo...</td>\n",
" <td>10.98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>206</th>\n",
" <td>92</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Cheese, Lettuce]]</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>209</th>\n",
" <td>93</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Fajita Vegetables,...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>211</th>\n",
" <td>93</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Fajita Vegetables,...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>218</th>\n",
" <td>96</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Green Chili Salsa, [Rice, Black Bea...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>220</th>\n",
" <td>97</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Rice, Black Beans,...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>224</th>\n",
" <td>98</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Green Chili Salsa, [Rice, Pinto Bea...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>231</th>\n",
" <td>102</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Fajita Vegetables, Rice,...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>252</th>\n",
" <td>110</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Red Chili Salsa, [Rice, Cheese, Let...</td>\n",
" <td>8.75</td>\n",
" <th>0</th>\n",
" <td>Chips and Fresh Tomato Salsa</td>\n",
" <td>$2.39</td>\n",
" </tr>\n",
" <tr>\n",
" <th>257</th>\n",
" <td>111</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Cheese]]</td>\n",
" <td>8.75</td>\n",
" <th>1</th>\n",
" <td>Izze</td>\n",
" <td>$3.39</td>\n",
" </tr>\n",
" <tr>\n",
" <th>284</th>\n",
" <td>124</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Cheese, Sour Cream]]</td>\n",
" <td>8.75</td>\n",
" <th>2</th>\n",
" <td>Nantucket Nectar</td>\n",
" <td>$3.39</td>\n",
" </tr>\n",
" <tr>\n",
" <th>290</th>\n",
" <td>126</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Fajita Vegetables,...</td>\n",
" <td>11.25</td>\n",
" <th>3</th>\n",
" <td>Chips and Tomatillo-Green Chili Salsa</td>\n",
" <td>$2.39</td>\n",
" </tr>\n",
" <tr>\n",
" <th>291</th>\n",
" <td>127</td>\n",
" <td>1</td>\n",
" <th>4</th>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Green Chili Salsa, [Rice, Sour Crea...</td>\n",
" <td>11.25</td>\n",
" <td>$16.98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4443</th>\n",
" <td>1771</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Green Chili Salsa, [Rice, Pinto Bea...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4444</th>\n",
" <td>1771</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Sour ...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4465</th>\n",
" <td>1779</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Cheese]]</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4481</th>\n",
" <td>1786</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, Rice]</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4483</th>\n",
" <td>1786</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Pinto Beans, Chees...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4484</th>\n",
" <td>1786</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Fajita Vegetables, Rice,...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4486</th>\n",
" <td>1786</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Chees...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4488</th>\n",
" <td>1786</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Fajita Vegetables, Rice,...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4495</th>\n",
" <td>1788</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Pinto Beans, Sour ...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4498</th>\n",
" <td>1789</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Green Chili Salsa, [Fajita Vegetabl...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4506</th>\n",
" <td>1792</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Cheese, Sour Cream...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4511</th>\n",
" <td>1794</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Rice, Fajita Veget...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4532</th>\n",
" <td>1802</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Rice, Black Beans,...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4537</th>\n",
" <td>1804</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Chees...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4540</th>\n",
" <td>1805</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Green Chili Salsa, [Fajita Vegetabl...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4553</th>\n",
" <td>1810</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Black Beans, Sour ...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4555</th>\n",
" <td>1811</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Fajita Vegetables,...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4564</th>\n",
" <td>1815</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Fajita Vegetables, Rice,...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4574</th>\n",
" <td>1819</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Rice, Cheese, Lett...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4576</th>\n",
" <td>1820</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Cheese, Sour Cream...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4581</th>\n",
" <td>1822</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Red Chili Salsa, [Rice, Black Beans...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4583</th>\n",
" <td>1823</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Green Chili Salsa, [Rice, Black Bea...</td>\n",
" <td>8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4586</th>\n",
" <td>1824</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Chees...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4587</th>\n",
" <td>1824</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Chees...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4589</th>\n",
" <td>1825</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Sour ...</td>\n",
" <td>11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4590</th>\n",
" <td>1825</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Rice, Black Beans,...</td>\n",
" <td>11.25</td>\n",
" <th>4617</th>\n",
" <td>Steak Burrito</td>\n",
" <td>$11.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4591</th>\n",
" <td>1825</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Red Chili Salsa, [Rice, Black Beans...</td>\n",
" <td>8.75</td>\n",
" <th>4618</th>\n",
" <td>Steak Burrito</td>\n",
" <td>$11.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4595</th>\n",
" <td>1826</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Tomatillo Green Chili Salsa, [Rice, Black Bea...</td>\n",
" <td>8.75</td>\n",
" <th>4619</th>\n",
" <td>Chicken Salad Bowl</td>\n",
" <td>$11.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4599</th>\n",
" <td>1827</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Roasted Chili Corn Salsa, [Cheese, Lettuce]]</td>\n",
" <td>8.75</td>\n",
" <th>4620</th>\n",
" <td>Chicken Salad Bowl</td>\n",
" <td>$8.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4604</th>\n",
" <td>1828</td>\n",
" <td>1</td>\n",
" <td>Chicken Bowl</td>\n",
" <td>[Fresh Tomato Salsa, [Rice, Black Beans, Chees...</td>\n",
" <td>8.75</td>\n",
" <th>4621</th>\n",
" <td>Chicken Salad Bowl</td>\n",
" <td>$8.75</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>693 rows × 5 columns</p>\n",
"<p>4622 rows × 2 columns</p>\n",
"</div>"
],
"text/plain": [
" order_id quantity item_name \\\n",
"5 3 1 Chicken Bowl \n",
"13 7 1 Chicken Bowl \n",
"19 10 1 Chicken Bowl \n",
"26 13 1 Chicken Bowl \n",
"42 20 1 Chicken Bowl \n",
"76 34 1 Chicken Bowl \n",
"78 34 1 Chicken Bowl \n",
"99 44 1 Chicken Bowl \n",
"110 49 1 Chicken Bowl \n",
"123 54 1 Chicken Bowl \n",
"138 62 1 Chicken Bowl \n",
"140 63 1 Chicken Bowl \n",
"142 64 1 Chicken Bowl \n",
"160 73 1 Chicken Bowl \n",
"176 79 1 Chicken Bowl \n",
"182 82 1 Chicken Bowl \n",
"193 86 1 Chicken Bowl \n",
"199 89 1 Chicken Bowl \n",
"206 92 1 Chicken Bowl \n",
"209 93 1 Chicken Bowl \n",
"211 93 1 Chicken Bowl \n",
"218 96 1 Chicken Bowl \n",
"220 97 1 Chicken Bowl \n",
"224 98 1 Chicken Bowl \n",
"231 102 1 Chicken Bowl \n",
"252 110 1 Chicken Bowl \n",
"257 111 1 Chicken Bowl \n",
"284 124 1 Chicken Bowl \n",
"290 126 1 Chicken Bowl \n",
"291 127 1 Chicken Bowl \n",
"... ... ... ... \n",
"4443 1771 1 Chicken Bowl \n",
"4444 1771 1 Chicken Bowl \n",
"4465 1779 1 Chicken Bowl \n",
"4481 1786 1 Chicken Bowl \n",
"4483 1786 1 Chicken Bowl \n",
"4484 1786 1 Chicken Bowl \n",
"4486 1786 1 Chicken Bowl \n",
"4488 1786 1 Chicken Bowl \n",
"4495 1788 1 Chicken Bowl \n",
"4498 1789 1 Chicken Bowl \n",
"4506 1792 1 Chicken Bowl \n",
"4511 1794 1 Chicken Bowl \n",
"4532 1802 1 Chicken Bowl \n",
"4537 1804 1 Chicken Bowl \n",
"4540 1805 1 Chicken Bowl \n",
"4553 1810 1 Chicken Bowl \n",
"4555 1811 1 Chicken Bowl \n",
"4564 1815 1 Chicken Bowl \n",
"4574 1819 1 Chicken Bowl \n",
"4576 1820 1 Chicken Bowl \n",
"4581 1822 1 Chicken Bowl \n",
"4583 1823 1 Chicken Bowl \n",
"4586 1824 1 Chicken Bowl \n",
"4587 1824 1 Chicken Bowl \n",
"4589 1825 1 Chicken Bowl \n",
"4590 1825 1 Chicken Bowl \n",
"4591 1825 1 Chicken Bowl \n",
"4595 1826 1 Chicken Bowl \n",
"4599 1827 1 Chicken Bowl \n",
"4604 1828 1 Chicken Bowl \n",
" item_name item_price\n",
"0 Chips and Fresh Tomato Salsa $2.39 \n",
"1 Izze $3.39 \n",
"2 Nantucket Nectar $3.39 \n",
"3 Chips and Tomatillo-Green Chili Salsa $2.39 \n",
"4 Chicken Bowl $16.98 \n",
"... ... ...\n",
"4617 Steak Burrito $11.75 \n",
"4618 Steak Burrito $11.75 \n",
"4619 Chicken Salad Bowl $11.25 \n",
"4620 Chicken Salad Bowl $8.75 \n",
"4621 Chicken Salad Bowl $8.75 \n",
"\n",
" choice_description item_price \n",
"5 [Fresh Tomato Salsa (Mild), [Rice, Cheese, Sou... 10.98 \n",
"13 [Fresh Tomato Salsa, [Fajita Vegetables, Rice,... 11.25 \n",
"19 [Tomatillo Red Chili Salsa, [Fajita Vegetables... 8.75 \n",
"26 [Roasted Chili Corn Salsa (Medium), [Pinto Bea... 8.49 \n",
"42 [Roasted Chili Corn Salsa, [Rice, Black Beans,... 11.25 \n",
"76 [Fresh Tomato Salsa, [Rice, Black Beans, Pinto... 8.75 \n",
"78 [Fresh Tomato Salsa, [Rice, Black Beans, Chees... 8.75 \n",
"99 [Tomatillo Red Chili Salsa, [Rice, Fajita Vege... 8.75 \n",
"110 [Tomatillo Red Chili Salsa, [Rice, Black Beans... 8.75 \n",
"123 [Fresh Tomato Salsa, [Guacamole, Cheese, Sour ... 11.25 \n",
"138 [Fresh Tomato Salsa, [Rice, Fajita Vegetables,... 11.25 \n",
"140 [Tomatillo Green Chili Salsa, [Rice, Sour Crea... 11.25 \n",
"142 [Fresh Tomato Salsa, [Fajita Vegetables, Rice,... 11.25 \n",
"160 [Fresh Tomato Salsa (Mild), [Black Beans, Rice... 8.49 \n",
"176 [Roasted Chili Corn Salsa (Medium), [Black Bea... 10.98 \n",
"182 [Fresh Tomato Salsa, [Rice, Black Beans, Sour ... 8.75 \n",
"193 [Fresh Tomato Salsa, [Rice, Cheese, Sour Cream]] 8.75 \n",
"199 [[Roasted Chili Corn Salsa (Medium), Tomatillo... 10.98 \n",
"206 [Fresh Tomato Salsa, [Rice, Cheese, Lettuce]] 8.75 \n",
"209 [Roasted Chili Corn Salsa, [Fajita Vegetables,... 11.25 \n",
"211 [Roasted Chili Corn Salsa, [Fajita Vegetables,... 11.25 \n",
"218 [Tomatillo Green Chili Salsa, [Rice, Black Bea... 8.75 \n",
"220 [Roasted Chili Corn Salsa, [Rice, Black Beans,... 8.75 \n",
"224 [Tomatillo Green Chili Salsa, [Rice, Pinto Bea... 8.75 \n",
"231 [Fresh Tomato Salsa, [Fajita Vegetables, Rice,... 8.75 \n",
"252 [Tomatillo Red Chili Salsa, [Rice, Cheese, Let... 8.75 \n",
"257 [Fresh Tomato Salsa, [Rice, Black Beans, Cheese]] 8.75 \n",
"284 [Fresh Tomato Salsa, [Rice, Cheese, Sour Cream]] 8.75 \n",
"290 [Roasted Chili Corn Salsa, [Fajita Vegetables,... 11.25 \n",
"291 [Tomatillo Green Chili Salsa, [Rice, Sour Crea... 11.25 \n",
"... ... ... \n",
"4443 [Tomatillo Green Chili Salsa, [Rice, Pinto Bea... 8.75 \n",
"4444 [Fresh Tomato Salsa, [Rice, Black Beans, Sour ... 8.75 \n",
"4465 [Fresh Tomato Salsa, [Rice, Black Beans, Cheese]] 8.75 \n",
"4481 [Fresh Tomato Salsa, Rice] 8.75 \n",
"4483 [Fresh Tomato Salsa, [Rice, Pinto Beans, Chees... 11.25 \n",
"4484 [Fresh Tomato Salsa, [Fajita Vegetables, Rice,... 11.25 \n",
"4486 [Fresh Tomato Salsa, [Rice, Black Beans, Chees... 11.25 \n",
"4488 [Fresh Tomato Salsa, [Fajita Vegetables, Rice,... 8.75 \n",
"4495 [Fresh Tomato Salsa, [Rice, Pinto Beans, Sour ... 11.25 \n",
"4498 [Tomatillo Green Chili Salsa, [Fajita Vegetabl... 11.25 \n",
"4506 [Fresh Tomato Salsa, [Rice, Cheese, Sour Cream... 11.25 \n",
"4511 [Roasted Chili Corn Salsa, [Rice, Fajita Veget... 8.75 \n",
"4532 [Roasted Chili Corn Salsa, [Rice, Black Beans,... 8.75 \n",
"4537 [Fresh Tomato Salsa, [Rice, Black Beans, Chees... 8.75 \n",
"4540 [Tomatillo Green Chili Salsa, [Fajita Vegetabl... 11.25 \n",
"4553 [Roasted Chili Corn Salsa, [Black Beans, Sour ... 11.25 \n",
"4555 [Roasted Chili Corn Salsa, [Fajita Vegetables,... 8.75 \n",
"4564 [Fresh Tomato Salsa, [Fajita Vegetables, Rice,... 11.25 \n",
"4574 [Roasted Chili Corn Salsa, [Rice, Cheese, Lett... 8.75 \n",
"4576 [Fresh Tomato Salsa, [Rice, Cheese, Sour Cream... 11.25 \n",
"4581 [Tomatillo Red Chili Salsa, [Rice, Black Beans... 8.75 \n",
"4583 [Tomatillo Green Chili Salsa, [Rice, Black Bea... 8.75 \n",
"4586 [Fresh Tomato Salsa, [Rice, Black Beans, Chees... 11.25 \n",
"4587 [Fresh Tomato Salsa, [Rice, Black Beans, Chees... 11.25 \n",
"4589 [Fresh Tomato Salsa, [Rice, Black Beans, Sour ... 11.25 \n",
"4590 [Roasted Chili Corn Salsa, [Rice, Black Beans,... 11.25 \n",
"4591 [Tomatillo Red Chili Salsa, [Rice, Black Beans... 8.75 \n",
"4595 [Tomatillo Green Chili Salsa, [Rice, Black Bea... 8.75 \n",
"4599 [Roasted Chili Corn Salsa, [Cheese, Lettuce]] 8.75 \n",
"4604 [Fresh Tomato Salsa, [Rice, Black Beans, Chees... 8.75 \n",
"\n",
"[693 rows x 5 columns]"
"[4622 rows x 2 columns]"
]
},
"execution_count": 25,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# delete the duplicates in item_name and quantity\n",
"# chipo_filtered = chipo.drop_duplicates(['item_name','quantity'])\n",
"chipo[(chipo['item_name'] == 'Chicken Bowl') & (chipo['quantity'] == 1)]\n",
"\n",
"# select only the products with quantity equals to 1\n",
"# chipo_one_prod = chipo_filtered[chipo_filtered.quantity == 1]\n",
"\n",
"# select only the item_name and item_price columns\n",
"# price_per_item = chipo_one_prod[['item_name', 'item_price']]\n",
"\n",
"# sort the values from the most to less expensive\n",
"# price_per_item.sort_values(by = \"item_price\", ascending = False).head(20)"
"chipo.loc[:, [\"item_name\", \"item_price\"]]"
]
},
{
@@ -2200,7 +1653,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@@ -2214,7 +1667,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.9.7"
},
"toc": {
"base_numbering": 1,