Skip to content

Series that won't plot! #4744

Closed
Closed
@dhirschfeld

Description

@dhirschfeld

https://www.dropbox.com/s/rgy9iqt9o8pvfdl/wontplot.pandas

In [3]: s = pd.load('wontplot.pandas')

In [5]: s.plot()
Traceback (most recent call last):

  File "<ipython-input-5-d3eb09d34df4>", line 1, in <module>
    s.plot()

  File "C:\dev\bin\Python27\lib\site-packages\pandas\tools\plotting.py", line 1727, in plot_series
    plot_obj.generate()

  File "C:\dev\bin\Python27\lib\site-packages\pandas\tools\plotting.py", line 853, in generate
    self._make_plot()

  File "C:\dev\bin\Python27\lib\site-packages\pandas\tools\plotting.py", line 1241, in _make_plot
    x = self._get_xticks(convert_period=True)

  File "C:\dev\bin\Python27\lib\site-packages\pandas\tools\plotting.py", line 1031, in _get_xticks
    self.data = self.data.reindex(index=index.order())

  File "C:\dev\bin\Python27\lib\site-packages\pandas\core\series.py", line 2638, in reindex
    return Series(new_values, index=new_index, name=self.name)

  File "C:\dev\bin\Python27\lib\site-packages\pandas\core\series.py", line 489, in __new__
    subarr.index = index

  File "properties.pyx", line 74, in pandas.lib.SeriesIndex.__set__ (pandas\lib.c:29092)

AssertionError: Index length did not match values


In [6]: s.index.shape
Out[6]: (480,)

In [7]: s.values.shape
Out[7]: (480,)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions