|
@@ -24,6 +24,7 @@ def soil_bulk_density(arr): #arr为计算过的数组
|
|
|
tRTypeTarget= []
|
|
|
try:
|
|
|
for i in arr['相对极差(%)']:
|
|
|
+
|
|
|
if i > 15 and arr.loc[arr['相对极差(%)'] == i, '土地利用类型'].iloc[0] == '耕地园地':
|
|
|
tRTypeList.append('存疑:耕地园地相对极差>15%。')
|
|
|
tRTypeTarget.append('耕地园地极差。')
|
|
@@ -93,10 +94,10 @@ def soil_bulk_density(arr): #arr为计算过的数组
|
|
|
soilList.append('')
|
|
|
|
|
|
|
|
|
- arr['土壤类型(判断)'] = soilList
|
|
|
+ arr['土壤质地(判断)'] = soilList
|
|
|
for index, row in arr.iterrows():
|
|
|
- if (row['土壤类型(判断)'] != row['土壤质地']) and (not pd.isna(row['土壤质地'])):
|
|
|
- soilContent.append('存疑:土壤质地不一致')
|
|
|
+ if (row['土壤质地(判断)'] != row['土壤质地']) and (not pd.isna(row['土壤质地'])):
|
|
|
+ soilContent.append('存疑:土壤质地填报与判断不一致')
|
|
|
soilContentTarget.append('土壤质地。')
|
|
|
else:
|
|
|
soilContent.append('')
|
|
@@ -118,7 +119,7 @@ def soil_bulk_density(arr): #arr为计算过的数组
|
|
|
|
|
|
pdData = pd.DataFrame({
|
|
|
'审核结果': pd.Series(shenHeList) + pd.Series(tRTypeList) + pd.Series(plusShenHeList) + pd.Series(soilContent) + pd.Series(xSLErr),
|
|
|
- '土壤类型(判断)': soilList,
|
|
|
+ '土壤质地(判断)': soilList,
|
|
|
'异常指标': pd.Series(shenHeTarget) + pd.Series(tRTypeTarget) + pd.Series(plusShenHeTarget) + pd.Series(soilContentTarget) + pd.Series(xSLTarget),
|
|
|
})
|
|
|
return pdData
|
|
@@ -397,9 +398,9 @@ def cation_value(arr):
|
|
|
exchangeableNa.append('')
|
|
|
exchangeableNaTar.append('')
|
|
|
|
|
|
- if ((not pd.isna(row['pH']) and row['pH']<7.5 and row['阳离子交换量Cmol(+)/kg']>row['交换性盐总量Cmol(+)/kg']>row['四大离子之和'] and row['盐基饱和度%']*100 <80 ) or
|
|
|
- ((not pd.isna(row['pH']) and row['pH']>=7.5 and row['交换性盐总量Cmol(+)/kg']==row['四大离子之和'] and (row['盐基饱和度%'] <120 and row['盐基饱和度%'] >80 ))) or
|
|
|
- ((not pd.isna(row['pH']) and row['pH']<6 and row['盐基饱和度%'] >80))
|
|
|
+ if ((not pd.isna(row['pH']) and row['pH']<7.5 and row['阳离子交换量Cmol(+)/kg']>row['交换性盐总量Cmol(+)/kg']>row['四大离子之和'] and row['盐基饱和度%']*100 <100 ) or
|
|
|
+ ((not pd.isna(row['pH']) and row['pH']>=7.5 and row['交换性盐总量Cmol(+)/kg']==row['四大离子之和'] and (row['盐基饱和度%']*100 <120 and row['盐基饱和度%']*100 >80 )))or
|
|
|
+ ((not pd.isna(row['pH']) and row['pH']<6 and row['盐基饱和度%'] >80))
|
|
|
):
|
|
|
summaryList.append('')
|
|
|
summaryListTar.append('')
|
|
@@ -534,8 +535,8 @@ def eight_ion_coun(arr, summary):
|
|
|
|
|
|
|
|
|
|
|
|
- if row['pH'] <8 and not pd.isna(row['水溶性碳酸根离子含量cmol(1/2CO32+)/kg']) and row['水溶性碳酸根离子含量cmol(1/2CO32+)/kg'] == 0:
|
|
|
- phCoArr.append('水溶性碳酸根:pH<8且水溶性碳酸根为0。')
|
|
|
+ if row['pH'] <8 and not pd.isna(row['水溶性碳酸根离子含量cmol(1/2CO32+)/kg']) and row['水溶性碳酸根离子含量cmol(1/2CO32+)/kg'] != 0:
|
|
|
+ phCoArr.append('水溶性碳酸根:pH<8水溶性碳酸根不为0。')
|
|
|
phCoArrTar.append('水溶性碳酸根。')
|
|
|
else:
|
|
|
phCoArr.append('')
|