0.25.1中的新特性(2019年8月21日)#
这些是Pandas0.25.1的变化。看见 发行说明 获取完整的更改日志,包括其他版本的Pandas。
IO和LZMA#
Some users may unknowingly have an incomplete Python installation lacking the lzma
module from the standard library. In this case, import pandas
failed due to an ImportError
(GH27575).
pandas will now warn, rather than raising an ImportError
if the lzma
module is not present. Any subsequent attempt to use lzma
methods will raise a RuntimeError
.
A possible fix for the lack of the lzma
module is to ensure you have the necessary libraries and then re-install Python.
For example, on MacOS installing Python with pyenv
may lead to an incomplete Python installation due to unmet system dependencies at compilation time (like xz
). Compilation will succeed, but Python might fail at run time. The issue can be solved by installing the necessary dependencies and then re-installing Python.
错误修复#
直截了当的#
Bug in
Categorical.fillna()
that would replace all values, not just those that areNaN
(GH26215)
类似日期的#
窃听
to_datetime()
在那里通过一个时区-天真DatetimeArray
或DatetimeIndex
和utc=True
将错误地返回时区原始结果 (GH27733 )Bug in
Period.to_timestamp()
where aPeriod
outside theTimestamp
implementation bounds (roughly 1677-09-21 to 2262-04-11) would return an incorrectTimestamp
instead of raisingOutOfBoundsDatetime
(GH19643)迭代时出现错误
DatetimeIndex
当基础数据为只读时 (GH28055 )
时区#
Bug in
Index
where a numpy object array with a timezone awareTimestamp
andnp.nan
would not return aDatetimeIndex
(GH27011)
数字#
Bug in
Series.interpolate()
when using a timezone awareDatetimeIndex
(GH27548)Bug when printing negative floating point complex numbers would raise an
IndexError
(GH27484)BUG在哪里
DataFrame
算术运算符,如DataFrame.mul()
使用一个Series
如果轴=1,则会引发AttributeError
在……上面DataFrame
大于调用数字表达式的最小阈值 (GH27636 )Bug in
DataFrame
arithmetic where missing values in results were incorrectly masked withNaN
instead ofInf
(GH27464)
转换#
Improved the warnings for the deprecated methods
Series.real()
andSeries.imag()
(GH27610)
间隔#
Bug in
IntervalIndex
wheredir(obj)
would raiseValueError
(GH27571)
标引#
Bug in partial-string indexing returning a NumPy array rather than a
Series
when indexing with a scalar like.loc['2015']
(GH27516)涉及的中断参考循环
Index
和其他索引类,以允许在不运行GC的情况下对索引对象进行垃圾收集。 (GH27585 , GH27840 )属性为DataFrame的单个列赋值的过程中修复回归问题
MultiIndex
列 (GH27841 )。Fix regression in
.ix
fallback with anIntervalIndex
(GH27865).
丢失#
Bug in
pandas.isnull()
orpandas.isna()
when the input is a type e.g.type(pandas.Series())
(GH27482)
IO#
避免打电话
S3File.s3
在阅读拼花时,因为在s3fs版本0.3.0中删除了此功能 (GH27756 )Better error message when a negative header is passed in
pandas.read_csv()
(GH27779)请遵循
min_rows
在笔记本的HTMLepr中正确显示选项(在v0.25.0中引入) (GH27991 )。
标绘#
添加了一个
pandas_plotting_backends
用于注册绘图后端的入口点组。看见 打印后端 了解更多信息 (GH26747 )。Fixed the re-instatement of Matplotlib datetime converters after calling
pandas.plotting.deregister_matplotlib_converters()
(GH27481).修复了传递Pandas时与matplotlib的兼容性问题
Index
到一个剧情呼叫 (GH27775 )。
分组依据/重采样/滚动#
修复了中的回归问题
pands.core.groupby.DataFrameGroupBy.quantile()
在给定多个分位数时引发 (GH27526 )窃听
pandas.core.groupby.DataFrameGroupBy.transform()
其中,应用时区转换lambda函数会删除时区信息 (GH27496 )窃听
pandas.core.groupby.GroupBy.nth()
哪里observed=False
对于分类石斑鱼来说是被忽略的 (GH26385 )对只读数组进行窗口操作时出现错误 (GH27766 )
修复了中的分段故障
pandas.core.groupby.DataFrameGroupBy.quantile
当传递了无效的分位数时 (GH27470 )
重塑#
A
KeyError
,则现在将引发.unstack()
对象上调用Series
或DataFrame
带着一套公寓Index
传递的名称不正确 (GH18303 )虫虫
merge_asof()
无法合并Timedelta
对象在传递时tolerance
科瓦格 (GH27642 )窃听
DataFrame.crosstab()
什么时候margins
设置为True
和normalize
不是False
,则会引发错误。 (GH27500 )DataFrame.join()
现在会抑制FutureWarning
当指定排序参数时 (GH21952 )窃听
DataFrame.join()
使用只读数组引发 (GH27943 )
稀疏#
减少以下项目中的错误
Series
使用稀疏数据类型 (GH27080 )
其他#
贡献者#
共有5人为此次发布贡献了补丁。名字中带有“+”的人第一次贡献了一个补丁。
Jeff Reback
Joris Van den Bossche
MeeseeksMachine +
Tom Augspurger
jbrockmendel