1.5.3 版本有什么新内容 (2023 年 1 月 18 日)#
这些是 pandas 1.5.3 中的更改。有关包含其他 pandas 版本的完整变更日志,请参阅 发布说明。
修复的回归#
修复了
Series.isin()在values为空时的性能回归 (GH 49839)修复了
DataFrame.memory_usage()在DataFrame为空时显示不必要的FutureWarning的回归 (GH 50066)修复了
DataFrameGroupBy.transform()在与as_index=False一起使用时的回归 (GH 49834)在函数
DataFrame.plot.scatter()中强制将color作为c的别名,将size作为s的别名 (GH 49732)修复了
SeriesGroupBy.apply()在结果是DataFrame时为结果设置name属性的回归 (GH 49907)修复了
to_datetime()在解析包含np.nan的float数组时引发ValueError的回归 (GH 50237)
Bug 修复#
Copy-on-Write 实现中,使用另一个
DataFrame索引DataFrame时丢失视图跟踪的 bug (GH 50630)在
Styler.to_excel()中,当为 Excel 写入器提供未识别的border-style(例如"hair") 时导致错误的 bug (GH 48649)在
Series.quantile()中,当Series仅包含NA值时,发出 NumPy 警告的 bug (GH 50681)链式调用多个
Styler.concat()调用时出现 bug,只有最后一个 styler 被连接 (GH 49207)修复了在 Python 3.11 上实例化继承自
typing.Generic的DataFrame子类时触发UserWarning的 bug (GH 49649)在
pivot_table()中,当DataFrame的列包含嵌套元素时,与 NumPy 1.24 或更高版本一起使用的 bug (GH 50342)在
pandas.testing.assert_series_equal()(以及等效的assert_函数) 中,在包含嵌套数据并使用 numpy >= 1.25 时出现的 bug (GH 50360)
其他#
注意
如果您在使用 SQLAlchemy 1.4.46 或更高版本时,使用 DataFrame.to_sql(), read_sql(), read_sql_table(), 或 read_sql_query(),您可能会看到一个 sqlalchemy.exc.RemovedIn20Warning。这些警告对于 SQLAlchemy 1.4.x 版本可以安全地忽略,因为 pandas 正在努力兼容 SQLAlchemy 2.0。
恢复了
Series.__getitem__()和Series.__setitem__()使用整数Index进行切片的行为的弃用 (GH 45324);该行为将保持为位置切片 (GH 49612)使用
DataFrame.loc()或DataFrame.iloc()原地设置值时引发的FutureWarning已更改为DeprecationWarning(GH 48673)
贡献者#
共有 19 人为此版本贡献了补丁。名字旁边带有“+”的人是首次贡献补丁。
Emma Carballal Haire +
Irv Lustig
JHM Darbyshire
Joris Van den Bossche
Marc Garcia
Marco Edward Gorelli
MarcoGorelli
Matthew Roeschke
MeeseeksMachine
Natalia Mokeeva
Pandas Development Team
Patrick Hoefler
Richard Shadrach
Tsvika Shapira +
William Ayd
aneesh98
jakirkham +
jbrockmendel
silviaovo +