随笔分类 - python
centOS 使用lxml.etree 模块报错 ImportError: cannot import name etree
摘要:最近用python的lxml库解析了个html文件,在windows python3.8下面运行没什么问题,但是在centOS python2.7环境下一直报错 ImportError: cannot import name etree 网上有人说lxml版本不一样,有的没带etree模块,所以我准
阅读全文
python pandas DataFrame 清除非数字类型、重新索引
摘要:将DataFrame格式的数据中不是数字类型的去掉并重新索引: 首先将所有的值都转成整数字类型 df['io']=pd.to_numeric(df['io'],'coerce') df['res']=pd.to_numeric(df['res'],'coerce') coerce是将不能转为数字类型
阅读全文
浙公网安备 33010602011771号