pandas 直接 计算 多列 两列

df[['neg','pos']] = (df.apply(lambda x:get_polarity_scores(x['Text']),axis=1)).apply(pd.Series)

 

posted @ 2023-05-10 16:42  cup_leo  阅读(43)  评论(0编辑  收藏  举报