Skip to content

Commit

Permalink
Remove index column from postgres table (#467)
Browse files Browse the repository at this point in the history
This PR removes the 'index' column, that is written by default, when
writing a dataframe to the analytics db. See also documentation here.

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_sql.html
  • Loading branch information
harisang authored Dec 16, 2024
1 parent a33252a commit 080157a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/data_sync/sync_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ async def sync_data_to_db( # pylint: disable=too-many-arguments
table_name,
OrderbookFetcher.pg_engine(OrderbookEnv.ANALYTICS),
if_exists="replace",
index=False,
)
log.info(
f"{type_of_data} data sync run completed successfully for month {months_list[i]}"
Expand Down

0 comments on commit 080157a

Please sign in to comment.