Procházet zdrojové kódy

修改合并存疑表格出现的问题,处理public中土壤类型及阳离子交换量内容

Kejl před 3 týdny
rodič
revize
702c65c67f
2 změnil soubory, kde provedl 57 přidání a 56 odebrání
  1. 22 22
      public.py
  2. 35 34
      rongzhong.py

+ 22 - 22
public.py

@@ -197,120 +197,120 @@ def soilTypeValue(row): # 传入一行数据
     # 判断三者范围是否合理
     res = ''
     if soilType == '黄红壤':
-        if pd.isna(cationChange) and (cationChange > 10 and cationChange<24) and  pd.isna(bHValue) and (bHValue > 30 and bHValue<50):
+        if (not pd.isna(cationChange)) and (cationChange > 10 and cationChange<24) and (not pd.isna(bHValue)) and (bHValue > 30 and bHValue<50):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '棕红壤':
-        if pd.isna(cationChange) and (cationChange > 6 and cationChange < 15) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 6 and cationChange < 15) and (not pd.isna(bHValue)) and (
                 bHValue > 25 and bHValue < 70):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '红壤性土':
-        if pd.isna(cationChange) and (cationChange > 5 and cationChange < 15) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 5 and cationChange < 15) and (not pd.isna(bHValue)) and (
                 bHValue > 10 and bHValue < 50):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '典型黄壤':
-        if pd.isna(cationChange) and (cationChange > 5 and cationChange < 15) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 5 and cationChange < 15) and not(pd.isna(bHValue)) and (
                  bHValue < 30):
             res = ''
         else:
             res = '该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '黄壤性土':
-        if pd.isna(cationChange) and (cationChange > 10 and cationChange < 18) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 10 and cationChange < 18) and (not pd.isna(bHValue)) and (
                  bHValue < 45):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '典型黄棕壤' or soilType == '暗黄棕壤' or soilType == '黄棕壤性土':
-        if pd.isna(cationChange) and (cationChange > 8 and cationChange < 22) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 8 and cationChange < 22) and (not pd.isna(bHValue)) and (
                 bHValue > 30 and bHValue < 60):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '典型黄褐土' or soilType == '黏盘黄褐土' or soilType == '粘盘黄褐土' or soilType == '粘盘黄褐土' or soilType=='白浆化黄褐土' or soilType=='黄褐土性土':
-        if pd.isna(cationChange) and (cationChange > 15 and cationChange < 25) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 15 and cationChange < 25) and (not pd.isna(bHValue)) and (
                 bHValue > 60 and bHValue < 85):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '粘盘黄褐土':
-        if pd.isna(cationChange) and (cationChange > 10 and cationChange < 30) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 10 and cationChange < 30) and (not pd.isna(bHValue)) and (
                 bHValue > 75 and bHValue < 95):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '典型棕壤' or soilType == '白浆化棕壤' or soilType == '潮棕壤' or soilType == '棕壤性土' or soilType == '棕壤性土':
-        if pd.isna(cationChange) and (cationChange > 5 and cationChange < 20) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 5 and cationChange < 20) and (not pd.isna(bHValue)) and (
                 cationChange > 25 and cationChange < 65):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '典型山地草甸土' or soilType == '山地草原草甸土' or soilType == '山地灌丛草甸土':
-        if pd.isna(cationChange) and (cationChange > 10 and cationChange < 20) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 10 and cationChange < 20) and (not pd.isna(bHValue)) and (
                 bHValue > 15 and bHValue < 30):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '酸性紫色土' or soilType == '中性紫色土' or soilType == '石灰性紫色土':
-        if pd.isna(cationChange) and (cationChange > 10 and cationChange < 20) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 10 and cationChange < 20) and (not pd.isna(bHValue)) and (
                 bHValue > 50 and bHValue < 70):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '红色石灰土' or soilType == '黑色石灰土' or soilType == '棕色石灰土' or soilType == '黄色石灰土' :
-        if pd.isna(cationChange) and (cationChange > 15 and cationChange < 30) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 15 and cationChange < 30) and (not pd.isna(bHValue)) and (
                 bHValue > 70 and bHValue < 100):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '酸性石质土' or soilType == '中性石质土' or soilType == '钙质石质土' or soilType == '含盐石质土':
-        if pd.isna(cationChange) and (cationChange > 10 and cationChange < 15) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 10 and cationChange < 15) and (not pd.isna(bHValue)) and (
                 bHValue > 45 and bHValue < 65):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '酸性粗骨土' or soilType == '中性粗骨土' or soilType == '钙质粗骨土' or soilType == '硅质盐粗骨土':
-        if pd.isna(cationChange) and (cationChange > 5 and cationChange < 15) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 5 and cationChange < 15) and (not pd.isna(bHValue)) and (
                 bHValue > 20 and bHValue < 50):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '典型潮土' or soilType == '灰潮土' or soilType == '脱潮土' or soilType == '湿潮土' or soilType == '盐化潮土' or soilType == '碱化潮土' or soilType == '灌於潮土':
-        if pd.isna(cationChange) and (cationChange > 10 and cationChange < 30) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 10 and cationChange < 30) and (not pd.isna(bHValue)) and (
                 bHValue > 70 and bHValue < 100):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '典型砂姜黑土' or soilType == '石灰性砂姜黑土' or soilType == '盐化砂姜黑土' or soilType == '碱化砂姜黑土' or soilType == '黑粘土':
-        if pd.isna(cationChange) and (cationChange > 18 and cationChange < 35) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 18 and cationChange < 35) and (not pd.isna(bHValue)) and (
                 bHValue > 90 and bHValue < 100):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '淹育水稻土':
-        if pd.isna(cationChange) and (cationChange > 20 and cationChange < 30) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 20 and cationChange < 30) and (not pd.isna(bHValue)) and (
                 bHValue > 85 and bHValue < 90):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '潴育水稻土':
-        if pd.isna(cationChange) and (cationChange > 12 and cationChange < 20) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 12 and cationChange < 20) and (not pd.isna(bHValue)) and (
                 bHValue > 60 and bHValue < 80):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '潜育水稻土':
-        if pd.isna(cationChange) and (cationChange > 15 and cationChange < 25) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 15 and cationChange < 25) and (not pd.isna(bHValue)) and (
                 bHValue > 75 and bHValue < 90):
             res = ''
         else:
             res = '存疑:该土壤类型的阳离子交换量或盐基饱和度范围存疑。'
     elif soilType == '漂洗水稻土':
-        if pd.isna(cationChange) and (cationChange > 10 and cationChange < 20) and pd.isna(bHValue) and (
+        if (not pd.isna(cationChange)) and (cationChange > 10 and cationChange < 20) and (not pd.isna(bHValue)) and (
                 bHValue > 65 and bHValue < 80):
             res = ''
         else:
@@ -398,7 +398,7 @@ def cation_value(arr):
                 exchangeableNa.append('')
                 exchangeableNaTar.append('')
             # (8)pH<7.5,阳离子交换量>交换性盐总量>四大离子之和,且盐基饱和度小于100 %;违反则存疑;pH≥7.5,交换性盐总量 = 四大离子之和,盐基饱和度范围在80~120 %;违反则存疑;
-            if ((not pd.isna(row['pH']) and row['pH']<7.5 and row['阳离子交换量Cmol(+)/kg']>row['交换性盐总量Cmol(+)/kg']>row['四大离子之和'] and row['盐基饱和度%']*100 <100 ) or
+            if ((not pd.isna(row['pH']) and row['pH']<7.5 and (row['阳离子交换量Cmol(+)/kg']>row['交换性盐总量Cmol(+)/kg']) and (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))
             ):
@@ -468,7 +468,7 @@ def eight_ion_coun(arr, summary):
                 conductivityTar.append('电导率。')
             else:
                 conductivity.append('')
-                conductivityTar.append('电导率')
+                conductivityTar.append('')
             #(4)水溶性钠在[0.05, 0.5]范围之外的,存疑;
             if (not pd.isna(row['水溶性钠离子含量Cmol(Na+)/kg']) and row['水溶性钠离子含量Cmol(Na+)/kg'] <0.05) or (pd.isna(row['水溶性钠离子含量Cmol(Na+)/kg']) and row['水溶性钠离子含量Cmol(Na+)/kg'] > 0.5):
                 naArr.append('水溶性钠离子:水溶性钠离子超阈值。')

+ 35 - 34
rongzhong.py

@@ -141,7 +141,7 @@ def autoColumns(url):
 # 频度分析函数 公用
 def frequency_analysis(arr):
     qua_2 = arr.quantile(0.02)
-    print(1.55)
+
     qua_5 = arr.quantile(0.05)
     qua_10 = arr.quantile(0.1)
     qua_20 = arr.quantile(0.2)
@@ -152,10 +152,10 @@ def frequency_analysis(arr):
     qua_98 = arr.quantile(0.98)
     min_value = arr.min()
     max_value = arr.max()
-    print(1.6)
+
     median_value = arr.median()  # 中位数
     jc_value = arr.max() - arr.min()  # 极差
-    print(1.7)
+
     std_value = arr.std()  # 标准差
     mean_value = arr.mean()  # 平均数
     variation_value = std_value / mean_value  # 变异系数 = 标准差/均值
@@ -167,7 +167,7 @@ def frequency_analysis(arr):
     # 汇总数据
     data.index = index_value
     data_res = round(data, 2)
-    print('data_res', data_res)
+
     return data_res
 
 # 绘图函数
@@ -280,7 +280,7 @@ def checkData(fileUrl):
         global checkType
         checkType = type
         data = pd.read_excel(fileUrl,converters={'原样品编号': str})
-        print('fileUrl', data['总砷'])
+
         if type == 'OVER_LINE':
             show_error('试用已结束,使用更多请点击下方获取申请码按钮联系管理员!')
         elif type == 'HUNDRED_DATA' or type == 'ALL':
@@ -296,7 +296,7 @@ def checkData(fileUrl):
                 simpleData = data.dropna(subset=['原样品编号'])
                 global originData
                 originData = pd.read_excel(fileUrl, dtype='str')
-                print('originData---', originData)
+
                 simpleData = simpleData[~simpleData['原样品编号'].str.contains('ZK')]
                 simpleData = simpleData.replace(r'[^.\w]+', '', regex=True)
                 # print('simpleData',simpleData)
@@ -307,7 +307,7 @@ def checkData(fileUrl):
                     if i not in strList:
                         simpleData[i] = pd.to_numeric(simpleData[i], errors='coerce')
                 # 处理重复样品
-                print('to--num', simpleData)
+
                 res = getRepeat(simpleData)
                 simpleData = simpleData._append(res).drop_duplicates(subset=['原样品编号'], keep='last')
                 jCData = simpleData[['土壤容重1(g/cm³)', '土壤容重2(g/cm³)', '土壤容重3(g/cm³)', '土壤容重4(g/cm³)']]
@@ -324,6 +324,7 @@ def checkData(fileUrl):
                 # ---------------表1----------数据汇总
                 resData = pd.DataFrame({
                     '编号': simpleData['原样品编号'],
+                    '样品编号': simpleData['样品编号'],
                     '地理位置': simpleData['地理位置'],
                     '土壤类型': simpleData['土壤类型'],
                     '土地利用类型': simpleData['土地利用类型'],
@@ -345,6 +346,7 @@ def checkData(fileUrl):
                     '加和%': plusData,
                     'pH': simpleData['pH']
                 })
+
                 # 调用审核函数 得到审核结果
                 table_1_res = pb.soil_bulk_density(resData)
                 resData = resData.reset_index(drop=True)
@@ -361,8 +363,8 @@ def checkData(fileUrl):
                 #     '指标': table_1_res['异常指标'],
                 #     '原因': table_1_res['审核结果']
                 # })
-                table_1_index['原样品编号'] = simpleData['原样品编号']
-                table_1_index['样品编号'] = simpleData['样品编号']
+                table_1_index['原样品编号'] = resData['编号']
+                table_1_index['样品编号'] = resData['样品编号']
                 table_1_index['土地利用类型'] = resData['土地利用类型']
                 table_1_index['指标'] = table_1_res['异常指标']
                 table_1_index['原因'] = table_1_res['审核结果']
@@ -383,9 +385,7 @@ def checkData(fileUrl):
                     '0.002mm以下颗粒含量%': simpleData['0.002mm以下颗粒含量']
                 })
                 global resData_2
-                print(1.5)
                 resData_2 = frequency_analysis(data_2)
-                print(2)
                 # 表3--------------------------表3水稳性大团聚体数据汇总----------------------------------------
                 # 数据计算 这里数据暂时还没有 数据获取到以后再进行测试
                 resData_3 = pd.DataFrame({
@@ -416,16 +416,17 @@ def checkData(fileUrl):
                 #     '指标': res_3_v['异常指标'],
                 #     '原因': res_3_v['审核结果']
                 # })
-                table_3_index['样品编号'] = simpleData['样品编号']
+
+                # table_3_index['样品编号'] = simpleData['样品编号']
                 table_3_index['指标'] = res_3_v['异常指标']
                 table_3_index['原因'] = res_3_v['审核结果']
                 resData_3_Style = resData_3.style.apply(highlight_condition, axis=1)
                 # 表4--------------------------表4 水稳性大团聚体频度分析-----------------------
-                print(3)
+
                 resData_4_need = resData_3[['总和(%)','>5mm%','3-5mm%','2-3mm%','1-2mm%','0.5-1mm%','0.25-0.5mm%']]
                 global resData_4
                 resData_4 = frequency_analysis(resData_4_need)
-                print(3.1)
+
                 # 表5--------------------------表5pH、阳离子交换量、交换性盐基基础数据收集----------------------------------------
                 forPlus = simpleData['交换性钙'] + simpleData['交换性镁'] + simpleData['交换性钾'] + simpleData['交换性钠']
                 resData_5 = pd.DataFrame({
@@ -443,28 +444,29 @@ def checkData(fileUrl):
                     '阳交量与交盐量差': simpleData['阳离子交换量'] - simpleData['交换性盐基总量'],
                     '盐基饱和度%': simpleData['交换性盐基总量'] / simpleData['阳离子交换量']  # 交换性盐基/阳离子交换量
                 })
-                print(3.2)
+
                 resData_5 = resData_5.reset_index(drop=True)
                 res_5_v = pb.cation_value(resData_5)
-                print(3.3)
-                print('res_5_v', res_5_v)
+
+
                 resData_5['审核结果'] = res_5_v['审核结果']
                 global resData_5_Style
                 global table_5_data
                 table_5_data = resData_5
                 # 提取异常数据
-                print(3.5)
+
                 global table_5_index
                 # table_5_index = pd.DataFrame({
                 #     '样品编号': simpleData['样品编号'],
                 #     '指标': res_5_v['异常指标'],
                 #     '原因': res_5_v['审核结果']
                 # })
-                table_5_index['样品编号'] = simpleData['样品编号']
+                # table_5_index['样品编号'] = simpleData['样品编号']
                 table_5_index['指标'] = res_5_v['异常指标']
                 table_5_index['原因'] = res_5_v['审核结果']
+
                 resData_5_Style = resData_5.style.apply(highlight_condition, axis=1)
-                print(4)
+
                 # 表6--------------------------表6----------------------------------------
                 global resData_6
                 resData_6 = frequency_analysis(resData_5[['pH']])
@@ -526,11 +528,11 @@ def checkData(fileUrl):
                 #     '指标': res_value_8['异常指标'],
                 #     '原因': res_value_8['审核结果']
                 # })
-                table_8_index['样品编号'] = simpleData['样品编号']
+                # table_8_index['样品编号'] = simpleData['样品编号']
                 table_8_index['指标'] = res_value_8['异常指标']
                 table_8_index['原因'] = res_value_8['审核结果']
                 resData_8_Style = resData_8.style.apply(highlight_condition, axis=1)
-                print(5)
+
                 # 表7--------------------------表7 数据频度分析----------------------------------------
                 global resData_7
                 resData_7 = frequency_analysis(resData_8[['水溶性全盐量g/kg', '电导率ms/cm']])
@@ -555,7 +557,7 @@ def checkData(fileUrl):
                 res_value_10 = pb.nutrient_data(resData_10)
                 resData_10 = resData_10.reset_index(drop=True)
                 resData_10['审核结果'] = res_value_10['审核结果']
-                print(6)
+
                 # 写入表格
                 global resData_10_Style
                 global table_10_data
@@ -567,7 +569,7 @@ def checkData(fileUrl):
                 #     '指标': res_value_10['异常指标'],
                 #     '原因': res_value_10['审核结果']
                 # })
-                table_10_index['样品编号'] = simpleData['样品编号']
+                # table_10_index['样品编号'] = simpleData['样品编号']
                 table_10_index['指标'] = res_value_10['异常指标']
                 table_10_index['原因'] = res_value_10['审核结果']
                 resData_10_Style = resData_10.style.apply(highlight_condition, axis=1)
@@ -613,11 +615,11 @@ def checkData(fileUrl):
                 #     '指标': res_value_12['异常指标'],
                 #     '原因': res_value_12['审核结果']
                 # })
-                table_12_index['样品编号'] = simpleData['样品编号']
+                # table_12_index['样品编号'] = simpleData['样品编号']
                 table_12_index['指标'] = res_value_12['异常指标']
                 table_12_index['原因'] = res_value_12['审核结果']
                 resData_12_Style = resData_12.style.apply(highlight_condition, axis=1)
-                print(7)
+
                 # 写入表格
                 # 表11--------------------------表11 土壤指标频度分析----------------------------------------
                 global resData_11
@@ -651,17 +653,17 @@ def checkData(fileUrl):
                 #     '指标': res_value_14['异常指标'],
                 #     '原因': res_value_14['审核结果']
                 # })
-                table_14_index['样品编号'] = simpleData['样品编号']
+                # table_14_index['样品编号'] = simpleData['样品编号']
                 table_14_index['指标'] = res_value_14['异常指标']
                 table_14_index['原因'] = res_value_14['审核结果']
                 resData_14_Style = resData_14.style.apply(highlight_condition, axis=1)
                 # 写入表格
                 # 表13--------------------------表13 土壤重金属频度分析----------------------------------------
                 global resData_13
-                print('resData_13---1', resData_13)
+
                 resData_13 = frequency_analysis(
                     resData_14[['镉mg/kg', '汞mg/kg', '砷mg/kg', '铅mg/kg', '铬mg/kg', '镍mg/kg']])
-                print('resData_13--', resData_13)
+
                 show_info('文件审核完成,请点击保存按钮保存文件!')
         else:
             #提示文件为空 重新选择
@@ -676,6 +678,7 @@ def makeNormalWord(url):
     length = len(table_1_index)
     emptyArr = [np.nan for i in range(length)]
     indexArr = pd.RangeIndex(start=1, stop=length+1)
+
     newData = pd.DataFrame({
         '序号': indexArr,
         '原样品编号': table_1_index['原样品编号'],
@@ -687,7 +690,7 @@ def makeNormalWord(url):
         '数据判定': emptyArr
     })
     newData = newData.replace(np.nan, '')
-    print(newData)
+    print('newData----', newData)
     name = os.path.basename(changeFileUrl)
     n = name.split('.')
     areaName = n[0].replace('数据', '')
@@ -872,7 +875,7 @@ def getReport(originData,data,changeFileUrl, saveFileUrl, check_1_data,
     # 附表: 频度分析图
     report.getFrequencyImage(data, mkdir_path)
     table_f_2_data = report.getFrequencyInformation(data, mkdir_path)
-    print('table_f_2_data---', table_f_2_data)
+
     # 新建一个文档
     doc = Document()
     # 添加标题
@@ -1404,8 +1407,7 @@ def getReport(originData,data,changeFileUrl, saveFileUrl, check_1_data,
                     paragraph.add_run('')
             elif len(columnsList) >= 10 and i > columnsList[9] and i <= 60:
                 if len(dataList[9].columns) > j:
-                    print(dataList[9].columns)
-                    print(str(dataList[9].iloc[i - 55, j]))
+
                     r = paragraph.add_run(str(dataList[9].iloc[i - 55, j]))
                     r.font.size = Pt(10.5)
                     r.font.name = 'Times New Roman'
@@ -1569,7 +1571,6 @@ def dealData(data):
     simpleData = data.dropna(subset=['原样品编号'])
     simpleData = simpleData[~simpleData['原样品编号'].str.contains('ZK')]
     simpleData = simpleData.replace(r'[^.\w]+', '', regex=True)
-    # print('simpleData',simpleData)
     simpleData = simpleData.replace('未检测', np.nan)
     simpleData = simpleData.replace('', np.nan)
     # simpleData.iloc[:, 3:] = simpleData.iloc[:, 3:].apply(pd.to_numeric, errors='ignore')