Q:

How can I change the structure of a dataframe? 

How can I change the structure of a dataframe?   I need series data of each row.  I tried unstack but failed. 
Example dataframe:
    df:

        c1   c2     c3

   0     a     b     c
   1     d     e     f

Output Series:
S1 
0   a
1   b
2   c

S2
0   d
1   e
2   f

A:

You can transpose the data frame, and, if you so like, rename the indices, to a range:
dfT = df. T
dfT.index = pd. RangeIndex(dfT.shape[0]) # Rename the indicies
dfT.columns=['S{}'.format(i+1) for i in range(dfT.shape[1])] # Rename the columns
dfT.unstack()

