read.cash Log in
h@hbkedge

龍家俊教你 機器學習 day55 Series的屬性 為了更方便地操作Series對像中的索引和數據,Series中提供了兩個屬性index和values index color_count.index color_count = pd.Series({'red':100, 'blue':200, 'green': 500, 'yellow':100}) # 結果 Index(['blue', 'green', 'red', 'yellow'], dtype='object') values color_count.values # 結果 array([ 200, 500, 10, 100]) 也可以使用索引來獲取數據: color_count[2] # 結果 10

No comments yet

Log in to join in Reading is open to everyone. Replying needs an account.