47. 分析師想將 customers 表中的 Region 欄位加入到 df 交易紀錄中,且「只保留那些在 customers 表中有對應資料的交易紀錄」。下列哪一種合併方式最正確?
(A) pd.concat([df, customers], axis=1);
(B) pd.merge(df, customers, on='CustomerID', how='outer');
(C) pd.merge(df, customers, on='CustomerID', how='inner');
(D) df.join(customers, on='CustomerID') 

答案:登入後查看
統計: A(1), B(0), C(9), D(2), E(0) #3934408

詳解 (共 1 筆)

#7571568
考點觀念 本題在測驗 Pandas 中表...
(共 1502 字,隱藏中)
前往觀看
0
0