I am reading multiple csv files in folder, the reading file have names something like this m1,m2,m3,... so I need to create csv file (I am putting the new file in other path) have the same name of reading file how can do that? for example if first read file have name(m1), the create new file must have name(m1)
fpath = '/path/*'
for file in iglob(fpath):
with open(file) as f:
for i in f:
try:
#some processing
except ValueError:
pass
with open('C:\\write\\ .csv','w') as ff:
ff.write()