You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> > for filename in glob.glob('data/gapminder_gdp*.csv'):
> > dataframe = pd.read_csv(filename)
> > # extract <region> from the filename, expected to be in the format 'data/gapminder_gdp_<region>.csv'.
> > # we will split the string using the split method and `_` as our separator,
> > # retrieve the last string in the list that split returns (`<region>.csv`),
> > # and then remove the `.csv` extension from that string.
> > region = filename.split('_')[-1][:-4]
> > dataframe.mean().plot(ax=ax, label=region)
FutureWarning: Dropping of nuisance columns in DataFrame reductions (with 'numeric_only=None') is deprecated; in a future version this will raise TypeError. Select only valid columns before calling the reduction.
The problem is in line 176, and the quickest fix is simply to flip the toggle the other way:
But this is a bit of extra cognitive load. Should we just tell learners about this in advance, or is there an alternative solution that avoids the issue? Or should the task itself be adjusted?
The text was updated successfully, but these errors were encountered:
As of Pandas 1.3.0 (July 2, 2021), the solution to "Comparing Data" in episode 14 throws the same warning several times.
python-novice-gapminder/_episodes/14-looping-data-sets.md
Lines 169 to 176 in f675de6
The problem is in line 176, and the quickest fix is simply to flip the toggle the other way:
But this is a bit of extra cognitive load. Should we just tell learners about this in advance, or is there an alternative solution that avoids the issue? Or should the task itself be adjusted?
The text was updated successfully, but these errors were encountered: