import pandas
as pd
import numpy
as np
from sklearn
.utils
import shuffle
xlsx1_filePath
= 'D:/study/radiomics/data/breast_cancer1.xlsx'
xlsx2_filePath
= 'D:/study/radiomics/data/breast_cancer2.xlsx'
data_1
= pd
.read_excel
(xlsx1_filePath
)
data_2
= pd
.read_excel
(xlsx2_filePath
)
rows
,cols
= data_1
.shape
print(rows
,cols
)
data_1
.head
()
data_1
.columns
data_1
.insert
(0,'lable1',[1]*rows
)
data_1
.head
()
rows_2
,cols_2
=data_2
.shape
data
=pd
.concat
([data_1
,data_2
])
data
=shuffle
(data
)
data
['FrequencySize']=np
.nan
data
=data
.fillna
(0)
data
[['列名称1','列名称2']]
data
[0:2]
data
.iloc
[1:4,3:6]
进阶(数据类型)
a
=1
b
=1.0
print(type(a
))
print(type(b
))
c
=’
1’
d
=’
1.0’
print(type(c
))
print(type(d
))
e
=true
f
=false
print(type(e
))
print(type(f
))
x
=1
y
=2
z
=x
x
=y
y
=z
print(x
,y
)
转载请注明原文地址:https://tech.qufami.com/read-18521.html