diff --git a/src/mods4pandas/lib.py b/src/mods4pandas/lib.py index 6e1005b..96644ed 100644 --- a/src/mods4pandas/lib.py +++ b/src/mods4pandas/lib.py @@ -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]