1.1.2 (2020 年 9 月 8 日) 更新内容#

这些是 pandas 1.1.2 中的更改。有关包含其他 pandas 版本的完整更新日志,请参阅发布说明

已修复的回归问题#

  • DatetimeIndex.intersection() 中的回归问题,在与列表求交集时错误地引发 AssertionError (GH 35876)

  • 修复了原地更新列(例如使用 df['col'].fillna(.., inplace=True))时的回归问题 (GH 35731)

  • 修复了 DataFrame.append() 混合时区感知和时区无关的日期时间列时的回归问题 (GH 35460)

  • RangeIndex.format() 的性能回归 (GH 35712)

  • 回归问题:当传入空列表时,MultiIndex.get_loc() 会返回一个跨越整个索引的切片 (GH 35878)

  • 修复了索引操作后缓存无效的回归问题;这在设置不更新数据时可能出现 (GH 35521)

  • DataFrame.replace() 中的回归问题,在尝试替换 Interval 类型元素时会引发 TypeError (GH 35931)

  • 修复了 IntervalIndexclosed 属性在 pickle 往返过程中的回归问题 (GH 35658)

  • 修复了 DataFrameGroupBy.agg() 中的回归问题,当底层数组为只读时会引发 ValueError: buffer source array is read-only (GH 36014)

  • 修复了 Series.groupby.rolling() 中的回归问题,输入中 MultiIndex 的级别数被压缩为一级 (GH 36018)

  • 修复了在空 DataFrame 上使用 DataFrameGroupBy 时的回归问题 (GH 36197)

错误修复#

  • DataFrame.eval() 中的 Bug,涉及 object dtype 列的二进制操作 (GH 35794)

  • Series 构造函数中的 Bug,在构造稀疏 datetime64 数据类型时引发 TypeError (GH 35762)

  • DataFrame.apply() 中的 Bug,当 `result_type="reduce"` 时返回了不正确的索引 (GH 35683)

  • Series.astype()DataFrame.astype() 中的 Bug,当 `errors` 参数针对扩展数据类型设置为 "ignore" 时未被遵守 (GH 35471)

  • DateTimeIndex.format()PeriodIndex.format() 中的 Bug,当 `name=True` 时将第一个项目设置为 "None",而它本应是 "" (GH 35712)

  • Float64Index.__contains__() 中的 Bug,错误地引发 TypeError 而不是返回 False (GH 35788)

  • Series 构造函数中的 Bug,在传入有序集合时错误地引发 TypeError (GH 36044)

  • Series.dt.isocalendar()DatetimeIndex.isocalendar() 中的 Bug,对某些日期返回了不正确的年份 (GH 36032)

  • DataFrame 索引中的 Bug,在某些情况下,当 Series 被修改且缓存未失效时,会返回不正确的 Series (GH 33675)

  • DataFrame.corr() 中的 Bug,导致后续索引查找不正确 (GH 35882)

  • import_optional_dependency() 中的 Bug,在包名与导入名不同时返回了不正确的包名 (GH 35948)

  • 将空的 DataFrame 列设置为 Series 时,在保留帧中索引名称方面的 Bug (GH 31368)

其他#

贡献者#

共有 16 位贡献者为此版本提交了补丁。名字旁边带有“+”的人员是首次贡献补丁。

  • Ali McMaster

  • Asish Mahapatra

  • Daniel Saxton

  • Fangchen Li

  • Harsh Sharma +

  • Irv Lustig

  • Jeet Parekh +

  • Joris Van den Bossche

  • Kaiqi Dong

  • Matthew Roeschke

  • MeeseeksMachine

  • Pandas Development Team

  • Simon Hawkins

  • Terji Petersen

  • jbrockmendel

  • patrick