drop nan row and change index code example
Example 1: drop if nan in column pandas
df = df[df['EPS'].notna()]
Example 2: how to replace nan with 0 in pandas
df['product']=df['product'].fillna(0)
df['context']=df['context'].fillna(0)
df
df = df[df['EPS'].notna()]
df['product']=df['product'].fillna(0)
df['context']=df['context'].fillna(0)
df