Skip to content

Commit e8f181c

Browse files
committed
TST: indent (pandas-dev#7002)
1 parent cfdbcf0 commit e8f181c

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

pandas/tests/groupby/test_apply.py

+12-8
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import pytest
66

77
import pandas as pd
8-
import pandas._testing as tm
98
from pandas import DataFrame, Index, MultiIndex, Series, bdate_range
9+
import pandas._testing as tm
1010

1111

1212
def test_apply_issues():
@@ -65,8 +65,8 @@ def test_apply_trivial():
6565

6666
@pytest.mark.xfail(
6767
reason="GH#20066; function passed into apply "
68-
"returns a DataFrame with the same index "
69-
"as the one to create GroupBy object."
68+
"returns a DataFrame with the same index "
69+
"as the one to create GroupBy object."
7070
)
7171
def test_apply_trivial_fail():
7272
# GH 20066
@@ -965,9 +965,13 @@ def fn(x):
965965

966966
def test_apply_function_with_indexing_return_column():
967967
# GH: 7002
968-
df = DataFrame({'foo1': ['one', 'two', 'two', 'three', 'one', 'two'],
969-
'foo2': np.random.randn(6)})
970-
result = df.groupby('foo1', as_index=False).apply(lambda x: x.mean())
971-
expected = df.groupby('foo1', as_index=False).mean()
968+
df = DataFrame(
969+
{
970+
"foo1": ["one", "two", "two", "three", "one", "two"],
971+
"foo2": np.random.randn(6),
972+
}
973+
)
974+
result = df.groupby("foo1", as_index=False).apply(lambda x: x.mean())
975+
expected = df.groupby("foo1", as_index=False).mean()
972976
tm.assert_frame_equal(result, expected)
973-
assert 'foo1' in result.columns
977+
assert "foo1" in result.columns

0 commit comments

Comments
 (0)