Good morning, I'm having a big data failure problem on my df
. I need to find the CO2 value similar to another time using conditions I can not do with the line information. I have df
of 1
year with values of 30 em 30 minutos
. the values of Temperature and Radiation have no missing, I only have missing values in CO2
.
import numpy as np
import pandas as pd
df = pd.read_hdf('./dados.hd5')
df.head()
Year_DoY_Hour Temperatura radiacao CO2
2016-01-01 00:00:00 22.44570 0 380
2016-01-01 00:30:00 22.445700 0 390
.
.
2016-01-15 00:00:00 22.88300 0 379
2016-01-15 00:30:00 22.445700 0 381
2016-01-15 01:00:00 22.388300 0 NaN
.
.
.
2016-01-30 00:00:00 22.400000 0 350
2016-01-30 00:30:00 16.393900 0 375
2016-01-30 01:00:00 17.133900 0 365
- (a) Temperature must be between
+- 2.5ºC
; - (b) Radiation
+- 50W/m²
; - I have to have a window of
-+ 3 dias
between the value withNaN
ofCO2
. - Calculate the average of the values of
CO2
when(a)
and(b)
are accepted in the condition and put where I have the missing data ofCO2
.
In% with% displayed above we have that for the day and time df
we have 2016-01-15 01:00:00
in NaN
and then I can not find a temp. and radia. to fill the value of CO2
.
I believe that with conditions I can do it, but I can not.