Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Bug in generate CREATE TABLE SQL for DataFrame with MultiIndex with different types #8021
Comments
jorisvandenbossche
added the
SQL
label
Aug 13, 2014
jorisvandenbossche
added this to the
0.15.0
milestone
Aug 13, 2014
|
Thanks for the report, and great you can do a PR! |
artemyk
referenced
this issue
Aug 14, 2014
Merged
Fixed incorrect datatype conversion on multi-indexes #8022
|
Pull request submitted at pydata#8022 . |
jorisvandenbossche
closed this
in #8022
Aug 15, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
artemyk commentedAug 13, 2014
When using SQLAlchemy to create a table from a dataframe, Pandas messes up the types of the index columns. For example:
outputs
when
ashould beBIGINTandbshould beFLOAT.This occurs because the index columns are enumerated backwards in
PandasSQLTable._create_table_statementinpandas.io.sqlbut the types don't take into account this backward iteration:I will make a pull request with a fix for this issue. Versions appended below: