First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Your question is mainly concerned on how to read all of the files in a loop. You need to construct file names in a loop and read each file. The following code snippet may be helpful:
for i in range(1,49):
loadFileName = 'D'+str(i)+'.csv'
load = pd.read_csv(loadFileName')
genFileName = 'G'+str(i)+'.csv'
gens = pd.read_csv(genFileName')
and then you can do whatever you want with the data in dataframe format.
2 | No.2 Revision |
Your question is mainly concerned on how to read all of the files in a loop. You need to construct file names in a loop and read each file. The following code snippet may be helpful:
for i in range(1,49):
loadFileName = 'D'+str(i)+'.csv'
load = pd.read_csv(loadFileName')
pd.read_csv(loadFileName)
genFileName = 'G'+str(i)+'.csv'
gens = pd.read_csv(genFileName')
pd.read_csv(genFileName)
and then you can do whatever you want with the data in dataframe format.