I am changing my original code, to present a much simplified version of it. But, this is where the main problem is occurring. Using the following code:
Sp=pd.DataFrame()
l1=['a', 'b', 'c']
for i in l1:
Sp['col1'] = i
Gives me the result Sp as:
col1
I would want my col1 to have values a, b and c. Could anyone please suggest why this is happening, and how to rectify it.
EDIT:
For every value in my list, I use it to connect to a different file using os, (file names are made up of list values). After picking up the csv file from there I take values such as mean, devisation etc. of the data from the file and assign those values to sp in another column. My final sp should look something as follows:
col1 Mean Median Deviation
a 1 1.1 0.5
b 2 2.1 0.5
c 3 3.1 0.5