tell me the best way to divide the dataframes by first column?

We need to do the ffill NaN

d = {x : y for x , y in df.groupby(df.Id.mask(df.Id.eq('')).ffill())}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top