1.2.2中的新特性(2021年2月9日)#
这些是Pandas1.2.2中的变化。看见 发行说明 获取完整的更改日志,包括其他版本的Pandas。
固定回归#
修复了中的回归问题
read_excel()这导致它抬高了AttributeError检查较旧xlrd版本的版本时 (GH38955 )Fixed regression in
DataFrameconstructor reordering element when construction from datetime ndarray with dtype not"datetime64[ns]"(GH39422)修复了中的回归问题
DataFrame.astype()和Series.astype()未强制转换为字节数据类型 (GH39474 )Fixed regression in
to_pickle()failing to create bz2/xz compressed pickle files withprotocol=5(GH39002)修复了中的回归问题
pandas.testing.assert_series_equal()和pandas.testing.assert_frame_equal()总是在提高AssertionError比较扩展数据类型时 (GH39410 )Fixed regression in
to_csv()openingcodecs.StreamWriterin binary mode instead of in text mode and ignoring user-providedmode(GH39247)修复了中的回归问题
Categorical.astype()在以下情况下转换为错误的数据类型np.int32传递给dtype参数 (GH39402 )修复了中的回归问题
to_excel()追加时创建损坏的文件 (mode="a")复制到现有文件 (GH39576 )修复了中的回归问题
DataFrame.transform()在DataFrame或Series为空的情况下失败 (GH39636 )修复了中的回归问题
groupby()或resample()聚合全NaN或数字对象dtype列时 (GH39329 )修复了中的回归问题
Rolling.count()其中min_periods参数将设置为0手术后 (GH39554 )修复了中的回归问题
read_excel()错误地提出了当争论io是非路径和非缓冲区,并且engine参数已指定 (GH39528 )
错误修复#
pandas.read_excel()当指定的sheetname不存在,现在引擎之间是统一的 (GH39250 )修复了中的错误
pandas.read_excel()当发动机出现错误结果时openpyxl并且Excel文件丢失或具有不正确的维度信息;修复需要openpyxl>=3.0.0,以前的版本仍有可能失败 (GH38956 , GH39001 )修复了中的错误
pandas.read_excel()有时会产生一种DataFrame尾随着一排排np.nan当发动机开动时openpyxlvt.使用 (GH39181 )
贡献者#
共有14人为此次发布贡献了补丁。名字中带有“+”的人第一次贡献了一个补丁。
Andrew Wieteska
Erfan Nariman
Joris Van den Bossche
Matthew Roeschke
MeeseeksMachine
Pandas Development Team
Pav A
Richard Shadrach
Simon Hawkins
Thomas Li
Torsten Wörtwein
Vladimir Podolskiy +
jbrockmendel
patrick