艾歐踢論壇

標題: pandas index,rename,add a column [打印本頁]

作者: admin    時間: 2023-4-15 22:07
標題: pandas index,rename,add a column
  1. data.set_index("Film" , inplace=True)
  2. data.reset_index(inplace=True)
複製代碼
  1. df = df.assign(F = df.C * 10)
複製代碼

  1. data.rename(columns = {'test':'TEST'}, inplace = True)
複製代碼








歡迎光臨 艾歐踢論壇 (http://www.iot.idv.tw/ucenter/) Powered by Discuz! X3.2