question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Column names are converted to lowercase

See original GitHub issue

All column names, irrespective of their casing in the Snowflake database, seem to be converted to lower-case.

  1. What version of Python are you using (python --version)?

3.7.3

  1. 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

  1. 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
  1. 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()
  1. 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().

  1. What did you see instead?
['col1', 'col2', 'col3']

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
fflakitocommented, Nov 29, 2021

+1! I’d be very much interested in seeing a fix for this.

2reactions
patrickhowertercommented, Sep 28, 2021

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found