Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. import glob
  2.  
  3. # ignore_index = True to avoid duplicate index values
  4. df = pd.concat([pd.read_csv(f) for f in glob.glob("*.csv")], ignore_index = True)
  5.  
  6. # More options
  7. df = pd.concat([pd.read_csv(f, encoding = "latin1") for f in glob.glob("*.csv")])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement