Skip to content

Instantly share code, notes, and snippets.

@jrsmith
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save jrsmith/841030358e501623b6f7 to your computer and use it in GitHub Desktop.

Select an option

Save jrsmith/841030358e501623b6f7 to your computer and use it in GitHub Desktop.
from glob import glob
with open('masterfile.csv', 'a') as mf:
for filename in glob('files/*.csv'):
with open(filename) as f:
contents = f.readlines()
mf.write(contents)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment