I have a data frame that I want to separate into bins and assign each bin the median value of the values in that bin.
POA Egrid
200 1.17
205 0.63
275 1.08
325 1.22
350 0.57
The result should look like
POA Egrid
(200,300) Median of (1.17,0.63,1.08)
(300,400) Median of (1.22,0.57)
I tried to write 2 loops, but could not figure out the median part.