0
点赞
收藏
分享

微信扫一扫

kaggle笔记 【1】binary classification with the Spaceship Titanic dataset

唯米天空 2022-04-13 阅读 29
python

pandas.DataFrame.isna().sum()
#to caculate the NA values

pandas.DataFrame.duplicated().sum()
#to caculate the repeated values.

numpy.around(a, decimals=0, out=None)
#四舍五入

DataFrame.nunique(axis=0, dropna=True)
#计算指定轴中不同元素的数量,可以选择是否计算NaN的数量

plt.figure(figsize=(7,7))
#指定要画的图大小为7*7

pandas.DataFrame.value_counts()
#统计相同的行个数
#df-->>
#        num_legs  num_wings
#falcon         2          2
#dog            4          0
#cat            4          0
#ant            6          0
#df.value_counts() -->>
#num_legs  num_wings
#4         0            2
#2         2            1
#6         0            1
#dtype: int64


举报

相关推荐

0 条评论