Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for default_charset to sql.write_frame #5008

Closed
aschilling opened this issue Sep 27, 2013 · 2 comments
Closed

Add option for default_charset to sql.write_frame #5008

aschilling opened this issue Sep 27, 2013 · 2 comments
Labels
IO SQL to_sql, read_sql, read_sql_query Unicode Unicode strings

Comments

@aschilling
Copy link

Hi everybody,

I worked today with a lot of unicode data and deeply missed the option to define a default_charset when writing a dataframe to a new sql table. I did not know that pandas uses "latin-1" as default and ran into various strange encoding problems such as "Data too long for column" when inserting my unicode data. The exception was raised despite the explicit definition of utf-8 in the connection object.

As a workaround I created the table myself and let pandas only append the DataFrame. However, it would be much better if pandas could create the tables itself.

Best regards

Andy

@hayd hayd mentioned this issue Sep 29, 2013
20 tasks
@jreback jreback modified the milestones: 0.15.0, 0.14.0 Mar 25, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 3, 2015
@kokes
Copy link
Contributor

kokes commented Dec 10, 2018

Hi, as this API has been replaced by to_sql, I have to ask if you can replicate this issue in this "new" API.

Thanks!

@mroeschke
Copy link
Member

Not entirely clear on the feature request since it references an older API. Feel free to open a new issue as it pertains to to_sql.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO SQL to_sql, read_sql, read_sql_query Unicode Unicode strings
Projects
None yet
Development

No branches or pull requests

4 participants