Pyodbc cursor.fetchall() alternative

71 Views Asked by At

I am trying to build a dataframe in python with the result of a query in a MSSQL database. For now I load the result in a list res = cursor.fetchall(). The problem is that the result contains more than a million rows and my kernel crashes. Do you know any alternative to cursor.fetchall() that could handle my query?

I tried res = cursor.fetchall(). I am expecting a list that I will transform in a dataframe (it worked for smaller query)

0

There are 0 best solutions below