问题描述
data_a = pd.read_excel("D://thesis//LapGyn4_v1.0//Surgical_Actions//mydata2.xlsx")
data_a
cols1 = data_a.columns
corrList = []
labels = data_a.iloc[:,1200]
a1 = np.corrcoef(data_a.iloc[:,0],labels)
print(a1[0,1])
for i in range(data_a.shape[1]):
a1 = np.corrcoef(data_a.iloc[:,i],labels)
corrList.append(a1[0,1])
a1 = range((1200))
lists = [a1,corrList]
df = pd.concat([pd.Series(x) for x in lists],axis=1)
df.iloc[:,1] = abs(df.iloc[:,1])
df2 = df[df.iloc[:,1]>0.18]
print(df2.shape)
df2.iloc[(df2.shape[0]-1),0] = 1200
allData3 = data_a.iloc[:,df2.iloc[:,0].astype(int)]
allData3.to_csv('D://thesis//LapGyn4_v1.0//Surgical_Actions//reduceddata2.csv',index=False)
这是我的代码,我对此问题有此错误 enter image description here
TypeError:/:'str'和'int'的不受支持的操作数类型
我该如何解决? 我想通过使用与此代码的相关性来进行功能简化,但是我收到此错误: TypeError:/的不支持的操作数类型:“ str”和“ int”
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)