V2EX-pandas 怎么在函数里,调用当前行索引值?

mfanming: #函数体
def wordsep(df_word):
df.loc[df_word.index,['主体']] = '' <------------------这一行
return result

#调用
df['分词'] = df.apply(wordsep,axis=1)

from V2EX-最新主题 https://ift.tt/3iSEHzG

本文地址:https://niul.net/53139.html
牛C网:https://niuc.net
零九导航:https://09.gay
牛C网导航:https://9i1.net
福利APP中心:https://app.niuc.net
福利APP合集:https://niuc.net/share/1678.html
THE END
分享
二维码
< <上一篇
下一篇>>