【问题标题】:Pandas does not recognize NaN values on M1 macbook proPandas 无法识别 M1 macbook pro 上的 NaN 值
【发布时间】:2021-09-03 06:15:06
【问题描述】:

m1 macbook pro 上的 Pandas 无法识别 NaN 值,即使数据中显然存在 NaN 值。 The first picture shows the first 5 rows of the data, and you can apparently see that there are NaN values

In the second picture, however, when I do data.info() which prints out Non-Null count of each column, it says that there is no null values for any column

当我在 Windows 和 Linux 上运行相同的代码时(没有在没有 m1 芯片的 macbook 上尝试过),它们正确识别 NaN 值。 我已经在两个不同的 m1 芯片 macbooks 上尝试过,但结果相同。 有人遇到同样的问题吗??或者知道是什么原因造成的? 提前非常感谢。

【问题讨论】:

标签: python pandas null nan apple-m1


【解决方案1】:

试试:

data.info()

查看它们在数据框中的变量类型。我的猜测是该列中的任何内容都没有被识别为数字。

【讨论】:

  • 请看原帖中的第二张图片(蓝色和带下划线的链接)。您可以看到每一列都被识别为 dtype int64 或 float64。
猜你喜欢
  • 2022-12-21
  • 1970-01-01
  • 2023-02-17
  • 1970-01-01
  • 2021-09-08
  • 2021-12-27
  • 2023-02-20
  • 2021-04-24
  • 2021-05-04
相关资源
最近更新 更多