kieferk / dfply

dplyr-style piping operations for pandas dataframes
GNU General Public License v3.0
889 stars 103 forks source link

Pandas throwing FutureWarnings on group_by #62

Closed andrewkho closed 5 years ago

andrewkho commented 5 years ago

Pandas is constantly throwing warnings like this and it makes the group_by unusable in my case, since it swamps all other console output.

.../python3.6/site-packages/dfply/base.py:307: FutureWarning: Interpreting tuple 'by' as a list of keys, rather than a single key. Use 'by=[...]' instead of 'by=(...)'. In the future, a tuple will always mean a single key.

When Pandas makes this change it will break the group_by so it's probably worth fixing now.

I think the way around this is to wrap the RHS with a list(args) here.

andrewkho commented 5 years ago

I have a working version on my fork, it passes all unittests (One of the tests needed to be fixed), I will submit a PR

andrewkho commented 5 years ago

PR #63

kieferk commented 5 years ago

Thank you - will merge this now.