import pandas as pd df = pd.read_excel('第 (5)组.xlsx') rows_with_nan = df.index[df.isna().any(axis=1)] print(len(df)) print("Rows with NaN values:") print(rows_with_nan)
python检索excel空值
最新推荐文章于 2023-12-09 09:23:11 发布
import pandas as pd df = pd.read_excel('第 (5)组.xlsx') rows_with_nan = df.index[df.isna().any(axis=1)] print(len(df)) print("Rows with NaN values:") print(rows_with_nan)