0

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.

Ahmet
  • 7,527
  • 3
  • 23
  • 47
  • 2
    Sounds 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

0 Answers0