Is it possible to append Series to rows of DataFrame without making a list first?

前端 未结 6 1549
萌比男神i
萌比男神i 2021-02-01 01:07

I have some data I\'m trying to organize into a DataFrame in Pandas. I was trying to make each row a Series and append it to the Da

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-01 01:30

    Convert the series to a dataframe and transpose it, then append normally.

    srs = srs.to_frame().T
    df = df.append(srs)
    

提交回复
热议问题