1. 首页
  2. 数据库
  3. 其它
  4. python报错: list object has no attribute shape的解决

python报错: list object has no attribute shape的解决

上传者: 2020-12-23 07:04:19上传 PDF文件 75.55KB 热度 34次
numpy.array可使用 shape。list不能使用shape。 可以使用np.array(list A)进行转换。 (array转list:array B B.tolist()即可) 补充知识:Pandas使用DataFrame出现错误:AttributeError: ‘list’ object has no attribute ‘astype’ 在使用Pandas的DataFrame时出现了错误:AttributeError: ‘list’ object has no attribute ‘astype’ 代码入下: import pandas as pd pop = {'Neva
下载地址
用户评论