![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
小陈要养发
这个作者很懒,什么都没留下…
展开
-
求矩阵的鞍点
求矩阵的鞍点,代码如下:import numpy as np A = np.array(((9, 80, 205, 40), (90, -60, 96, 1), (210, -3, 101, 89))) print(A) for i in range(len(A)): a = A[i] r_max = max(a) a = a.tolist() 如果缺少a=a.tolist(),会发生报错'numpy.ndarray' object has no attribute 'index'原创 2022-08-03 22:37:55 · 84 阅读 · 0 评论 -
‘utf-8‘ codec can‘t decode byte 0xd4 in position 98: invalid continuation byte 报错解决方案
在运行以下代码读取文件时时发生报错,'utf-8' codec can't decode byte 0xd4 in position 98: invalid continuation byte 代码如下: import pandas as pd # 读csv文件 ds = pd.read_csv('nba.csv') print(ds.to_string()) 最终找到解决方案 ............原创 2022-07-28 17:15:10 · 478 阅读 · 0 评论