weecology / macroecotools

Tools for Macroecological Analyses Using Python
Other
9 stars 13 forks source link

Allow counting of records to work for series as well as dataframes #12

Closed ethanwhite closed 10 years ago

ethanwhite commented 10 years ago

abundance_in_group was failing when the lack of an abundance column resulted in trying to use .count() on a Series instead of a Dataframe. This replaces that call with .size() which works on both.

It also removes an unnecessary slicing to remove columns that should never exist.

Fixes #10.