AttributeError: 'list' object has no attribute 'squeeze'
时间: 2023-10-04 12:03:38 浏览: 154
python报错: 'list' object has no attribute 'shape'的解决
5星 · 资源好评率100%
AttributeError: 'list' object has no attribute 'squeeze'错误是因为在列表对象上调用了squeeze()方法,而列表对象并没有squeeze()方法。squeeze()方法是Pandas库中Series和DataFrame对象的方法,用于删除维度为1的轴。如果你要使用squeeze()方法,你需要将列表对象转换为Series或DataFrame对象。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [在Python学习中常见的错误](https://blog.csdn.net/UserAgent123/article/details/80989321)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [python报错: list object has no attribute shape的解决](https://download.csdn.net/download/weixin_38748721/13708867)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文