diff --git a/ml2/3_3_Data_Munging_with_Pandas.ipynb b/ml2/3_3_Data_Munging_with_Pandas.ipynb index 5467e85..1ecd01d 100644 --- a/ml2/3_3_Data_Munging_with_Pandas.ipynb +++ b/ml2/3_3_Data_Munging_with_Pandas.ipynb @@ -373,8 +373,8 @@ "source": [ "#Mean age of passengers per Passenger class\n", "\n", - "#First we calculate the mean\n", - "df.groupby('Pclass').mean()" + "#First we calculate the mean for the numeric columns\n", + "df.select_dtypes(np.number).groupby('Pclass').mean()" ] }, {