"matrix""array"无法转换dataframe
时间: 2023-08-27 08:12:26 浏览: 71
要将"matrix"或"array"转换为dataframe,可以使用以下方法:
1. 将matrix转换为dataframe:可以使用pandas的DataFrame函数,将matrix作为输入参数传递给该函数即可。例如,使用"test_mat"作为matrix,可以使用以下代码将其转换为dataframe:test = pd.DataFrame(test_mat)。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [【python】dataframe,array,matrix之间的转换和存储](https://blog.csdn.net/qq_40855100/article/details/111460538)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [【python】dataframe和array相互转换](https://blog.csdn.net/weixin_46713695/article/details/126284086)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文