Open makmanalp opened 7 years ago
Even though pandas to_sql handles them OK. Currently pandas converts them to a string type, eg TEXT in sqlite.
TEXT
Backtrace:
I tried to dig further in the pandas code to see how they handle things but didn't get very far:
https://github.com/pandas-dev/pandas/blob/72c7a396fbd10559f0862e59f55a93beb52c35db/pandas/io/sql.py#L1148
Workaround is to just convert them to string right now. A better candidate could be SQLAlchemy's enum, which does native enum if possible (which comes with space savings) or otherwise a TEXT column with check constraints:
http://docs.sqlalchemy.org/en/latest/core/type_basics.html#sqlalchemy.types.Enum
Even though pandas to_sql handles them OK. Currently pandas converts them to a string type, eg
TEXT
in sqlite.Backtrace:
I tried to dig further in the pandas code to see how they handle things but didn't get very far:
https://github.com/pandas-dev/pandas/blob/72c7a396fbd10559f0862e59f55a93beb52c35db/pandas/io/sql.py#L1148
Workaround is to just convert them to string right now. A better candidate could be SQLAlchemy's enum, which does native enum if possible (which comes with space savings) or otherwise a TEXT column with check constraints:
http://docs.sqlalchemy.org/en/latest/core/type_basics.html#sqlalchemy.types.Enum