mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-08-14 12:09:52 +02:00
🐛 Add index column as regular column, too
Closes gh-63.
This commit is contained in:
parent
0928caa9d6
commit
b5b88cf772
1 changed files with 3 additions and 0 deletions
|
@ -423,6 +423,9 @@ def insert_into_db_multiple(con, table, ld: List[Dict]):
|
|||
def convert_db_to_parquet(con, table, index_col, output_file):
|
||||
df = pd.read_sql_query(f"SELECT * FROM {table}", con, index_col)
|
||||
|
||||
# Add index column as regular column, too
|
||||
df[index_col] = df.index
|
||||
|
||||
# Convert Python column type into Pandas type
|
||||
for c in df.columns:
|
||||
column_type = current_columns_types[table][c]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue