[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mask and proper index

Dear all,

I am trying to apply a mask to my dataframe:

mask = (df['datatime'] > start_date) & (df['datatime'] <= end_date)
df = df.loc[mask]

It seems to work pretty well. 

After that I crate the cumulative of its element as:

PP_cumPP = np.cumsum(df[PP_station])

However, I am not able to compute PP_cumPP last element. Indeed, when I do


I get 


and when I try to do:


I get an error.

What I am doing wrong?

Thanks a lot for any kind of help