Resample has an base
argument which covers this case:
ts.resample(rule="24H", closed='left', label="left", base=17).sum()
Output:
2012-01-01 17:00:00 24
2012-01-02 17:00:00 24
2012-01-03 17:00:00 12
Freq: 24H
More Related Contents:
- How to change the order of DataFrame columns?
- Split pandas dataframe based on groupby
- Add missing dates to pandas dataframe
- pandas loc vs. iloc vs. at vs. iat?
- Pandas: sum DataFrame rows for given columns
- How to drop rows from pandas data frame that contains a particular string in a particular column? [duplicate]
- Find the end of the month of a Pandas DataFrame Series
- Vectorised Haversine formula with a pandas dataframe
- Read a small random sample from a big CSV file into a Python data frame
- How to concatenate two dataframes without duplicates?
- Most efficient way to forward-fill NaN values in numpy array
- Python Pandas replicate rows in dataframe
- Efficiently create sparse pivot tables in pandas?
- How to remove or hide x-axis labels from a seaborn / matplotlib plot
- Computing np.diff in Pandas after using groupby leads to unexpected result
- Remove NaN ‘Cells’ without dropping the entire ROW (Pandas,Python3)
- Large Dataset Polynomial Fitting Using Numpy
- Pandas converting row with unix timestamp (in milliseconds) to datetime
- Cumsum as a new column in an existing Pandas dataframe
- Deleting multiple columns based on column names
- Number rows within group in increasing order in a pandas dataframe
- Plot a bar plot from a Pandas DataFrame
- Difference between pivot and pivot_table. Why is only pivot_table working?
- Get part of day (morning, afternoon, evening, night) in Python dataframe
- Using replace efficiently in pandas
- Extract dictionary value from column in data frame
- Read data (.dat file) with Pandas
- Pandas: remove duplicates that exist in any order
- Difference between df[x], df[[x]], df[‘x’] , df[[‘x’]] and df.x
- Numpy.dtype has the wrong size, try recompiling