j riot j riot - 1 year ago 163
SQL Question

read_sql chunksize error

I have a data-set (14gb) and I am trying to pull the data in from MySQL using

. However, I continue to get the following error:

TypeError: read_sql_query() got an unexpected keyword argument 'chunksize'

Here is my code:

for chunk in pandas.read_sql_query(sql = SQL_QUERY, con = MYSQL_PHOENIX, chunksize = 10000):

I cannot for the life of me figure out why it is producing this error.

Thank you!

Answer Source

The chunksize parameter for pandas.read_sql_query was introduced between pandas versions 0.14 and 0.15, so you likely have an older version. Update if you can.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download