We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 535175e commit 1faed20Copy full SHA for 1faed20
1 file changed
episodes/02-starting-with-data.md
@@ -750,11 +750,14 @@ total_count.plot(kind='bar');
750
751
::::::::::::::::::::::: solution
752
753
-1. `surveys_df.groupby('plot_id').mean()["weight"].plot(kind='bar')`
+1.
754
+`surveys_df.groupby('plot_id').mean(numeric_only='True')['weight'].plot(kind='bar')`
755
+Or
756
+`surveys_df.groupby('plot_id')['weight'].mean().plot(kind='bar')`
757
758
{alt='average weight across all species for each plot'}
759
-2. `surveys_df.groupby('sex').count()["record_id"].plot(kind='bar')`
760
+2. `surveys_df.groupby('sex').count()['record_id'].plot(kind='bar')`
761
762
{alt='total males versus total females for the entire dataset'}
763
0 commit comments