依索引進行合併

給試算表使用者的 pandas 合併實務

John Miller

Principal Data Scientist

Pandas 索引

$$

  • 一般數字索引

數值索引

$$

  • 客製多層索引

客製索引

給試算表使用者的 pandas 合併實務

依索引合併

$$

DataFrame.join(other, how='')

  • 類似以欄合併的 merge
  • 預設以索引合併
  • 可一次合併多個資料框

df.join([df2, df3], how='')

pandas hanging out

給試算表使用者的 pandas 合併實務

一起來練習吧!

給試算表使用者的 pandas 合併實務

Preparing Video For Download...