标签:import nbsp image dataframe img imp ram info inf
import pandas as pd
import numpy as np
date = pd.date_range(‘20191231‘, periods=6)
df = pd.DataFrame(np.arange(24).reshape(6,4), index=date, columns=[‘A‘,‘B‘,‘C‘,‘D‘])
df.iloc[0,1] = np.nan
df.iloc[1,2] = np.nan
print(df)
print(df.dropna(axis=0, how=‘any‘))
print(df.dropna(axis=1, how=‘any‘))
print(df.dropna(axis=0, how=‘all‘))
print(df.dropna(axis=1, how=‘all‘))
标签:import nbsp image dataframe img imp ram info inf
原文地址:https://www.cnblogs.com/wddqy/p/12125655.html