Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import pandas as pd
- file_path = 'test_file.csv'
- n_rows = 1500000
- n_digits = 19
- target_size = 1.5*1024*1024 # 1.5 gigabytes
- n_columns = int(1.5*1024*1024/n_rows/n_digits)
- df = pd.DataFrame(np.random.randn(n_rows,n_columns), columns=[hex(x) for x in range(0,n_columns)])
- df.to_csv('test_file.csv', index=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement