#查看数据集字段类型,表结构
dfoff.info()
#查看行数,列数
dfoff.shape
df_train_stma.head()
df_apma.dtypes
temp.shape
#筛选空值 null值
feature3 = off_train[pd.isnull(off_train['Date'])]
feature3 = off_train[pd.isnull(off_train.Date)]
feature3 = off_train[off_train.Date.isnull()]
#出现空值的某行 全部去掉
dfoff.head().dropna(subset = ['Coupon_id'])
#重置索引
#drop=True:在原有的索引列重置索引,不再另外添加新列。
#drop=False:原有的索引不变添加列名index,同时在新列上重置索引
dfoff['Date_received'] = dfoff['Date_received'].dropna().reset_index(drop = True)
pandas_表特征查看
最新推荐文章于 2023-09-20 16:57:54 发布