3

I want to open and read an excel file with pd.read_excel using utf-8 (so other languages could be read) as in read_csv the encodings can be set to utf-8, is it possible somehow?

2

1 Answer 1

1

You may pass an open file:

with open("file_path", encoding="utf-8") as f:
    pd.read_excel(f)

I didn't find a reference in the docs but a quick look in pandas code suggests "utf-8" might be the default already.

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

1 Comment

Thank you! it seems I have a problem when trying to use the values (from the excel file) for text in kivy labels for example, so the codec does work, how can I fix it?

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.