I did some calculation and have #DIV/0! in my dataframe. How to drop these values and count further ? I followed df.dropna but dataframe still counting #DIV/0!. Please suggest.
df.insert(loc=df.columns.get_loc('A')+1 , column = 'new', value=(abs(df['A'] - df['B'])/df['B'] * 100))
df = df.dropna()
df.reset_index(drop=True)
print(len(df.index))