第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

查找數(shù)據(jù)框中列表中的最后一個(gè)值

查找數(shù)據(jù)框中列表中的最后一個(gè)值

猛跑小豬 2021-09-11 17:57:34
拜托,我想在數(shù)據(jù)框中找到客戶端中的最后一個(gè)值,我該怎么做?例子 :df = pd.DataFrame({'date':     ['2018-06-13', '2018-06-14', '2018-06-15', '2018-06-16'],    'gain': [[10, 12, 15],[14, 11, 15],[9, 10, 12], [6, 4, 2]],    'how':  [['customer1', 'customer2', 'customer3'],             ['customer4','customer5','customer6' ],            ['customer7', 'customer8', 'customer9'],            ['customer5', 'customer6', 'customer10'] ]}   df :            date       gain                    how    0 2018-06-13  [10, 12, 15]    [customer1, customer2, customer3]    1 2018-06-14  [14, 11, 15]    [customer4, customer5, customer6]    2 2018-06-15  [9, 10, 12]     [customer7, customer8, customer9]    3 2018-06-16  [6, 4, 2]       [customer5, customer6, customer10]I want to do a function that returns the last gain in the dataframe.example : for the customer5 = 6 for the customer4 = 14 for the customer20 = 'not found' 太感謝了
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 172 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)