Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
无法从熊猫数据框中删除空值
df = df.replace(r'^\s*$', np.NaN, regex=True) df = df.dropna(axis="columns", how="any") print(df)[![enter image description here][1]][1]