logo
Loading...

Day 5 提取column或row - Cupoy

我用head() 找出部分的資料後,不知道該怎麼把裡面的資料以column或row的方式提取出來,好...

ml100-2,column,row,ml100-2-d05

Day 5 提取column或row

2019/04/24 上午 00:42
機器學習共學討論版
樓宗翰
觀看數:2
回答數:1
收藏數:0
ml100-2
column
row
ml100-2-d05

我用head() 找出部分的資料後,不知道該怎麼把裡面的資料以column或row的方式提取出來,好像也沒辦法直接搜索label,感謝!

btw 想直接提取一個行或列出來,然後用已經有的label直接用d[''].mean 去做

回答列表

  • 2019/04/24 上午 01:01
    張維元 (WeiYuan)
    贊同數:1
    不贊同數:0
    留言數:0

    嗨,DataFrame 取資料的幾種用法:


    1. df[...] => 用 Column 取

    2. df[... : ...] => 用 row 取

    3. df.loc[..., ...]、df.iloc[..., ...]、df.lx[..., ...] => 用 row & Column 取