-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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/SQL: provide single value to 'dtype' argument in to_sql as dtype for all columns #11886
Labels
Milestone
Comments
Will it be alright if I:
|
RahulHP
added a commit
to RahulHP/pandas
that referenced
this issue
May 27, 2016
RahulHP
added a commit
to RahulHP/pandas
that referenced
this issue
May 27, 2016
RahulHP
added a commit
to RahulHP/pandas
that referenced
this issue
May 28, 2016
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
It seems that this is not documented here: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_sql.html |
@oguzhanogreden would you like to do a PR to add it? |
4 tasks
TomAugspurger
pushed a commit
that referenced
this issue
Aug 30, 2019
(#26795) * DOC: add single dtype to NDFrame.to_sql
MarcoGorelli
pushed a commit
to MarcoGorelli/pandas
that referenced
this issue
Sep 3, 2019
…das-dev#11886 (pandas-dev#26795) * DOC: add single dtype to NDFrame.to_sql
proost
pushed a commit
to proost/pandas
that referenced
this issue
Dec 19, 2019
…das-dev#11886 (pandas-dev#26795) * DOC: add single dtype to NDFrame.to_sql
proost
pushed a commit
to proost/pandas
that referenced
this issue
Dec 19, 2019
…das-dev#11886 (pandas-dev#26795) * DOC: add single dtype to NDFrame.to_sql
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Idea from http://stackoverflow.com/questions/34383000/pandas-to-sql-all-columns-as-nvarchar
You can specify the sql type using the
dtype
argument into_sql
. Now, this argument has to be a dict (mapping of column name -> type).Letting
to_sql
recognize a single value as the sql type for all columns is not that difficult to add.So instead of this:
you can do this:
The text was updated successfully, but these errors were encountered: