Exercise

探索資料框

我們可以使用幾個好用的函數來快速探索一個資料框:

  • dim() 函數
  • head() 函數
  • tail() 函數
  • str() 函數
  • summary() 函數

dim() 函數會回傳資料框的列數與欄數;head() 函數會回傳資料框的前六列;tail() 函數會回傳資料框的後六列;str() 函數不僅會列出資料框的觀察值個數與變數個數,還會列出每個欄位的資料類型以及前幾個觀測值;summary() 函數會回傳量值型變數的敘述性統計資料,以及類別型變數的屬性資料。

Instructions

100 XP
  • 使用這 5 個好用的函數探索已經載入工作環境的 straw_hat_df。