Skip to content

ImportError: cannot import name _get_all_lines, when trying to plot a grouped DF #7876

Closed
@lJoublanc

Description

@lJoublanc

I have a DataFrame of stock close prices with a DatetimeIndex , close.


                     BARC:LON  HSBA:LON  LLOY:LON  STAN:LON
timestamp                                                  
2014-07-03 08:02:00   217.551   601.938   76.2100   1223.36
2014-07-03 08:04:00   217.200   602.100   75.8520   1220.00
2014-07-03 08:06:00   217.500   602.700   75.8700   1221.50
2014-07-03 08:08:00   217.750   602.400   75.9777   1222.50
2014-07-03 08:10:00   218.450   602.675   75.9440   1221.50

I want to plot these in separate graphs for each day, so I do:

for day,data in  close.groupby(close.index.date):
  data.plot(title=day)
  show()

But this throws

C:\Users\xxx\local\Enthought\Canopy\User\lib\site-packages\pandas\tseries\plotting.py in <module>()
     19                                       TimeSeries_DateFormatter)
     20 
---> 21 from pandas.tools.plotting import _get_all_lines, _get_xlim
     22 
     23 #----------------------------------------------------------------------

ImportError: cannot import name _get_all_lines

I can't find _get_all_lines anywhere. I recall doing this on my linux machine and it worked fine. This is running on Windows, pandas 0.14.1.
Also this works if I call matplotlib directly using plot(data), so the code doesn't seem to be at fault.

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