import numpy as np
import pandas as pd
import re
df=pd.read_excel('../8-8/综合甜点/JZ25-1-6.xlsx')
n=df.shape[0]
flags=re.IGNORECASE
for i in range(n):
sum=0
#含油性潜力层
if re.search('_I类',df.loc[i,'含油性潜力层']):
sum=sum+10*0.3579
elif re.search("_II类",df.loc[i,'含油性潜力层']):
sum=sum+10*0.8*0.3579
else:
sum=sum+10*0.6*0.3579
#储集性潜力层
if re.search('_I类',df.loc[i,'储集性潜力层']):
sum=sum+10*0.2986
elif re.search("_II类",df.loc[i,'储集性潜力层']):
sum=sum+10*0.8*0.2986
else:
sum=sum+10*0.6*0.2986
#可动性潜力层
if re.search('_I类',df.loc[i,'可动性潜力层']):
sum=sum+10*0.1461
elif re.search("_II类",df.loc[i,'可动性潜力层']):
sum=sum+10*0.8*0.1461
else:
sum=sum+10*0.6*0.1461
#可动压性潜力层
if re.search('_I类',df.loc[i,'可压性潜力层']):
sum=sum+10*0.1974
elif re.search("_II类",df.loc[i,'可压性潜力层']):
sum=sum+10*0.8*0.1974
else:
sum=sum+10*0.6*0.1974
df.loc[i,'甜点评价系数']=sum
if df.loc[i,'甜点评价系数']>8.7:
df.loc[i,'超甜点']='I类甜点'
elif df.loc[i,'甜点评价系数']>=8.2:
df.loc[i,'超甜点']="II类甜点"
else:
df.loc[i,'超甜点']="III类甜点"
df.to_excel('../8-8/综合甜点/result/JZ25-1-6.xlsx',index=False)