fork download
  1. upperb=NDVI_LST[col[0]]>0.0
  2. lowerb=NDVI_LST[col[0]]<0.1
  3. edge_1=NDVI_LST[(upperb & lowerb)]
  4.  
  5. lst_values=[]
  6. for i in edge_1[col[0]]:
  7. LST=NDVI_LST.loc[NDVI_LST[col[0]]==i,col[1]]
  8. NDVI=i
  9. for j in LST.values:
  10. lst_values.append(j)
  11. df.loc[0.0,'w1月']=max(lst_values)
  12.  
  13. lst_values=[]
  14. for i in edge_1[col[0]]:
  15. LST=NDVI_LST.loc[NDVI_LST[col[0]]==i,col[1]]
  16. NDVI=i
  17. for j in LST.values:
  18. lst_values.append(j)
  19. df.loc[0.0,'d1月']=min(lst_values)
  20.  
  21.  
  22.  
  23.  
  24.  
  25. NDVI_bound=np.around(np.linspace(0,1,11).tolist(),decimals=2)
  26.  
  27. for k in range(1,13):
  28. for j in range(23):
  29. for i in range(10):
  30. upperb=NDVI_LST[col[int(j)]]>NDVI_bound[int(i)]
  31. lowerb=NDVI_LST[col[int(j)]]<NDVI_bound[int(i)+1]
  32. edge_1=NDVI_LST[(upperb & lowerb)]
  33. lst_values=[]
  34. for l in edge_1[col[int(j)]]:
  35. LST=NDVI_LST.loc[NDVI_LST[col[int(j)]]==l,col[int(j)+1]]
  36. NDVI=i
  37. for m in LST.values:
  38. lst_values.append(m)
  39. if lst_values==[]:
  40. df.loc[NDVI_bound[int(i)+1],'w'+str(k)+'月']=0
  41. df.loc[NDVI_bound[int(i)+1],'d'+str(k)+'月']=0
  42. else:
  43. df.loc[NDVI_bound[int(i)+1],'w'+str(k)+'月']=max(lst_values)
  44. df.loc[NDVI_bound[int(i)+1],'d'+str(k)+'月']=min(lst_values)
Runtime error #stdin #stdout #stderr 0.11s 23764KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
NameError: name 'NDVI_LST' is not defined