Skip to content

Commit

Permalink
TST: Fix tests which used tuples to pass multiple keys
Browse files Browse the repository at this point in the history
  • Loading branch information
toobaz committed Nov 13, 2017
1 parent 201a4fe commit 74f91e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pandas/tests/groupby/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def test_len(self):
df = pd.DataFrame(dict(a=[np.nan] * 3, b=[1, 2, 3]))
assert len(df.groupby(('a'))) == 0
assert len(df.groupby(('b'))) == 3
assert len(df.groupby(('a', 'b'))) == 3
assert len(df.groupby(['a', 'b'])) == 3

def test_basic_regression(self):
# regression
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/groupby/test_nth.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def test_nth(self):
freq='B')
df = DataFrame(1, index=business_dates, columns=['a', 'b'])
# get the first, fourth and last two business days for each month
key = (df.index.year, df.index.month)
key = [df.index.year, df.index.month]
result = df.groupby(key, as_index=False).nth([0, 3, -2, -1])
expected_dates = pd.to_datetime(
['2014/4/1', '2014/4/4', '2014/4/29', '2014/4/30', '2014/5/1',
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/groupby/test_value_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def seed_df(seed_nans, n, m):

df = seed_df(seed_nans, n, m)
bins = None, np.arange(0, max(5, df['3rd'].max()) + 1, 2)
keys = '1st', '2nd', ('1st', '2nd')
keys = '1st', '2nd', ['1st', '2nd']
for k, b in product(keys, bins):
binned.append((df, k, b, n, m))
ids.append("{}-{}-{}".format(k, n, m))
Expand Down

0 comments on commit 74f91e0

Please sign in to comment.