![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
itw_wang
itwangxw
展开
-
Exception: Python in worker has different version 2.7 than that in driver 3.5, PySpark cannot run wi
出现上述错误是环境变量设置有误,下面为修改方法方法1.在py代码中import os修改环境变量:此方法不行可以看方法2import osPYSPARK_PYTHON = /home/piting/ENV/anaconda3/bin/pythonos.environ["PYSPARK_PYTHON"] = PYSPARK_PYTHON方法2.有时如果你使用的是虚拟环境或者ana...原创 2018-11-13 00:18:25 · 6445 阅读 · 0 评论 -
python pandas取交集、并集、差集
对于colums都相同的dataframe做过滤的时候例如:df1 = DataFrame([['a', 10, '男'], ['b', 11, '男'], ['c', 11, '女'], ['a', 10, '女'], ['c', 11, '男']...原创 2019-07-09 18:11:35 · 25892 阅读 · 0 评论