0

I am trying to extend the DataFrame object from the Pandas package, and I am getting a strange error that I can't solve.

import pandas as pd
###########################################################################
class MyDataFrame(pd.DataFrame):
    def __init__(self, *args, **kwargs):
        super(MyDataFrame, self).__init__(*args, **kwargs)

When I do this, I get the following error:

ImportError: cannot import name StringIO

If I write the above code directly in the python.exe interpreter, I do not get this error. Why is this being thrown?

Installation information:

  • Python 2.7.10
  • Pandas version 0.18.1

Thanks

code base 5000
  • 3,812
  • 13
  • 44
  • 73

0 Answers0