Try   HackMD

24. Python Pandas 資料分析 - 基礎教學 By 彭彭

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

什麼是Pandas?: 概念類似試算表的資料分析套件

基礎學習項目

  1. 安裝Pandas套件
  • 準備環境:PIP套件管理工具:安裝Python時,就一起安裝在你的電腦裡了
  • 安裝Pandas:pip3 install pandas
  1. 認識單維度的資料 Series
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    圖片出自於影片中2:52
  • 建立series
  • 載入Pandas模組
    import pandas as pd
    以列表資料為底,建立Series
    pd.Series(列表)
  • 使用Series
    import pandas as pd
    data=pd.Series(列表)
    data.max() >找到最大值
    data.median >計算中位數
    data=data*2 >放大兩倍
  1. 認識雙維度的資料 DataFrame

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

圖片為影片中4:54

  • 建立DataFrame
  • 載入Pandas模組
    import pandas as pd
    以字典資料為底 建立DataFrame
    pd.DataFrame(字典)
  • 取得特定欄(直向)
    import pandas as pd
    data=pd.DataFrame(字典)
    data["欄位名稱"]
  • 取得特定欄(橫向)
    import pandas as pd
    data=pd.DataFrame(字典)
    data.iloc[列編號] 列編號按順序由0開始累加

End