Skip to content

Commit f6e85f1

Browse files
author
MarcoGorelli
committed
some more fixups
1 parent 9cef4b5 commit f6e85f1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

pandas/tests/resample/test_datetime_index.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -1114,21 +1114,17 @@ def test_monthly_resample_error(unit):
11141114
ts.resample("M")
11151115

11161116

1117-
def test_nanosecond_resample_error(unit):
1117+
def test_nanosecond_resample_error():
11181118
# GH 12307 - Values falls after last bin when
11191119
# Resampling using pd.tseries.offsets.Nano as period
11201120
start = 1443707890427
11211121
exp_start = 1443707890400
1122-
indx = date_range(start=pd.to_datetime(start), periods=10, freq="100n").as_unit(
1123-
unit
1124-
)
1122+
indx = date_range(start=pd.to_datetime(start), periods=10, freq="100n")
11251123
ts = Series(range(len(indx)), index=indx)
11261124
r = ts.resample(pd.tseries.offsets.Nano(100))
11271125
result = r.agg("mean")
11281126

1129-
exp_indx = date_range(
1130-
start=pd.to_datetime(exp_start), periods=10, freq="100n"
1131-
).as_unit(unit)
1127+
exp_indx = date_range(start=pd.to_datetime(exp_start), periods=10, freq="100n")
11321128
exp = Series(range(len(exp_indx)), index=exp_indx, dtype=float)
11331129

11341130
tm.assert_series_equal(result, exp)

0 commit comments

Comments
 (0)