My program should read ~400.000 csv files and it takes very long. The code I use is:
for file in self.files:
size=2048
csvData = pd.read_csv(file, sep='\t', names=['acol', 'bcol'], header=None, skiprows=range(0,int(size/2)), skipfooter=(int(size/2)-10))
for index in range(0,10):
s=s+float(csvData['bcol'][index])
s=s/10
averages.append(s)
time=file.rpartition('\\')[2]
time=int(re.search(r'\d+', time).group())
times.append(time)
Is there a chance to increase the speed?