honker
matlab计算aqi的程序,计算AQI 根据6项污染物的⽇均值算IAQI,再算当⽇AQI
import numpy as np
import pandas as pd
import bict
import math
hs13 = pd.read_excel('0406hs_6pol.xlsx','2013')
hs14 = pd.read_excel('0406hs_6pol.xlsx','2014')
grd = pd.read_excel('0406hs_6pol.xlsx','level')
iaq = _list()
英语翻译兼职def lsd(col,ikind):
col = _list()
ikind = _list()
newcol = []
for i in range(len(col)):
if math.isnan(col[i]):
newcol.append(np.nan)
el:
index = bict.bict(ikind,col[i])
reloadif index < 8:
#print(index,i,col[i])
iaq_h = iaq[index]
英语长篇故事iaq_l = iaq[index-1]
英文翻译软件
bp_h = ikind[index]
bp_l = ikind[index-1]
newcol.append((iaq_h-iaq_l)/(bp_h-bp_l)*(col[i]-bp_l)+iaq_l)acquire名词
el:
clever什么意思
newcol.append(iaq[-1])
return newcol
vars = [ 'SO2','NO2', 'PM10', 'CO','O3', 'PM2_5' ]
a = [ '{}_newlist'.format(var) for var in vars ]
print(a)
for ivar in range(len(vars)):
varname = vars[ivar]
守护甜心85a[ivar] = lsd(hs14[varname],grd[varname])inventec
data=pd.DataFrame(a,index=[ 'SO2','NO2', 'PM10', 'CO','O3', 'PM2_5']).T print((data.head().max(axis=1)))
nina hartley
data['max_value']=data.max(axis=1)
data['max_index'] = np.argmax(data.values,axis=1)
<_csv('AQI统计.csv', index=True, p=',')