您好,我有一个数据集,如下所示:
array([['1;"Female";133;132;124;"118";"64.5";816932'],
['2;"Male";140;150;124;".";"72.5";1001121'],
['3;"Male";139;123;150;"143";"73.3";1038437'],
['4;"Male";133;129;128;"172";"68.8";965353'],
['5;"Female";137;132;134;"147";"65.0";951545'],
['6;"Female";99;90;110;"146";"69.0";928799'],
['7;"Female";138;136;131;"138";"64.5";991305']], dtype=object)
我想将is转换为具有以下列的数据帧
columns = ["Gender";"FSIQ";"VIQ";"PIQ";"Weight";"Height";"MRI_Count"]
NB:从数组列表中,行值分隔符是分号(;)。请帮助我将其组织到具有列名和数组中的行值的数据帧中
为新列创建} 和
DataFrame
和^{expand=True
:最后一些数据清理-通过^{} 删除} 和^{} 将列转换为数字:
""
,并通过^{另一个可能的解决办法是使用^{} 和^{} 。仅使用^{cd4>}字符^{} 数组中的每个元素:
[外]
pandas
应该能很好地解释数据类型相关问题 更多 >
编程相关推荐