how to find if a df column has infinity code example
Example: check if dataframe contains infinity
df.replace([np.inf, -np.inf], np.nan).dropna(subset=["col1", "col2"], how="all")
df.replace([np.inf, -np.inf], np.nan).dropna(subset=["col1", "col2"], how="all")