Skip to content

Commit b5b88cf

Browse files
committed
🐛 Add index column as regular column, too
Closes gh-63.
1 parent 0928caa commit b5b88cf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mods4pandas/lib.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,9 @@ def insert_into_db_multiple(con, table, ld: List[Dict]):
423423
def convert_db_to_parquet(con, table, index_col, output_file):
424424
df = pd.read_sql_query(f"SELECT * FROM {table}", con, index_col)
425425

426+
# Add index column as regular column, too
427+
df[index_col] = df.index
428+
426429
# Convert Python column type into Pandas type
427430
for c in df.columns:
428431
column_type = current_columns_types[table][c]

0 commit comments

Comments
 (0)