Questions tagged [resample]
70 questions
0
votes
1 answer
How to resample seconds to milliseconds and then interpolate values in python
I have the following second-resolution dataframe:
timestamp value
------------------------------------------
0 2015-02-21 03:42:35+00:00 45
1 2015-02-21 03:42:36+00:00 46
2 2015-02-21 03:42:37+00:00 …

LostinSpatialAnalysis
- 565
- 5
- 22
0
votes
1 answer
Resample index issue
When I resample dataframe I get key error on the index col.
Here is my code:
if setting == 'resample':
Freq_r = "60Min" #Min
df1 = df1.set_index('date')
df1 = df1.resample(Freq_r).agg({'open': 'first', 'high': 'max','low': 'min',…

Night Cheetah
- 11
- 2
0
votes
1 answer
Resample sales data by day - now unable to use polyfit - Python
I have a dataframe of data with sales like this:-
sales_df
Date Sales
01/04/2020 00:03 1
01/04/2020 02:26 4
01/05/2020 02:28 3
01/05/2020 05:09 5
01/06/2020 05:16 6
01/06/2020 05:17 7
01/07/2020 05:18 3
which looks…

Ellen Coggin
- 27
- 4
0
votes
1 answer
Resampling doesn't work on the first data
I tried to convert yearly data to monthly, starting from 2001 to 2020,
however 2001 data was not converted to monthly.
The original dataset looks like:
0 2001-12-31 16.5648 4.9887 11.1706 ... 6.4568 7.9525 7.7998 11.2796
1 2002-12-31 …

Puckpicker
- 13
- 5
0
votes
1 answer
How to resample partially overlapping rasters using terra package in R?
I have three partially overlapping DEM rasters with different origins, resolutions (only slightly different) and extents. I know I need to use terra's resample function rather than merge or aggregate because of the different origins, etc., but I'm…

ia200
- 255
- 1
- 9
0
votes
1 answer
pandas dataframe.resample with two result(last() and sum())
I have a csv file of stock prices, and it has been read into a dataframe with the pd.read_csv method, and its format is as follows:
Time Price Volume
2020/1/1 9:46 7.15 1000
2020/1/1 9:46 7.15 600
2020/1/1 9:46 7.14 1000
2020/1/1…

Sun Jar
- 91
- 9
0
votes
1 answer
Audio resampling layer for tensorflow
It is required to resample audio signals within a custom model structure. This resampling task is not a kind of pre/post-processing operation that can be developed out of the model. In other words, this resampling is a section of model's internal…

ir0098
- 127
- 1
- 13
-1
votes
1 answer
How to handle discrete times with df.resample?
Trading hours are from 9:00 to 10:15, from 10:30 to 11:15, from 11:15 to 11:30, from 13:30 to 15:00
The 30-minute K-line time in the trading software is as follows:
9:00 to 9:30, 9:30 to 10:00, 10:00 to 10:45, 10:45 to 11:15, 11:15 to 13:15, 13:15…

July
- 143
- 7
-1
votes
1 answer
pandas daframe compute covarince weekly
I have this dataframe
np.random.seed(0)
start_d = '2018-01-01 00:00:00'
start_d = pd.to_datetime(start_d,format='%Y-%m-%d %H:%M:%S')
end_d = '2018-01-28 00:00:00'
end_d = pd.to_datetime(end_d,format='%Y-%m-%d %H:%M:%S')
index =…

diedro
- 511
- 1
- 3
- 15
-1
votes
1 answer
Pandas resample function adds dates that were not in the Dataframe
I have a January 2019 Dataframe with a lot of data.
in the photo the data -only january- is grouped -using .loc function- by Ciclo_Estacion_Retiro==…

JorgeChiles
- 1
- 1