Guest User

Untitled

a guest
May 24th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import os
  2. import pandas as pd
  3. from multiprocessing import Pool
  4.  
  5. def read_csv(filename):
  6. return pd.read_csv(filename)
  7.  
  8. def multiple_read(path):
  9. files = [path + f for f in os.listdir(path)]
  10. pool = Pool(processes=32)
  11. df = pd.concat(pool.map(read_csv, files))
  12. return df
Add Comment
Please, Sign In to add comment