import uuid
import pandas as pd
from sqlalchemy import create_engine
engine = create_engine('postgresql+psycopg2://postgres:xxx@localhost:5432/xxxxa')
df=pd.read_csv("uplauds_corp_financial.csv")
li=[]
for _ in range(len(df)):
ud = uuid.uuid1()
print(ud)
li.append(ud)
df['uuid_']=li
df.to_sql(name="uplauds_corp_financial", con=engine, if_exists='append', index=False)
ERROR=sqlalchemy.exc.DataError: (psycopg2.errors.InvalidDatetimeFormat) invalid input syntax for type timestamp: "23:37.2" LINE 1: ...75, 140.89, 75.92, 0.0, 0.0, 0.0, 0.0, 0.0, NULL, '23:37.2',...
maybe it is taking it as string maybe thats why it is showing error
is there any option that instead of changing it in my csv
i can change it before importing into postgresql