I tried using resampling. However, it's showing some error.
I tried using resampling. However, it's showing some error.
The 'resample' method should be used like this. See the pandas docs https://pandas.pydata.org/pandas-docs/version/0.18/generated/pandas.DataFrame.resample.html
closes_15_min = pricing.resample("15T").last()
The above takes the last value every 15 minutes. One can apply different resampling functions such as mean or median too.
Hello! I have been trying to resample data as there are multiple columns in my DataFrame I had to use something like this. Anyways the link definitely helped as a trigger. Thank you
prices = pricing.resample('3T').agg({'open_price': 'first',
'high': 'max',
'low': 'min',
'close_price': 'last',
'volume' : 'sum'}). head()