DOC: improve documentation for Series.resample
See original GitHub issueReference docs (see: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.resample.html):
- Add to docs the list of options that can be passed to
fill_method
. Some of which arepad
,bfill
,ffill
. – The list seems to be documented for themethod
onfillna
: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.fillna.html#pandas.DataFrame.fillna - The
convention
parameter is not well documented. It is unclear what the values ofend
orstart
means (and the associated aliases). (#15432 is dupe), PR #16965 - The
kind
parameters is also unclear. The best I could get from it was a infinite stack recursion: #5026. (https://github.com/pandas-dev/pandas/pull/19084) -
how
can also be a function or list of functions, not only a string - for the
closed
andlabel
keywords, I think it could be explained which are default in which cases (which is not always the same). In every case, thatlabel='right'
is default as stated in the docs (http://pandas.pydata.org/pandas-docs/dev/timeseries.html#up-and-downsampling) is not true. - A list of all available methods for
how
Tutorial docs:
- example using custom
how
function - example showing how to use
base
Issue Analytics
- State:
- Created 10 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
pandas.DataFrame.resample — pandas 1.5.2 documentation
Convenience method for frequency conversion and resampling of time series. The object must have a datetime-like index ( DatetimeIndex , PeriodIndex , or ......
Read more >pandas resample documentation - Stack Overflow
See the timeseries documentation. It includes a list of offsets (and 'anchored' offsets), and a section about resampling.
Read more >Using the Pandas “Resample” Function - Towards Data Science
This article is an introductory dive into the technical aspects of the pandas resample function for datetime manipulation.
Read more >Resampling — Dataiku DSS 11 documentation
The resampling recipe transforms time series data occurring in irregular time intervals into equispaced data. The recipe is also useful for transforming ...
Read more >How To Resample and Interpolate Your Time Series Data ...
In this tutorial, you will discover how to use Pandas in Python to both increase and decrease the sampling frequency of time series...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FWIW: By default resample uses start timestamp convention (i.e. closed=‘left’ and label=‘left’), except for weekly, monthly, quarter and annual resolution, where the default is end timestamp convention (i.e. closed=‘right’ and label=‘right’, in other words the week, month, quarter or year is represented by its last day). The code doing that is here: https://github.com/pandas-dev/pandas/blob/v0.19.2/pandas/tseries/resample.py#L983-L997.
As of 0.19.2, the incorrect documentation about
label='right'
is to be found in the comment of code input [245] on http://pandas-docs.github.io/pandas-docs-travis/timeseries.html#basics.Since the
resample
API has changed since the original issue has been posted. I think most of the original points have been addressed:how
is no longer relevant (bfill and ffill are separate methods)We can open up individual issues for any remaining improvements documentation.