I have a dataset that has about 30,000 samples. Here's how the dataset looks like:
X Y Z Magnitude CoordinateID
-17.34 29.519999 -20.520000 27.942548 0
-17.40 29.279999 -20.220000 27.751907 0
x1000 similar rows
-16.14 29.880000 -22.920000 29.078961 10
-19.619 29.099998 -22.140000 30.550350 22
x1000 similar Rows and so on
I want to get an average of first 100 samples (of each rows in columns X, Y, Z and Magnitude) then the next 100 samples and so on and store the results into a new dataframe. How to implement this?
EDIT: I also need CoordinateID to be a part of my new dataframe. Like lets suppose the first 1000 rows have coordinateID with 0, other 1000 rows have 1 as their coordinateID, so how can I maintain that in my new dataframe?