File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1114,21 +1114,17 @@ def test_monthly_resample_error(unit):
1114
1114
ts .resample ("M" )
1115
1115
1116
1116
1117
- def test_nanosecond_resample_error (unit ):
1117
+ def test_nanosecond_resample_error ():
1118
1118
# GH 12307 - Values falls after last bin when
1119
1119
# Resampling using pd.tseries.offsets.Nano as period
1120
1120
start = 1443707890427
1121
1121
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" )
1125
1123
ts = Series (range (len (indx )), index = indx )
1126
1124
r = ts .resample (pd .tseries .offsets .Nano (100 ))
1127
1125
result = r .agg ("mean" )
1128
1126
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" )
1132
1128
exp = Series (range (len (exp_indx )), index = exp_indx , dtype = float )
1133
1129
1134
1130
tm .assert_series_equal (result , exp )
You can’t perform that action at this time.
0 commit comments