python的apply()函数中的运行时错误

时间:2018-06-09 10:20:44

标签: python python-3.x pandas runtime-error

我正在Coursera上做ML课程

当我运行以下命令时

 sf['Country'] = sf['Country'].apply(transform_country)

以下是我得到的错误

RuntimeError                              Traceback (most recent call last)
<ipython-input-10-e97a176c3eea> in <module>()
----> 1 sf['Country'] = sf['Country'].apply(transform_country)

F:\Anaconda2\envs\gl-env\lib\site-packages\graphlab\data_structures\sarray.pyc in apply(self, fn, dtype, skip_undefined, seed)
   1892 
   1893         with cython_context():
-> 1894             return SArray(_proxy=self.__proxy__.transform(fn, dtype, skip_undefined, seed))
   1895 
   1896 

F:\Anaconda2\envs\gl-env\lib\site-packages\graphlab\cython\context.pyc in __exit__(self, exc_type, exc_value, traceback)
     47             if not self.show_cython_trace:
     48                 # To hide cython trace, we re-raise from here
---> 49                 raise exc_type(exc_value)
     50             else:
     51                 # To show the full trace, we do nothing and let exception propagate

RuntimeError: Runtime Exception. Cannot evaluate lambda. Lambda workers cannot not start.

我现在该怎么办?

0 个答案:

没有答案