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

python的apply()函数中存在运行时错误,python,python-3.x,pandas,runtime-error,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['Count

我正在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.
运行时错误回溯(最近一次调用)
在()
---->1 sf['Country']=sf['Country']。申请(转换国家)
应用中的F:\Anaconda2\envs\gl env\lib\site packages\graphlab\data\u structures\sarray.pyc(self、fn、dtype、skip\u undefined、seed)
1892
1893年,与cython_context()一起:
->1894返回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\uuuuu退出(self,exc\u类型,exc\u值,回溯)
47如果不是self.show\u cython\u trace:
48#为了隐藏cython的踪迹,我们从这里升起
--->49提升exc_类型(exc_值)
50其他:
51#为了显示完整的跟踪,我们什么也不做,让异常传播
RuntimeError:运行时异常。无法计算lambda。Lambda workers无法启动。

我现在该怎么办?

我们是否假设您在Cython使用熊猫?向我们展示您的
transform\u country
方法代码。