1 year ago

#359203

test-img

Rif

How to reorg data without loops

I have a dataframe with three columns: ID, x_coordinate, y_coordinate. Each ID appears as many times as many coordinates are available, which vary from ID to ID. I am planning to do bin averaging and outlier removal for each ID. At the end I would like to have a dataframe with one row for each ID and the final avg_x_coordinate and avg_y_coordinate.

What data structure and transformation would you recommend to go with? Ideally, without loops. (The binning I am planning to do with 2dhistograms.)

dataframe

structure

transformation

0 Answers

Your Answer

Accepted video resources