1

I am new to python, am attempting to work with some existing code, but am getting errors due to a missing module. I am using python version 2.7, pandas version 0.18.1, all inside VSCode.

problem code is:

import pandas.io.formats.excel

Error:

Exception has occurred: ImportError No module named formats.excel

I have tried using pandas.formats.excel but then the 'excel' part is missing. i've also tried uninstalling and reinstalling pandas

Thanks for any help.

1
  • i tried someone's suggestion of "import pandas.io.formats.style.Styler.to_excel" but i get a very similar error message. Commented Jul 13, 2020 at 21:16

1 Answer 1

1

Your python version can't support the module. I ran your code in python 3.8.3 and it went well, but the same problem occured when I ran it in python 2.7. Please download the latest python version in the offical website. https://www.python.org/

Click lower left to change the interpreter.

Sign up to request clarification or add additional context in comments.

1 Comment

We should change python version and this solution worked for me.Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.