Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import numpy as np
  2. import pandas as pd
  3. file_path = 'test_file.csv'
  4.  
  5. n_rows = 1500000
  6. n_digits = 19
  7. target_size = 1.5*1024*1024 # 1.5 gigabytes
  8. n_columns = int(1.5*1024*1024/n_rows/n_digits)
  9.  
  10. df = pd.DataFrame(np.random.randn(n_rows,n_columns), columns=[hex(x) for x in range(0,n_columns)])
  11. df.to_csv('test_file.csv', index=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement