df.dtypes
Pandas 为 DataFrame 中的每一列分配适当的数据类型。...df.drop
如果要删除数据帧中的某一列,可以这样:
df = pd.DataFrame([[1, 2, "A"],
[5, 8, "B"],...: int64
19、数据帧过滤-按标签选择 df.loc
在基于标签的选择中,要求的每个标签都必须在 DataFrame 的索引中。...out put ##########
Maths 6
Science 5
English 10
Name: John, dtype: int64
21、数据帧中对某一列去重...col2", "col3"])
df["col3"].unique()
######## out put ##########
array(['A', 'B'], dtype=object)
22、数据帧中获取某一列去重后的个数