New to Python Data science.
Here I have a sql server extract and I am extracting the data via 'pyodbc.connect' and reading the data by pd.read_sql(.....SQL query) from SQL server.
Here my intention is want to use a list or vector (example below) in SQL query where condition. How I do that? It hleps us not fetching millions of rows into memory.
I like to know how I pass number list and string list (both have different use cases)
1st whare conditions string:
raw_data2 = {'age1': ['ten','twenty']}
df2 = pd.DataFrame(raw_data2, columns = ['age1'])
2nd where condition number:
raw_data2 = {'age_num': [10,20,30]}
df3 = pd.DataFrame(raw_data2, columns = ['age_num'])
Thank you for your help and this will reduce our fetch time to 80%