📌  相关文章
📜  pandas 更改多种列类型 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:11.086000             🧑  作者: Mango

代码示例2
#Method 1:
df["Delivery Charges"] = df[["Weight", "Package Size", "Delivery Mode"]].apply(
  lambda x : calculate_rate(*x), axis=1)

#Method 2:
df["Delivery Charges"] = df.apply(
  lambda x : calculate_rate(x["Weight"], 
  x["Package Size"], x["Delivery Mode"]), axis=1)