-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: add "schema" kwarg to io.sql.get_schema method #38146
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
ENH: add "schema" kwarg to io.sql.get_schema method #38146
Conversation
lgtm. @jorisvandenbossche if you can give a once over |
…28486-add_schema_kwarg
…28486-add_schema_kwarg
doc/source/whatsnew/v1.2.0.rst
Outdated
@@ -260,6 +260,7 @@ Other enhancements | |||
- Added :meth:`~DataFrame.set_flags` for setting table-wide flags on a Series or DataFrame (:issue:`28394`) | |||
- :meth:`DataFrame.applymap` now supports ``na_action`` (:issue:`23803`) | |||
- :class:`Index` with object dtype supports division and multiplication (:issue:`34160`) | |||
- :meth:`get_schema` now allows a schema kwarg that will add a schema into the create table statement (:issue:`28486`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind specifying io.sql.get_schema
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment otherwise LGTM
…28486-add_schema_kwarg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping on green
@@ -1873,4 +1896,6 @@ def get_schema(frame, name, keys=None, con=None, dtype=None): | |||
|
|||
""" | |||
pandas_sql = pandasSQL_builder(con=con) | |||
return pandas_sql._create_sql_schema(frame, name, keys=keys, dtype=dtype) | |||
return pandas_sql._create_sql_schema( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh you need to update doc-string and add versionadded 1.2
lgtm ping on green |
Green |
Thanks @arw2019 |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Picking up #33278