0.21.1版(2017年12月12日)#

这是0.21.x系列中的一个较小的错误修复版本,包括一些小的回归修复、错误修复和性能改进。我们建议所有用户升级到此版本。

亮点包括:

  • 暂时恢复matplotlib日期时间打印功能。这应该会解决那些隐含地依赖Pandas来使用matplotlib绘制日期时间的用户的问题。看见 here

  • 对0.21.0中引入的拼图IO函数的改进。看见 here

恢复Matplotlib日期时间转换器注册#

Pandas实现了一些matplotlib转换器,用于很好地格式化地块上的轴标签 datetimePeriod 价值观。在Pandas0.21.0之前,这些都是在matplotlib隐式注册的,作为 import pandas

在Pandas 0.21.0中,我们要求用户显式注册转换器。这给一些经常依赖这些转换器的用户带来了问题 matplotlib.pyplot 绘图方法,所以我们暂时恢复该更改;Pandas 0.21.1再次在导入时注册转换器,就像0.21.0之前一样。

我们添加了一个新的选项来控制转换器: pd.options.plotting.matplotlib.register_converters 。默认情况下,它们是注册的。将此选项切换为 False 删除Pandas的格式化程序并恢复我们在注册它们时覆盖的任何转换器 (GH18301 )。

我们正在与matplotlib开发人员合作,让这件事变得更容易。我们正在尝试平衡用户便利性(自动注册转换器)与导入性能和最佳实践(导入Pandas不应该有覆盖您已经设置的任何自定义转换器的副作用)。在未来,我们希望在matplotlib中拥有大部分日期时间格式化功能,只在Pandas中使用特定于Pandas的转换器。然后,我们将优雅地反对自动注册转换器,转而支持用户在需要时显式注册它们。

新功能#

对拼花IO功能的改进#

其他增强功能#

不推荐使用#

性能改进#

  • 提高了绘制大系列/数据帧的性能 (GH18236 )。

错误修复#

转换#

  • 窃听 TimedeltaIndex 在以下情况下,减法可能会错误地溢出 NaT 都在现场 (GH17791 )

  • 窃听 DatetimeIndex 从DatetimeIndex中减去类DateTime可能无法溢出 (GH18020 )

  • Bug in IntervalIndex.copy() when copying and IntervalIndex with non-default closed (GH18339)

  • Bug in DataFrame.to_dict() where columns of datetime that are tz-aware were not converted to required arrays when used with orient='records', raising TypeError (GH18372)

  • 窃听 DateTimeIndexdate_range() 哪里不匹配TZ-Aware startend 在以下情况下,时区不会引发错误 end.tzinfo 为None (GH18431 )

  • 窃听 Series.fillna() 当在Python2上传递一个长整数时引发 (GH18159 )。

标引#

  • 的布尔比较中的错误 datetime.datetime 和一个 datetime64[ns] DType系列 (GH17965 )

  • BUG,其中 MultiIndex 有100多万张唱片没有筹集到 AttributeError 当尝试访问缺少的属性时 (GH18165 )

  • Bug in IntervalIndex constructor when a list of intervals is passed with non-default closed (GH18334)

  • 窃听 Index.putmask 当传递无效掩码时 (GH18368 )

  • 掩码赋值中的错误 timedelta64[ns] 数据类型 Series ,被错误地强制浮动 (GH18493 )

IO#

  • 窃听 StataReader 不转换显示格式已寻址的日期/时间列 (GH17990 )。以前,带有显示格式的列通常保留为序号,不会转换为DateTime对象。

  • 窃听 read_csv() 读取压缩的UTF-16编码文件时 (GH18071 )

  • Bug in read_csv() for handling null values in index columns when specifying na_filter=False (GH5239)

  • 窃听 read_csv() 读取基数较高的数值类别字段时 (GH18186 )

  • Bug in DataFrame.to_csv() when the table had MultiIndex columns, and a list of strings was passed in for header (GH5539)

  • Bug in parsing integer datetime-like columns with specified format in read_sql (GH17855).

  • 窃听 DataFrame.to_msgpack() 在序列化 numpy.bool_ 数据类型 (GH18390 )

  • 窃听 read_json() 从S3读取行分隔的JSON时未解码 (GH17200 )

  • Bug in pandas.io.json.json_normalize() to avoid modification of meta (GH18610)

  • 窃听 to_latex() 即使更高级别的索引与前一行不同,也不会打印重复的多索引值 (GH14484 )

  • Bug when reading NaN-only categorical columns in HDFStore (GH18413)

  • 窃听 DataFrame.to_latex() 使用 longtable=True 其中 Latex 多柱总是跨越三个柱 (GH17959 )

标绘#

  • 窃听 DataFrame.plot()Series.plot() 使用 DatetimeIndex 其中由它们生成的图形在Python3中不可拾取 (GH18439 )

分组依据/重采样/滚动#

  • 窃听 DataFrame.resample(...).apply(...) 当存在返回不同列的可调用 (GH15169 )

  • 窃听 DataFrame.resample(...) 当存在时间更改(DST)并且重采样频率为12小时或更高时 (GH15549 )

  • 窃听 pd.DataFrameGroupBy.count() 在对类似日期时间的列进行计数时 (GH13393 )

  • 窃听 rolling.var 其中,零值数组的计算不准确 (GH18430 )

重塑#

  • 中的错误消息 pd.merge_asof() 对于键数据类型不匹配,现在包括Left和Right键的数据类型 (GH18068 )

  • 窃听 pd.concat 当连接空和非空的DataFrame或Series时 (GH18178 GH18187 )

  • 窃听 DataFrame.filter(...) 什么时候 unicode 在Python2中作为条件传递 (GH13101 )

  • 在以下情况下合并空DataFrames时出错 np.seterr(divide='raise') 已设置 (GH17776 )

数字#

  • 窃听 pd.Series.rolling.skew()rolling.kurt() 具有所有相等的值具有浮动问题 (GH18044 )

直截了当的#

  • 窃听 DataFrame.astype() 其中,强制转换为空的 DataFrame 导致分段故障 (GH18004 )

  • Error messages in the testing module have been improved when items have different CategoricalDtype (GH18069)

  • CategoricalIndex 现在可以正确地接受 pd.api.types.CategoricalDtype 作为其数据类型 (GH18116 )

  • Bug in Categorical.unique() returning read-only codes array when all categories were NaN (GH18051)

  • Bug in DataFrame.groupby(axis=1) with a CategoricalIndex (GH18432)

细绳#

贡献者#

共有46人为此次发布贡献了补丁。名字中带有“+”的人第一次贡献了一个补丁。

  • Aaron Critchley +

  • Alex Rychyk

  • Alexander Buchkovsky +

  • Alexander Michael Schade +

  • Chris Mazzullo

  • Cornelius Riemenschneider +

  • Dave Hirschfeld +

  • David Fischer +

  • David Stansby +

  • Dror Atariah +

  • Eric Kisslinger +

  • Hans +

  • Ingolf Becker +

  • Jan Werkmann +

  • Jeff Reback

  • Joris Van den Bossche

  • Jörg Döpfert +

  • Kevin Kuhl +

  • Krzysztof Chomski +

  • Leif Walsh

  • Licht Takeuchi

  • Manraj Singh +

  • Matt Braymer-Hayes +

  • Michael Waskom +

  • Mie~~~ +

  • Peter Hoffmann +

  • Robert Meyer +

  • Sam Cohan +

  • Sietse Brouwer +

  • Sven +

  • Tim Swast

  • Tom Augspurger

  • Wes Turner

  • William Ayd +

  • Yee Mey +

  • bolkedebruin +

  • cgohlke

  • derestle-htwg +

  • fjdiod +

  • gabrielclow +

  • gfyoung

  • ghasemnaddaf +

  • jbrockmendel

  • jschendel

  • miker985 +

  • topper-123