« first day (1 day earlier)    last day (15 days later) » 

4:32 PM
Hey
So I tried to get timestamp where the value was above (or equal to) 50. But the results differ when I use your solution
def myfunc(mask):
global accumulator
if mask==False:
accumulator = 0.0
return 0
if mask==True:
accumulator+=1.0
return accumulator


df1 = df1.reset_index()
df1[['Date','index']]=df1['index'].astype(str).str.split('+',expand=True)
del df1['index']
df1 = df1[['Date','Value']]
df1['Date'] = pd.to_datetime(df1['Date'])
groups = df1.groupby(df1['Date'].dt.date, as_index = False)
dflist = pd.DataFrame()
for idx,g in groups:
#dflist = dflist.append(f(g))
#mask = (g['Value'] >= 50.05)

g['mask'] = g['Value'] >= 50.05
Can you please let me know if the logic is correct?
Here I want to measure if the value is above 50.05 and the resolution is in seconds
Sorry for the bad edit of the code
 

« first day (1 day earlier)    last day (15 days later) »