how to make 1 by n dataframe from series in pandas?

后端 未结 1 1692
栀梦
栀梦 2021-01-13 10:32

I have a huge dataframe, and I index it like so:

df.ix[]

Depending on the index, sometimes this will have only one row of values.

1条回答
  •  时光取名叫无心
    2021-01-13 11:07

    You can do df.ix[[n]] to get a one-row dataframe of row n.

    0 讨论(0)
提交回复
热议问题