Skip to content

Commit 3336023

Browse files
authored
Merge pull request guipsamora#23 from gsireesh/master
Fixed average per order to use revenue
2 parents 6426408 + cf50145 commit 3336023

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

01_Getting_&_Knowing_Your_Data/Chipotle/Exercise_with_Solutions.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@
646646
{
647647
"data": {
648648
"text/plain": [
649-
"18.811428571428689"
649+
"21.394231"
650650
]
651651
},
652652
"execution_count": 4,
@@ -655,8 +655,10 @@
655655
}
656656
],
657657
"source": [
658+
"chipo['revenue'] = chipo['quantity']* chipo['item_price']\n",
658659
"order_grouped = chipo.groupby(by=['order_id']).sum()\n",
659-
"order_grouped.mean()['item_price']\n",
660+
"order_grouped.mean()['revenue']\n",
661+
"\n",
660662
"\n",
661663
"# Or \n",
662664
"\n",

01_Getting_&_Knowing_Your_Data/Chipotle/Solutions.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@
596596
{
597597
"data": {
598598
"text/plain": [
599-
"18.811428571428689"
599+
"21.394231"
600600
]
601601
},
602602
"execution_count": 4,

0 commit comments

Comments
 (0)