Skip to content

Commit c316a00

Browse files
committed
Revert "ENH pandas-dev#3715 specify arguments to _upsample"
This reverts commit b9ffc14.
1 parent 2b33a9e commit c316a00

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

pandas/core/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4083,7 +4083,7 @@ def asfreq(self, freq, method=None, how=None, normalize=False,
40834083
Value to use for missing values, applied during upsampling (note
40844084
this does not fill NaNs that already were present).
40854085
4086-
.. versionadded:: 0.20.0
4086+
.. version added:: 0.20.0
40874087
40884088
Returns
40894089
-------

pandas/tseries/resample.py

+5-18
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def transform(self, arg, *args, **kwargs):
352352
def _downsample(self, f):
353353
raise AbstractMethodError(self)
354354

355-
def _upsample(self, f, limit=None, fill_value=None):
355+
def _upsample(self, f, limit=None):
356356
raise AbstractMethodError(self)
357357

358358
def _gotitem(self, key, ndim, subset=None):
@@ -499,21 +499,12 @@ def interpolate(self, method='linear', axis=0, limit=None, inplace=False,
499499
limit_direction=limit_direction,
500500
downcast=downcast, **kwargs)
501501

502-
def asfreq(self, fill_value=None):
502+
def asfreq(self, **kwargs):
503503
"""
504504
return the values at the new freq,
505-
essentially a reindex
506-
507-
Parameters
508-
----------
509-
fill_value: scalar, optional
510-
Value to use for missing values, applied during upsampling (note
511-
this does not fill NaNs that already were present).
512-
513-
.. versionadded:: 0.20.0
514-
505+
essentially a reindex with (no filling)
515506
"""
516-
return self._upsample('asfreq', fill_value=fill_value)
507+
return self._upsample('asfreq', **kwargs)
517508

518509
def std(self, ddof=1, *args, **kwargs):
519510
"""
@@ -719,8 +710,6 @@ def _upsample(self, method, limit=None, fill_value=None):
719710
'ffill', 'asfreq'} method for upsampling
720711
limit : int, default None
721712
Maximum size gap to fill when reindexing
722-
fill_value : scalar, default None
723-
Value to use for missing values
724713
725714
See also
726715
--------
@@ -866,14 +855,12 @@ def _downsample(self, how, **kwargs):
866855
'Frequency {} cannot be resampled to {}, as they are not '
867856
'sub or super periods'.format(ax.freq, self.freq))
868857

869-
def _upsample(self, method, limit=None, fill_value=None):
858+
def _upsample(self, method, limit=None):
870859
"""
871860
method : string {'backfill', 'bfill', 'pad', 'ffill'}
872861
method for upsampling
873862
limit : int, default None
874863
Maximum size gap to fill when reindexing
875-
fill_value : scalar, default None
876-
Value to use for missing values
877864
878865
See also
879866
--------

0 commit comments

Comments
 (0)