1
  1. I have a Dataframe with 15992 indexes.

  2. I would like to loop over the dataset and take the sum of cells that falls within 999 to 1000.

  3. And if the sum falls into this range, group them accordingly.

  4. Take its Range, sum, count of range, mean, max, min to a new dataframe.

I'm really new at using Pandas, I don't know if it's possible. Please kindly have a look at the images below.

Thank you

Frame Offset FrameTime
1 13.423
2 11.764
3 12.243
5 12.508
... ...
1995 49.559
1996 58.300
1997 56.943
1998 37.577
1999 57.111

Name: FrameTime, Length: 15992, dtype: float64

Here's are the process I would like to automat; enter image description here

Here's what it should look like; enter image description here

  • How can the sum of FrameTime be 1000 when the lowest value seems to be 13.423? – Yannis P. Aug 14 '21 at 15:41
  • 3
    I would suggest that you edit your post and the data you have processed manually in Excel so that we try to see what you mean. Please also see [how to produce a minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), for you questions at StackOverflow. – Yannis P. Aug 14 '21 at 16:17
  • i think this [link](https://stackoverflow.com/questions/34317149/pandas-groupby-with-bin-counts) will be useful here – woblob Aug 15 '21 at 16:49

0 Answers0