I have a python script (grouper.py) that accepts 1 argument as input. Currently, due to size of the input file, I must break the input argument up into 20 chunks and open 20 terminals and run all 20 at once.
Is there a way to loop through all 10 input arguments that kicks off a python process?
def fun(i):
j = pd.read(i)
# do some heavy processing
return j
for i in inputfiles:
print(i)
outputfile=fun(i)
outputfile.to_csv('outputfile.csv', index=False)
The above code of mine does each inputfile 1 at a time... IS there a way to run all 20 input files at once??
Thanks!!