解决问题:假设一个df有销量这一列,而这列的数据类型是str,现在要把这列数据类型从 str 转换为 int df["销量"] = df["销量"].astype(int) # 将销量列数据类型转换为int