For example , I have a "datetime" column and "Volume of shares transacted" column. I would like to resample the data everytime a million shares are transacted based on an integer or float datatype column (which is NOT datetime column), "Volume of shares transacted" . I am using Pandas data frame for this.
Can I resample based on a column which is different from datetime index column in a pandas dataframe
Asked
Active
Viewed 32 times
0
-
2Sounds like you want some sort of cumulative sum among rows that resets after a threshold is reached to get the groups? It's a complicated problem, but https://stackoverflow.com/questions/56904390/restart-cumsum-and-get-index-if-cumsum-more-than-value should be useful. – ALollz Aug 19 '20 at 19:35
-
What do you mean by "resample"? Are you trying to split the df? – RichieV Aug 19 '20 at 20:20