使用numpy在python中将表行转换为数组

2024-09-28 20:58:18 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用Python中的numpy将表行转换为数组。
例如:

table_attributes.row(3)
Row(Hemoglobin=0.5961076648232668, Glucose=-0.19065363034327712)

np.array(table_attributes.row(3))

我得到的错误是:

tuple.index(x): x not in tuple

你能帮我做一下转换吗?谢谢


Tags: innumpyindex错误nptablenot数组