Skip to content

Commit

Permalink
Update group to store a list, preventing pandas from throwing FutureW…
Browse files Browse the repository at this point in the history
…arnings on group_by
  • Loading branch information
Andrew Ho committed Aug 17, 2018
1 parent f80460e commit c606c5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dfply/group.py
Expand Up @@ -4,7 +4,7 @@
@pipe
@symbolic_evaluation(eval_as_label=True)
def group_by(df, *args):
df._grouped_by = args
df._grouped_by = list(args)
return df


Expand Down
2 changes: 1 addition & 1 deletion test/test_group.py
Expand Up @@ -10,4 +10,4 @@
def test_group_attributes():
d = diamonds >> group_by('cut')
assert hasattr(d, '_grouped_by')
assert d._grouped_by == ('cut',)
assert d._grouped_by == ['cut',]

0 comments on commit c606c5c

Please sign in to comment.