Last active
September 27, 2019 18:01
-
-
Save mesmacosta/d660259cbdd4dd856dcbd26a35cea51b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| new_metadata = metadata.head(1).copy() | |
| for i in range(100): | |
| row = metadata.head(1) | |
| row['table_name'] = row['table_name'] + str(i) | |
| new_metadata = new_metadata.append(row) | |
| @classmethod | |
| def __get_df_memory_usage(cls, key_value, df): | |
| import io | |
| buf = io.StringIO() | |
| df.info(buf=buf) | |
| info = buf.getvalue().split('\n')[-2] | |
| print(f' key: {key_value} memory: {info}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment