Skip to content

Tag: pandas

Drop first nan rows in multiple columns

I have the below df: I want to structure the data so the first NaN rows are deleted by column. Resuling df: I’m essentially trying to shift the column data up by n rows depending on where the data starts for that column, so at the first rows of ID there is always data in at least 1 of the