I am fetching data from database, and converting it to dataframe using pandas. I am getting AttributeError.
Code:
conn = adodbapi.connect("Provider=SQLNCLT11, Sever=LDN209232, Database = mydb, Integrated Security = SSPI, 180")
cursor = conn.cursor()
cursor.execute("select rowId, businessDate from mydb.mytable")
data = cursor.fetchall()
ar=astype("str")
df = pd.Dataframe(ar).transpose()
ar.astype('str')
df.columns = data.columnNames.keys()
df = df.astype('str')
print(df)
df.to_parquet('D:\\test\\myfile.parquet')
While running, i m getting error:
File: 'pandas\_libs\tslibs\timezones.pyx', line 284 in pandas.libs.tslibs.timezones.get_dst_info
AttributeError: 'NoneType' object has no attribute 'total_seconds'
I know this error is related to date time, but i have no idea how to resolve this.