0

I have dataframe as given below. I wanted to save it in csv file with the result given below. Kindly help to solve it.

    df = pd.DataFrame(results)
    print(df)

    First              Second
    ID1                value1
    ID2                value2
    ID3                value3
    ID1                value4
    ID2                value5
    ID3                value6
    ID1                value7
    ID2                value8
    ID3                value9

I would like to have the result as:

    ID1         ID2           ID3
    value1      value2        value3
    value4      value5        value6
    value7      value8        value9
Rashmi
  • 49
  • 5

0 Answers0