I have the following code:
import glob
import pandas as pd
allFiles = glob.glob("C:\*.csv")
frame = pd.DataFrame()
list_ = []
for file_ in allFiles:
print file_
df = pd.read_csv(file_,index_col=None, header=0)
list_.append(df)
frame = pd.concat(list_, sort=False)
print list_
frame.to_csv("C:\f.csv")
This combines multiple CSVs to single CSV.
However it also adds a row number column.
Input:
a.csv
a b c d
1 2 3 4
b.csv
a b c d
551 55 55 55
551 55 55 55
result: f.csv
a b c d
0 1 2 3 4
0 551 55 55 55
1 551 55 55 55
How can I modify the code not to show the row numbers in the output file?