Demo entry 6691684

Audit

   

Submitted by anonymous on Jan 12, 2018 at 20:46
Language: Python. Code size: 248 Bytes.

results10 = (df.assign(filecode = pd.factorize(df['Connection type'])[0])
 .loc[df['Action'] == "Read"]
 .groupby('Users')
 .rolling('10min', on='when')['filecode']
# .count()
# .apply(type)
 .apply(lambda x: len(np.unique(x))).astype(int)
)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).