Column names are converted to lowercase
See original GitHub issueAll column names, irrespective of their casing in the Snowflake database, seem to be converted to lower-case.
- What version of Python are you using (
python --version
)?
3.7.3
- What operating system and processor architecture are you using (
python -c 'import platform; print(platform.platform())'
)?
Linux-4.15.0-1060-aws-x86_64-with-debian-buster-sid
- What are the component versions in the environment (
pip list
)?
pandas 0.25.3
snowflake-connector-python 2.1.3
snowflake-sqlalchemy 1.2.0
- What did you do?
import sqlalchemy as sa
from snowflake.sqlalchemy import URL
engine = db.create_engine(URL(...))
res = engine.execute('''
SELECT
NULL::TEXT AS COL1,
NULL::TEXT AS "col2",
NULL::TEXT AS "COL3"
''')
row = res.fetchone()
row.keys()
- What did you expect to see?
['COL', 'col2', 'COL3']
(which is the column names I get when I grab the query result using the Snowflake Connector’s fetch_pandas_all()
.
- What did you see instead?
['col1', 'col2', 'col3']
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How To Change Pandas Column Names to Lower Case
We can convert the names into lower case using Pandas' str.lower() function. We first take the column names and convert it to lower...
Read more >How can I make pandas dataframe column headers all ...
You can do it like this: data.columns = map(str.lower, data.columns). or data.columns = [x.lower() for x in data.columns]. example: >>> data = pd....
Read more >Pandas: How to Change Column Names to Lowercase
This tutorial explains how to change the column names in a pandas DataFrame to lowercase, including an example.
Read more >How to lowercase column names in Pandas dataframe
There are certain methods we can change/modify the case of column in pandas dataframe. Let's see how can we lowercase column names in...
Read more >How to change column names to capital letters from lower ...
Mostly, we get data that contain column names in lowercase or just first letter is in upper case. If we want to convert...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1! I’d be very much interested in seeing a fix for this.
@keller00 @sfc-gh-abhatnagar Do you think you can assign this to someone else that works on the project? It’s a pretty difficult bug to work around.