j riot
j riot

Reputation: 544

read_sql chunksize error

I have a data-set (14gb) and I am trying to pull the data in from MySQL using chunksize. 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):
    DO STUFF TO chunk

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

Thank you!

Upvotes: 2

Views: 974

Answers (1)

Stefan
Stefan

Reputation: 42905

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.

Upvotes: 1

Related Questions