Converting time format using Read_sql method

53 Views Asked by At

I am trying to read a sql table containing time format using Pandas' read_sql but it gives the following error:

ValueError: cannot cast unit %H:%M:%s

My piece of code:

data = pd.read_sql('select curtime() as time1 from dual',mysql_con,parse_dates={'time1':'%H:%M:%s'})
0

There are 0 best solutions below