File tree Expand file tree Collapse file tree 1 file changed +28
-16
lines changed
01_Getting_&_Knowing_Your_Data/Chipotle Expand file tree Collapse file tree 1 file changed +28
-16
lines changed Original file line number Diff line number Diff line change 686686 },
687687 {
688688 "cell_type" : " code" ,
689- "execution_count" : 140 ,
690- "metadata" : {
691- "collapsed" : false
692- },
689+ "execution_count" : 15 ,
690+ "metadata" : {},
693691 "outputs" : [
694692 {
695693 "data" : {
696694 "text/plain" : [
697- " 21.394231 "
695+ " 18.81142857142869 "
698696 ]
699697 },
700- "execution_count" : 4 ,
698+ "execution_count" : 15 ,
701699 "metadata" : {},
702700 "output_type" : " execute_result"
703701 }
704702 ],
705703 "source" : [
706704 " chipo['revenue'] = chipo['quantity']* chipo['item_price']\n " ,
707705 " order_grouped = chipo.groupby(by=['order_id']).sum()\n " ,
708- " order_grouped.mean()['revenue']\n " ,
709- " \n " ,
710- " \n " ,
706+ " order_grouped.mean()['item_price']"
707+ ]
708+ },
709+ {
710+ "cell_type" : " code" ,
711+ "execution_count" : 16 ,
712+ "metadata" : {},
713+ "outputs" : [
714+ {
715+ "data" : {
716+ "text/plain" : [
717+ " 18.81142857142869"
718+ ]
719+ },
720+ "execution_count" : 16 ,
721+ "metadata" : {},
722+ "output_type" : " execute_result"
723+ }
724+ ],
725+ "source" : [
711726 " # Or \n " ,
712- " \n " ,
713- " #chipo.groupby(by=['order_id']).sum().mean()['item_price']"
727+ " chipo.groupby(by=['order_id']).sum().mean()['item_price']"
714728 ]
715729 },
716730 {
722736 },
723737 {
724738 "cell_type" : " code" ,
725- "execution_count" : 148 ,
726- "metadata" : {
727- "collapsed" : false
728- },
739+ "execution_count" : 17 ,
740+ "metadata" : {},
729741 "outputs" : [
730742 {
731743 "data" : {
732744 "text/plain" : [
733745 " 50"
734746 ]
735747 },
736- "execution_count" : 148 ,
748+ "execution_count" : 17 ,
737749 "metadata" : {},
738750 "output_type" : " execute_result"
739751 }
You can’t perform that action at this time.
0 commit comments