【发布时间】:2019-09-24 21:02:32
【问题描述】:
我正在尝试执行代码,但出现错误。
import pandas as pd
import numpy as np
pd.Series([1, 2, np.nan, 4], dtype=pd.Int64Dtype())
我希望输出为:
Out[14]:
0 1
1 2
2 NaN
3 4
dtype: Int64
【问题讨论】:
-
你的熊猫版本是什么?因为在 pandas 0.24.2 中运行良好。
-
可以确认它在 0.23.4 中损坏并在 0.24.2 中工作。
标签: python-3.x pandas numpy