Skip to content

Instantly share code, notes, and snippets.

@j-bennet
Last active Nov 25, 2019
Embed
What would you like to do?
In [64]: def convert_int_types(df_iter):
...: for chunk in df_iter:
...: chunk["payment_id"] = chunk["payment_id"].astype(np.uint16)
...: chunk["customer_id"] = chunk["customer_id"].astype(np.uint16)
...: chunk["staff_id"] = chunk["staff_id"].astype(np.uint8)
...: yield chunk
...:
...:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment