当我跑步时
df=[]
DataTab['scores'] = DataTab['headline_text'].apply(lambda x: vader.polarity_scores(x))
DataTab.head()
我得到这个错误
*---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-248-157ec346f35d> in <module>
1 df=[]
----> 2 DataTab['scores'] = DataTab['headline_text'].apply(lambda x: vader.polarity_scores(x))
3 DataTab.head()
~\Anaconda3\lib\site-packages\pandas\core\series.py in apply(self, func, convert_dtype, args, **kwds)
4040 else:
4041 values = self.astype(object).values
-> 4042 mapped = lib.map_infer(values, f, convert=convert_dtype)
4043
4044 if len(mapped) and isinstance(mapped[0], Series):
pandas\_libs\lib.pyx in pandas._libs.lib.map_infer()
<ipython-input-248-157ec346f35d> in <lambda>(x)
1 df=[]
----> 2 DataTab['scores'] = DataTab['headline_text'].apply(lambda x: vader.polarity_scores(x))
3 DataTab.head()
TypeError: polarity_scores() missing 1 required positional argument: 'text'*
请帮助我应该安装或更改什么