-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: in io.sql.write_frame (replace) #4110
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
Labels
Milestone
Comments
davidshinn
added a commit
to davidshinn/pandas
that referenced
this issue
Jul 28, 2013
This should resolve issues pandas-dev#2971 and pandas-dev#4110
still broken in 0.13 ... |
hayd
pushed a commit
to hayd/pandas
that referenced
this issue
Jan 29, 2014
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. BUG: Fix if_exists='replace' functionality in io.sql.write_frame This should resolve issues pandas-dev#2971 and pandas-dev#4110 CLN: Refactor in between test clean ups to be more DRY TST: Complete test coverage for if_exists uses in io.sql.write_frame CLN: Refactor to make interaction between exists and if_exists clearer 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 BUG: Fix regression introduced by c28f11a0041a9f3b25f33b0539e42fa802b1d8d4 sqlite3 convenience function executescript not available in other database flavors. TST: Adding if_exist test for mysql flavor
jreback
pushed a commit
to jreback/pandas
that referenced
this issue
Feb 4, 2014
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. BUG: Fix if_exists='replace' functionality in io.sql.write_frame This should resolve issues pandas-dev#2971 and pandas-dev#4110 CLN: Refactor in between test clean ups to be more DRY TST: Complete test coverage for if_exists uses in io.sql.write_frame CLN: Refactor to make interaction between exists and if_exists clearer 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 BUG: Fix regression introduced by c28f11a0041a9f3b25f33b0539e42fa802b1d8d4 sqlite3 convenience function executescript not available in other database flavors. TST: Adding if_exist test for mysql flavor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From http://pandas.pydata.org/pandas-docs/dev/generated/pandas.io.sql.write_frame.html :
Everything works fine as long as the table does not exist.
If table already exists :
-> "sqlite3.OperationalError: no such table: sp500"
Reason is that there is no new "create" statement after the drop statement:
In my opinion it should be changed to something like: (?)
If i manually work around that, everything works as expected:
#2971
The text was updated successfully, but these errors were encountered: