'E:\Download\Anaconda3\Scripts\pip-script.py' is not present.报错原因:卸载了pip后如何安装pip【更新pip时发生】
参考链接: https://blog.csdn.net/weixin_46088071/article/details/107656035
没有pip怎么用pip安装pip?
没有pip也能安装pip,如下:
(base) C:\Users\admin>pip install pip
Cannot open E:\Anaconda3\Scripts\pip-script.py
(base) C:\Users\admin>E:
(base) E:>
(base) E:>cd E:\Anaconda3\Scripts
(base) E:\Anaconda3\Scripts>
(base) E:\Anaconda3\Scripts>easy_install pip
Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['E:\\Download\\Anaconda3\\lib\\site-packages\\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.报错原因:numpy版本冲突
先卸载numpy: pip uninstall numpy
再卸载numpy,直到卸载到提示信息显示,此时完全已经没有numpy了为止。
在安装所需版本的numpy:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy==1.16.1
Matplotlib requires numpy>=1.17; you have 1.16.1报错原因:numpy版本不对
卸载numpy:pip uninstall numpy
重新安装需要的版本:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy==1.18.2
float division by zero报错原因:除数为0
数据处理: data = data.fillna(method=‘ffill’)
You are trying to merge on object and int64 columns. If you wish to proceed you should use pd.concat报错原因: merge的第一个参数是字符串类型,转化成int
例如:df1[‘a’] = df1[‘a’].astype(int)
将合并关键字转化格式就行,对整个表转格式会出现第二个报错。
TypeError: int() argument must be a string, a bytes-like object or a number, not ‘NoneType’
operands could not be broadcast together with shapes (82,) (82,2)报错原因:数据格式不对
函数可调用的数据是(82,1),传入数据是(82,2)
检查数据是否有重合项。
Object of type 'int32/int64/ndarray' is not JSON serializable报错原因:json不认numpy的array
参考链接: https://blog.csdn.net/qq_29592829/article/details/100162574
使用tolist()方法将array转换成list