2.1.4 新特性 (2023年12月8日)#
以下是 pandas 2.1.4 中的更改。请参阅 发行说明 以获取包括其他 pandas 版本在内的完整更新日志。
修复的回归#
错误修复#
Series
构造函数中的错误,当index
是Series
列表时会引发DeprecationWarning
(GH 55228)Series
中的错误,当尝试将日期格式的字符串输入转换为pyarrow.timestamp
的ArrowDtype
时发生 (GH 56266)Timestamp
构造函数中的错误,当ts_input="now"
或ts_input="today"
时,其单位与Timestamp.now()
或Timestamp.today()
不同 (GH 55879)Index.__getitem__()
中的错误,在 Arrow dtypes 和负步长时返回错误结果 (GH 55832)修复了
read_csv()
中的错误,当设置infer_string
选项时,未正确遵守object dtype
(GH 56047)修复了
to_numeric()
中的错误,其会将string[pyarrow_numpy]
dtype 转换为扩展 dtype (GH 56179)修复了
DataFrameGroupBy.min()
和DataFrameGroupBy.max()
中的错误,它们未为空对象保留扩展 dtype (GH 55619)修复了
DataFrame.__setitem__()
中的错误,当设置infer_string
选项时,会将 object-dtype 的Index
转换为 PyArrow 支持的字符串 (GH 55638)修复了
DataFrame.to_hdf()
中的错误,当列具有StringDtype
时会引发异常 (GH 55088)修复了
Index.insert()
中的错误,当设置infer_string
选项时,其会将 object-dtype 转换为 PyArrow 支持的字符串 (GH 55638)修复了
Series.__ne__()
中的错误,对于dtype="string[pyarrow_numpy]"
类型,NA
与字符串值之间的比较会得到 False (GH 56122)修复了
Series.mode()
中的错误,当设置infer_string
时,其未保留 object dtype (GH 56183)修复了
Series.reset_index()
中的错误,当设置infer_string
时,其未保留 object dtype (GH 56160)修复了
Series.str.split()
和Series.str.rsplit()
中的错误,当pat=None
且使用pyarrow.string
的ArrowDtype
时 (GH 56271)修复了
Series.str.translate()
中的错误,当设置字符串选项时,其会丢失 object dtype (GH 56152)
贡献者#
共有 12 人为此版本贡献了补丁。名字旁带有“+”的人是首次贡献补丁。
Daniel Isaac
Joris Van den Bossche
Luke Manley
Lumberbot (aka Jack)
Marco Edward Gorelli
Matthew Roeschke
Pandas Development Team
Patrick Hoefler
Thomas Li
William Ayd
Yao Xiao
pre-commit-ci[bot]