健行科技大學eclass易課平台
×
登入
  • 回學校
    • 健行科技大學 首頁
    • 招生資訊
    • 電資學院
    • 工程學院
    • 商管學院
    • 民生創意學院
    • 通識教育中心
  • 手機版
  • 系統教學
    • 功能特色
    • 線上教學
    • 翻轉教學應用分享
  • 開放課程
位置: 進階程式設計 > 教材 > pandas dataframe與爬蟲黃金價格資訊講義 > 最新的回應
最新的回應
發表人討論發表時間
c11333119
df = df.set_index('日期')13 小時前
c11333138
df.set_index('日期', inplace=True)17 小時前
C11333141
df.set_index('日期', inplace=True) 使用 set_index() 方法19 小時前
c11333123
df.set_index('日期', inplace=True)19 小時前
C11333142
df.set_index('日期', inplace=True)20 小時前
c11333134
df = df.set_index('日期')20 小時前
c11334197
df.set_index('日期', inplace=True)20 小時前
C11333107
在 Pandas DataFrame 中,若要將某一個欄位指定為新的索引並取代原本的預設索引(0, 1, 2, ...),應使用 set_index() 方法20 小時前
c11333147
在 Pandas 中,如果你想將現有欄位(例如 '日期')設為索引並 取代原本的預設索引,可以使用 set_index 方法: df = df.set_index('日期') 或者如果你不想建立新的 DataFrame,而是直接在原本的 DataFrame 修改,可以加上 inplace=True: df.set_index('日期', inplace=True) set_index:將指定欄位設為索引 inplace=True:直接修改原本的 DataFrame,而不是返回新的 DataFrame 這樣原本的預設索引(0, 1, 2, …)就會被 '日期' 欄位取代。21 小時前

©Copyright  健行科技大學 Chien Hsin University of Science and Technology All rights reserved.
本網站僅作學術研究用途,不得從事商業用途,請尊重智慧財產權,避免任何侵權行為,勿上傳/下載未經授權之檔案資料。
Please respect the intellectual property rights.