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

DOC: Add Series type to to_sql docstring #20004

Merged
merged 1 commit into from
Mar 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def to_sql(frame, name, con, schema=None, if_exists='fail', index=True,

Parameters
----------
frame : DataFrame
frame : DataFrame, Series
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorisvandenbossche is this right? should we deprecate / rename this parameter?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this seems right, as a few lines below it does:

    if isinstance(frame, Series):
        frame = frame.to_frame()

but since this is mostly an internal method (most people will directly use DataFrame/Series.to_sql), I don't think we should bother with deprecating or renaming it

name : string
Name of SQL table.
con : SQLAlchemy connectable(engine/connection) or database string URI
Expand Down