タイムスタンプが一意でない場合、Pandas DataFrame で日付ごとに観測をカウントする最良の方法は何ですか?
df = pd.DataFrame({'User' : ['A', 'B', 'C'] * 40,
'Value' : np.random.randn(120),
'Time' : [np.random.choice(pd.date_range(datetime.datetime(2013,1,1,0,0,0),datetime.datetime(2013,1,3,0,0,0),freq='H')) for i in range(120)]})
理想的には、出力は 1 日あたりの観測数 (または他の高次の時間単位) を提供します。これを使用して、時間の経過に伴うアクティビティをプロットできます。
2013-01-01 60
2013-01-02 60