中国建设银行官方网站诚聘英才频道,物联网平台层的主要功能,仿做网站可以整站下载器吧,网站建设实用教程目录 1.2 结合玻璃的类型,分析文物样品表面有无风化化学成分含量的统计规律数据预处理绘图热力图相关系数图百分比条形图箱线图小提琴图直方图KED图描述性统计分析偏度系数峰度系数其它统计量1.2 结合玻璃的类型,分析文物样品表面有无风化化学成分含量的统计规律 数据预处理 … 目录 1.2 结合玻璃的类型,分析文物样品表面有无风化化学成分含量的统计规律数据预处理绘图热力图相关系数图百分比条形图箱线图小提琴图直方图KED图 描述性统计分析偏度系数峰度系数其它统计量 1.2 结合玻璃的类型,分析文物样品表面有无风化化学成分含量的统计规律 数据预处理
# replace na with 0
d2 = d2.fillna(0)
# sum by rows
d2['rowSum'] = d2.iloc[:,1:15].sum(axis=1)# add 文物编号 through subset 文物采样点
res = []
for i in range(d2.shape[0]):res.append(d2.iloc[:,0][i][0:2])
d2['文物编号'] = res
d2['文物编号'] = d2['文物编号'].astype(int)print('the max value is:', max(d2['rowSum']))# select the effective data with sums in the range of 85~105
my_index = d2['rowSum'] = 85
# return the index with ture
d2_sub = d2.loc[my_index,:]print(d2.shape[0] - d2_sub.shape[0], 'rows are removed')the max value is: 100.0
2 rows are removed# marge d1 and d2_sub
d12 = pd.merge(d1, d2_sub, on='文物编号')res = []
for i in range(d12.shape[0]):res.append(d12.iloc[i,5][2:])for i in range(len(res)):if res[i] == '' or res[i] == '部位1' or res[i] == '部位2':res[i] = '其它'for i in range(len(res)):if res[i] == '未风化点1' or res[i] == '未风化点2':res[i] = '未风化点'd12['风化标记'] = resd12.head(3)文物编号纹饰类型颜色表面风化文物采样点二氧化硅(SiO2)氧化钠(Na2O)氧化钾(K2O)氧化钙(CaO)...氧化铁(Fe2O3)氧化铜(CuO)氧化铅(PbO)氧化钡(BaO)五氧化二磷(P2O5)氧化锶(SrO)氧化锡(SnO2)二氧化硫(SO2)rowSum风化标记01C高钾蓝绿无风化0169.330.09.996.32...1.743.870.000.01.170.000.00.3997.61其它12A铅钡浅蓝风化0236.280.01.052.34...1.860.2647.430.03.570.190.00.0099.89其它23A高钾蓝绿无风化03部位187.050.05.192.01...0.000.780.250.00.660.000.00.00100.00其它3 rows × 22 columns
绘图
热力图
import numpy as np
np.bool = np.bool_d12_K_no_wind = d12.iloc[np.where((d12['类型'] == '高钾') (d12['表面风化'] == '无风化'))[0],:]
d12_K_wind = d12.iloc[np.where((d12['类型'] == '高钾') (d12['表面风化'] == '风化'))[0],:]
d12_Pb_no_wind = d12.iloc[np.where((d12['类型'] == '铅钡') (d12['表面风化'] == '无风化'))[0],:]
d12_Pb_wind = d12.iloc[np.where((d12['类型'] == '铅钡') (d12['表面风化'] == '风化'))[0],:]d12_K_no_wind.index = range(d12_K_no_wind.shape[0])
d12_K_wind.index = range(d12_K_wind.shape[0])
d12_Pb_no_wind.index = range(d12_Pb_no_wind.shape[0])
d12_Pb_wind.index = range(d12_Pb_wind.shape[0])fig = px.imshow(d12_K_no_wind.iloc[:,6:20], text_auto=True, title="高钾 表面未风化")
# set figute size
fig.update_layout(autosize=False, width=700, height