救援總結

Python 的資料科學入門

Hillary Green-Lerman

Lead Data Scientist, Looker

你做到了!

Python 的資料科學入門

模組與變數

  • 模組用來彙整函式
  • import 加入模組
  • import 放在腳本開頭
  • 變數儲存資料:字串或浮點數
import pandas as pd
import numpy as np

Python 的資料科學入門

使用函式

  • 執行一項任務
  • 位置引數
  • 關鍵字引數

Python 的資料科學入門

處理表格資料

  • import pandas as pd
  • DataFrame 儲存表格資料
  • .head().info() 檢視資料
  • 用邏輯選取列
credit_reports[
    credit_report.suspect ==
    'Freddy Frequentist']

Python 的資料科學入門

建立折線圖

  • from matplotlib import pyplot as plt
  • plt.plot() 繪折線圖
  • 以關鍵字引數調整折線圖
  • 加上標籤與圖例

Python 的資料科學入門

更多圖表類型

  • plt.scatter() 顯示個別資料點
  • plt.bar() 建立長條圖
  • plt.hist() 呈現分布

Python 的資料科學入門

做得很好!

Python 的資料科學入門

Preparing Video For Download...