Skip to content

Commit c8844e0

Browse files
committed
CLN: PEP8 (whitespace fixes)
1 parent 46d12c2 commit c8844e0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pandas/core/groupby.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3568,7 +3568,8 @@ def first_non_None_value(values):
35683568
# as we are stacking can easily have object dtypes here
35693569
so = self._selected_obj
35703570
if (so.ndim == 2 and so.dtypes.apply(is_datetimelike).any()):
3571-
result = result.apply(lambda x: pd.to_numeric(x, errors='ignore'))
3571+
result = result.apply(
3572+
lambda x: pd.to_numeric(x, errors='ignore'))
35723573
date_cols = self._selected_obj.select_dtypes(
35733574
include=['datetime', 'timedelta']).columns
35743575
date_cols = date_cols.intersection(result.columns)

pandas/tests/groupby/test_groupby.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -4316,12 +4316,15 @@ def test_cummin_cummax(self):
43164316

43174317
def test_numeric_coercion(self):
43184318
# GH 14423
4319-
df = pd.DataFrame({'Number' : [1, 2], 'Date' : ["2017-03-02"] * 2, 'Str' : ["foo", "inf"]})
4319+
df = pd.DataFrame({'Number': [1, 2],
4320+
'Date': ["2017-03-02"] * 2,
4321+
'Str': ["foo", "inf"]})
43204322
expected = df.groupby(['Number']).apply(lambda x: x.iloc[0])
43214323
df.Date = pd.to_datetime(df.Date)
43224324
result = df.groupby(['Number']).apply(lambda x: x.iloc[0])
43234325
tm.assert_series_equal(result['Str'], expected['Str'])
4324-
4326+
4327+
43254328
def _check_groupby(df, result, keys, field, f=lambda x: x.sum()):
43264329
tups = lmap(tuple, df[keys].values)
43274330
tups = com._asarray_tuplesafe(tups)

0 commit comments

Comments
 (0)