python values the preceding row value

Try this:

df['Status'] = df['Status'].where(df['Status'].str.len().gt(5)).fillna(method='ffill')

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top