Skip to content

Instantly share code, notes, and snippets.

@panda1100
Created October 2, 2018 01:44
Show Gist options
  • Save panda1100/07ce02537e5e0dcb87e28b091fdd82a9 to your computer and use it in GitHub Desktop.
Save panda1100/07ce02537e5e0dcb87e28b091fdd82a9 to your computer and use it in GitHub Desktop.
import pandas as pd
from os import listdir
from os.path import splitext
for filename in listdir():
csv = pd.read_csv(filename, header=None)
writer = pd.ExcelWriter('{0}.xlsx'.format(splitext(filename)[0]))
csv.to_excel(writer, 'Sheet1', index=False, header=False)
writer.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment