AllenDowney / ThinkStats2

Text and supporting code for Think Stats, 2nd Edition
http://allendowney.github.io/ThinkStats2/
GNU General Public License v3.0
4.03k stars 11.31k forks source link

Remove SettingWithCopyWarning from thinkstats2.py #13

Closed henrystokeley closed 8 years ago

henrystokeley commented 9 years ago

Fix SettingWithCopyWarning given by thinkstats2.py by using df.loc[b, a] rather than chain indexing df[a][b] as documented at: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

AllenDowney commented 9 years ago

Thank you. I just pushed a commit with this change and an additional test.