VicenteYago / OPTRAM

Satellite and sensor based model to predict soil moisture at the surface level.
7 stars 0 forks source link

reduce df size #9

Closed VicenteYago closed 2 years ago

VicenteYago commented 2 years ago

https://www.kaggle.com/code/cereniyim?cellIds=17&kernelSessionId=25255747

VicenteYago commented 2 years ago

The only df reductions performed were related with reduction the precision of the types, for example :

            data = {
                'datetime' : S2_get_sensing_dt(boa_fp),
                'ndvi' : ndvi,
                'str'  : STR,
                'utm_x' : utm_x, 
                'utm_y' : utm_y,
                'fpath' : boa_fp
            }

            local_df = pd.DataFrame(data)
            local_df.astype({
                'datetime' : 'datetime64[ns]',
                'ndvi' : 'float', 
                'utm_x' : 'float', 
                'utm_y' : 'float',
                'fpath' : 'str'
            })