Created
June 3, 2021 15:51
-
-
Save corintxt/468070d1102d5354842d022e3d039d37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
q = text( | |
''' | |
SELECT * | |
FROM "facebook-timeline" ft | |
LIMIT 10000 | |
''' | |
) | |
df = pd.DataFrame() | |
for idx, chunk in enumerate( | |
pd.read_sql_query(q, con=db.engine, | |
chunksize=1000 | |
), start=1): | |
print (f"Retrieving chunk {idx}") | |
df = df.append(chunk) | |
print("Complete") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment