Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
to_excel() fails if unicode sheet name is used #1828
Like the subject says, the check in DataFrame.to_excel() checks for an instance of str, rather than basestring, hence unicode names skip the if check and are treated like files, which causes an exception later on in the code. Changing isistance() to check for basestring rather than str fixes the issue.
In py2 basestring is the superclass for str and unicode so you can use it to catch both; in py3 we don't have the basestring or unicode types anymore. I would try this: