Skip to content

Commit

Permalink
Fix dataframe columns
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubken committed Feb 11, 2022
1 parent 0f04ed7 commit e47b223
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dsdk/persistor.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def df_from_query(
if parameters is None:
parameters = {}
cur.execute(query, parameters)
columns = (each[0] for each in cur.description)
columns = tuple(each[0] for each in cur.description)
rows = cur.fetchall()
if rows:
df = DataFrame(rows)
Expand Down Expand Up @@ -138,7 +138,7 @@ def df_from_query_by_keys(
with NamedTemporaryFile("w", delete=False, suffix=".sql") as fout:
fout.write(rendered)
cur.execute(rendered)
columns = (each[0] for each in cur.description)
columns = tuple(each[0] for each in cur.description)
rows = cur.fetchall()
if rows:
df = DataFrame(rows)
Expand Down

0 comments on commit e47b223

Please sign in to comment.