Open
Description
At this moment, pd.io.sql.get_schema
is not documented (not in the API docs, and not in the io docs). But, it is a potential useful function, so I think it would be good to be more explicit about its status (by mentioning it in the docs).
However, there are some quirks about the function:
- The signature:
pd.io.sql.get_schema(frame, name, flavor='sqlite', keys=None, con=Non e, dtype=None)
-> flavor keyword in the third place, while we want to deprecate it (and this means you cannot doget_schema(df, 'name', engine)
, but always have to doget_schema(df, 'name', con=engine)
.
Ideally this should have the same arguments (order) asto_sql
(pd.io.sql.to_sql(frame, name, con, flavor='sqlite', schema=None, if_exists='fail', index=True, index_label=None, chunksize=None, dtype=None)
) (only chunksize is not relevant) - It should have all options to modify the resulting sql table as
to_sql
- Maybe also the option to return the sqlalchemy
Table
instead of the string itself?
That we maybe should first solve before making it more explicitely public?
Triggered by http://stackoverflow.com/questions/29749356/python-pandas-export-structure-only-no-rows-of-a-dataframe-to-sql/