TomAugspurger / effective-pandas

Source code for my collection of articles on using pandas.
https://leanpub.com/effective-pandas
Creative Commons Attribution 4.0 International
1.54k stars 383 forks source link

chapter4_tidy_data variable versus rest plot gives some empty plots #28

Open bhishanpdl opened 5 years ago

bhishanpdl commented 5 years ago

These all tutorial are superbly great, and the author has put lots of efforts on them. The code might have been running excellent on 2016 but now (at 2019 Feb), some of the codes of chapter_4_tidy_data fails.

Issue 1

example:

g = sns.FacetGrid(tidy, col='team', col_wrap=6, hue='team', size=2)
g.map(sns.barplot, 'variable', 'rest');

Gives: imagur link

Issue 2

rest.unstack()
        .query('away_team < 7')
        .rolling(7)
        .mean()

Gives all NANS and plot fails.

and so on.