pd df check if nan is present in enery columen of a row code example
Example 1: to detect if a data frame has nan values
> df.isnull().any().any()
True
Example 2: pandas if nan, then the row above
df.fillna(method='ffill')
> df.isnull().any().any()
True
df.fillna(method='ffill')