/pd_convert_int_types.py Secret
Last active
November 25, 2019 04:14
Star
You must be signed in to star a gist
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
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