I added two strings together and now I want to use those strings to create multiple dataframes.... I currently have:
filepath = 'C:/........GC results/lng_11169_fid00'
l = []
for i in range(1,7):
newpath = filepath + str(i)
l.append(newpath)
print l
d =[]
for i in range(1,7):
dataframes = "df" + str(i)
d.append(dataframes)
print d
enter code here
m = []
dfstr = "pd.DataFrame.from_csv("
for i in d:
for x in l:
newdf = i + "="+ dfstr + x + ", index_col = None)"
m.append(newdf)
print m
out:
['df1=pd.DataFrame.from_csv(C:...lng_11169_fid001, index_col = None)', 'df2=pd.DataFrame.from_csv(C:...lng_11169_fid002, index_col = None)'..... + 20 others]
I want to use those strings to make a DataFrame. Is this possible?