Skip to content

Conversation

@RahulHP
Copy link
Contributor

@RahulHP RahulHP commented May 21, 2016

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.

@jreback jreback added the IO SQL to_sql, read_sql, read_sql_query label May 21, 2016
@RahulHP
Copy link
Contributor Author

RahulHP commented May 22, 2016

Could someone please tell me why this build failed? (https://travis-ci.org/pydata/pandas/jobs/132018332)
I can't find any error in the logs.

@jreback
Copy link
Contributor

jreback commented May 22, 2016

@RahulHP
Copy link
Contributor Author

RahulHP commented May 23, 2016

pandas/io/tests/test_sql.py:2050:80: E501 line too long (80 > 79 characters) pandas/io/tests/test_sql.py:2051:53: E127 continuation line over-indented for visual indent
How should I fix these lines?
https://github.com/pydata/pandas/pull/13252/files#diff-052a926a9b2c33a84e27d51c8fad3466R2050

Copy link
Member

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') 
@jorisvandenbossche
Copy link
Member

@RahulHP Is there a reason you closed this?

To clean up the unwanted commits here, you can do:

git fetch upstream/master git rebase upstream/master git push -f origin/master 
RahulHP and others added 3 commits May 27, 2016 22:56
closes pandas-dev#12933 Author: Camilo Cota <ccota@riplife.es> 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
@RahulHP
Copy link
Contributor Author

RahulHP commented May 27, 2016

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.

RahulHP added 4 commits May 28, 2016 08:28
ENH: support decimal option in PythonParser pandas-dev#12933 closes pandas-dev#12933 Author: Camilo Cota <ccota@riplife.es> 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
@jorisvandenbossche
Copy link
Member

@RahulHP You still have some commits that should not be in here. Normally, by doing exactly:

git fetch upstream/master git rebase upstream/master git push -f origin/master 

it should be OK. If this does not work, can you show the output of those commands?

@jorisvandenbossche
Copy link
Member

@RahulHP Do you have time to update this?

@RahulHP
Copy link
Contributor Author

RahulHP commented Jul 10, 2016

No I don't, sorry for the trouble.

@jorisvandenbossche
Copy link
Member

@RahulHP No problem, I will rebase this for you then, as it was a good enhancement!

@jorisvandenbossche
Copy link
Member

Rebased in #13614

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

Labels

Enhancement IO SQL to_sql, read_sql, read_sql_query

3 participants