-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Allow to_sql to recognize single sql type #11886 #13252
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
Conversation
Could someone please tell me why this build failed? (https://travis-ci.org/pydata/pandas/jobs/132018332) |
you have pep issues |
|
df = DataFrame(data,columns=cols) | ||
df.to_sql('single_dtype_test', self.conn, dtype='STRING') | ||
self.assertEqual(self._get_sqlite_column_type('single_dtype_test', 'A'), | ||
'STRING') |
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.
You can do eg
self.assertEqual(
self._get_sqlite_column_type('single_dtype_test', 'A'), 'STRING')
@RahulHP Is there a reason you closed this? To clean up the unwanted commits here, you can do:
|
closes pandas-dev#12933 Author: Camilo Cota <[email protected]> Closes pandas-dev#13189 from camilocot/12933 and squashes the following commits: 465272e [Camilo Cota] Benchmark decimal option in read_csv for c engine 9f42d0c [Camilo Cota] double backticks around decimal and engine='python' dc8ca62 [Camilo Cota] fix test_empty_decimal_marker comment 49613fe [Camilo Cota] Assert read_csv error message in test_empty_decimal_marker d821052 [Camilo Cota] fix test_empty_decimal_marker comment f71509d [Camilo Cota] Include descritive what's new line 803356e [Camilo Cota] set nonnum regex in init method 1472d80 [Camilo Cota] Include the issue number in what's new b560fda [Camilo Cota] Fix what's new dc7acd1 [Camilo Cota] ENH: support decimal option in PythonParser pandas-dev#12933
I thought someone else would be better equipped to handle this. I have tried it but I seem to have trouble with the rebase related commands. I'll try it again now. |
ENH: support decimal option in PythonParser pandas-dev#12933 closes pandas-dev#12933 Author: Camilo Cota <[email protected]> Closes pandas-dev#13189 from camilocot/12933 and squashes the following commits: 465272e [Camilo Cota] Benchmark decimal option in read_csv for c engine 9f42d0c [Camilo Cota] double backticks around decimal and engine='python' dc8ca62 [Camilo Cota] fix test_empty_decimal_marker comment 49613fe [Camilo Cota] Assert read_csv error message in test_empty_decimal_marker d821052 [Camilo Cota] fix test_empty_decimal_marker comment f71509d [Camilo Cota] Include descritive what's new line 803356e [Camilo Cota] set nonnum regex in init method 1472d80 [Camilo Cota] Include the issue number in what's new b560fda [Camilo Cota] Fix what's new dc7acd1 [Camilo Cota] ENH: support decimal option in PythonParser pandas-dev#12933 ENH: Allow to_sql to recognize single sql type pandas-dev#11886 PEP pandas-dev#3
@RahulHP You still have some commits that should not be in here. Normally, by doing exactly:
it should be OK. If this does not work, can you show the output of those commands? |
@RahulHP Do you have time to update this? |
No I don't, sorry for the trouble. |
@RahulHP No problem, I will rebase this for you then, as it was a good enhancement! |
Rebased in #13614 |
Follow-up in #13614
This solves #11886
It checks whether the passed dtype variable is a dictionary.
If not, it creates a new dictionary with keys as the columns of the dataframe.
It then passes this dictionary to the pandasSQL_builder.