Python Timeseries绘图在0.21中失败(溢出错误)

Python Timeseries绘图在0.21中失败(溢出错误),python,pandas,matplotlib,Python,Pandas,Matplotlib,在Pandas 0.21和matplotlib 2.1版上,我无法再绘制timeseries数据帧 我从matplotlib中获得溢出错误: /usr/local/lib/python3.6/dist-packages/matplotlib/dates.py in _from_ordinalf(x, tz) 255 ix = int(x) --> 256 dt = datetime.datetime.fromordinal(ix).repla

在Pandas 0.21和matplotlib 2.1版上,我无法再绘制timeseries数据帧

我从matplotlib中获得溢出错误:

    /usr/local/lib/python3.6/dist-packages/matplotlib/dates.py in _from_ordinalf(x, tz)
        255     ix = int(x)
    --> 256     dt = datetime.datetime.fromordinal(ix).replace(tzinfo=UTC)
        257 
        258     remainder = float(x) - ix

    OverflowError: signed integer is less than minimum
在运行简单示例时,我甚至会遇到以下错误:

我想我一定是在最近升级了我的pip软件包之后在什么地方绊倒了。。。有人能提出解决办法吗? 在此版本之前,绘图很好

更新: 解决方法(如前所述)是添加以下行

from pandas.tseries import converter
converter.register()

我想这完全不是你的错。pandas 0.20.1的代码运行正常,这可能会导致一些问题。如果您在ipython中运行此代码,您可以使用%debug并告诉我们
ix
。ix=1509980040466200064可能类似,并且包含了一个变通方法。感谢您的反馈,为我提供了一个正确的变通方法修复方向。总之:
from pandas.tseries import converter
converter.register()