python - python的apply()函数中的运行时错误
问题描述
我正在 Coursera 上学习机器学习课程
当我运行以下命令时
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.
现在我该怎么做 ?
解决方案
推荐阅读
- python - 计算多索引 pandas pivot 中的列和索引中的值
- ios - 将 Xib 帧大小添加为子视图时不正确
- php - 在 SQL 中查找剥离的电子邮件
- android - 尝试以不同的方式显示日期
- php - PHP计算UTC时间错误
- android - 如何从用户在 Android 应用中输入的短信地址读取短信?
- api - 请求/获取访问 API 的访问令牌 (Auth0)
- python - Python代码检查给定二叉树是否为BST的问题
- wordpress - 致命错误:在第 487 行调用 /home/wadsam5/public_html/dari/wp-content/plugins/wordpress-seo/wp-seo-main.php 中未定义的函数 wp_installing()
- javascript - 用一个值组合两个对象