stencila / py

Stencila for Python
Apache License 2.0
17 stars 1 forks source link

Error handling mean() on a column in a Pandas data frame #26

Open apawlik opened 6 years ago

apawlik commented 6 years ago

Rather mysterious - the gif below explains it all (rather than lengthy typing)

mystery_round_py

Yes, I know that casting it as a pd.DataFrame is unnecessary HOWEVER during the workshop the following did not work either, no matter what I did with #2 line. The only way out of it was to do the modification above (which technically is not the way to do it but that was the work-around I found).

animals_wg = surveys_py.I
animals_wg.mean()