I'm trying to do a query to an SQL Server 2017 database, and then put the result into a pandas dataframe. I'm using the following code:
import pyodbc
import pandas as pd
conn = pyodbc.connect('Driver={SQL Server};'
'Server=SERVERHAJE;'
'Database=DATABASE_NAME;'
'Trusted_Connection=yes;')
sql_query=f'Select Field1,Field2 FROM dbo.[TableName] WHERE [status] IS NULL'
pandas_dataframe = pd.read_sql_query(sql_query,conn)
print(pandas_dataframe)
But I'm getting the following error:
module 'time' has no attribute 'clock'
I'm using Python 3.8.7 and pandas 1.2.2
What is wrong? Thanks!!