I have a dataframe containing counts over time periods (rainfall in periods of 3 hours), something like this: I need to upsample the dataframe into time periods of 1 hour and I would like to average out the counts for the rain, so that there are no NaNs and the total sum of rain remains the same, means this is
Tag: resampling
resample/interpolate time series with datetimeindex
I have two dataframes each containing one or more time series from the same time frame but sampled at different timestamps. I’d like to merge them into a single one resampled and interpolated with the index of the first. Here’s a sample of the first dataframe: And the second one: In this case the second one is more granular but
Pandas: Resample dataframe column, get discrete feature that corresponds to max value
Sample data: gives: I want to resample by ‘2D’ and get the max value, something like: The expected result should be: Can anyone help me? Answer You can resample to get the arg max of value and then use it to extract names and value