Skip to content

Conversation

davidshinn
Copy link
Contributor

This fixes #2971 and #4110. This also provides test coverage for the different values for the if_exists argument for io.sql.write_frame.

@jreback
Copy link
Contributor

jreback commented Jul 20, 2013

related to #4163

@jreback jreback mentioned this pull request Jul 20, 2013
20 tasks
The if_exists argument in io.sql.write_frame needed data validation
because the logic of the function implicitly used 'append' if the argument
value was any string that was not either 'fail' or 'replace'.
I added a new unit test to support the requirement.
This refactor results in the function logic being clearer, since if_exists is
only relevant when exists is True, the program flow is better served to
have if_exists control flow only when exists is True
…1d8d4

sqlite3 convenience function executescript not available
in other database flavors.
@davidshinn
Copy link
Contributor Author

Rebased and added test coverage for mysql flavor

@jreback
Copy link
Contributor

jreback commented Sep 20, 2013

@hayd you have this included in SQL ?

@hayd
Copy link
Contributor

hayd commented Sep 21, 2013

@jreback thanks, I'd missed this. Will squish and add in to legacy and sqlalchemy.

@jreback
Copy link
Contributor

jreback commented Sep 21, 2013

@hayd just keeping it on the radar

@ghost
Copy link

ghost commented Jan 29, 2014

#2971 is about pandas dropping tables and losing data. That's... not cool.
We should get it fixed for 0.14, regardless of #5950.

@hayd, we pushed 0.13.1 to next week, can you give a push on this for 0.13.1
by any chance?

@hayd
Copy link
Contributor

hayd commented Jan 29, 2014

squished and rebased this branch, will see if it passes/what needs fixing. Agree this was bad, apologies on dropping the ball here. Should make sure this is also fixed in the new stuff.

@jreback
Copy link
Contributor

jreback commented Feb 16, 2014

@jorisvandenbossche @hayd should this be incorporated / closed
does it fit the new schema?

@jreback jreback added the SQL label Feb 16, 2014
@jorisvandenbossche
Copy link
Member

This PR was rebased by @hayd in #6164 and this PR is merged, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IO SQL to_sql, read_sql, read_sql_query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: io.sql.write_frame(if_exists='replace') not working as expected (with fix)

4 participants