check if dataframe contains infinity
df.replace([np.inf, -np.inf], np.nan).dropna(subset=["col1", "col2"], how="all")
check if dataframe contains infinity
df.replace([np.inf, -np.inf], np.nan).dropna(subset=["col1", "col2"], how="all")
how to check whether a row contains a numeric value or not in df
>>> df.A.str.isnumeric()
0 True
1 NaN
2 NaN
3 True
4 NaN
5 True
6 False
7 False
Name: A, dtype: object
# df.B.str.isnumeric()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us