I have a dataframe with a column filled with floats. I want to add a column which computes the median from the first row to the current row. I do no want to compute a rolling median but the median with all the inforamtion known ar each step.
Advertisement
Answer
You can check with expanding
df['your col'].expanding().median()