You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are around 537 CSVs in the repo. I got a script to combine all the CSVs, but it was a huge mess, because the combined CSV file was 31 mb, and the formatting was all messed up. Basically, I wanted to create a CSV to order by the most frequently asked questions from all these companies.
import os
import glob
import pandas as pd
os.chdir('/mydir')
#find all csv files in the folder
#use glob pattern matching -> extension = 'csv'
#save result in list -> all_filenames
extension = 'csv'
all_filenames = [i for i in glob.glob('*.{}'.format(extension))]
#print(all_filenames)
#combine all files in the list
combined_csv = pd.concat([pd.read_csv(f) for f in all_filenames], axis=1)
#export to csv
combined_csv.to_csv( "aaaaa.csv", index=False, encoding='utf-8-sig')
The text was updated successfully, but these errors were encountered:
There are around 537 CSVs in the repo. I got a script to combine all the CSVs, but it was a huge mess, because the combined CSV file was 31 mb, and the formatting was all messed up. Basically, I wanted to create a CSV to order by the most frequently asked questions from all these companies.
The text was updated successfully, but these errors were encountered: