パンダを使用して2つの値の間の行の範囲を選択するにはどうすればよいですか?
(セッション - 次回ログインする前に、ログインから作用を介してのイベント)各セッションようにするため、私は...下部にあるサンプルデータをスライスしたい、このようになります:私はしたいと思います
login,4,2016-11-10 05:28:30.396,hbhimani,11/10/2016
getUserPreferences,179,2016-11-10 05:28:30.575,hbhimani,11/10/2016
getPreference,3,2016-11-10 05:28:55.686,hbhimani,11/10/2016
getPreference,4,2016-11-10 05:28:55.961,hbhimani,11/10/2016
constructFromSession,4,2016-11-10 05:28:56.108,hbhimani,11/10/2016
getUserPreferences,4,2016-11-10 05:28:56.112,hbhimani,11/10/2016
getUserPreferences,3,2016-11-10 05:28:56.116,hbhimani,11/10/2016
setBooleanPreference,4,2016-11-10 05:28:56.238,hbhimani,11/10/2016
setBooleanPreference,4,2016-11-10 05:28:56.513,hbhimani,11/10/2016
getQuickSearchInitInfo,3,2016-11-10 05:28:58.936,hbhimani,11/10/2016
getQuickSearchInitInfo2,4,2016-11-10 05:28:59.315,hbhimani,11/10/2016
レコード数をカウントし、getPreferenceアクションが発生したことを示します。
day,User,session_duration(min),getPreference_count,total_session_actions
11/10/2016,hbhimani, 180, 2, 11
複数のセッションがある場合、私の挑戦が発生しています。インデックス上で動的にスライスする方法がわかりません。
サンプルデータ:
Action,Duration,_time,User,day
login,4,2016-11-10 05:28:30.396,hbhimani,11/10/2016
getUserPreferences,179,2016-11-10 05:28:30.575,hbhimani,11/10/2016
getPreference,3,2016-11-10 05:28:55.686,hbhimani,11/10/2016
getPreference,4,2016-11-10 05:28:55.961,hbhimani,11/10/2016
constructFromSession,4,2016-11-10 05:28:56.108,hbhimani,11/10/2016
getUserPreferences,4,2016-11-10 05:28:56.112,hbhimani,11/10/2016
getUserPreferences,3,2016-11-10 05:28:56.116,hbhimani,11/10/2016
setBooleanPreference,4,2016-11-10 05:28:56.238,hbhimani,11/10/2016
setBooleanPreference,4,2016-11-10 05:28:56.513,hbhimani,11/10/2016
getQuickSearchInitInfo,3,2016-11-10 05:28:58.936,hbhimani,11/10/2016
getQuickSearchInitInfo2,4,2016-11-10 05:28:59.315,hbhimani,11/10/2016
login,3,2016-11-10 05:29:29.202,hbhimani,11/10/2016
getSummary,4042,2016-11-10 05:29:33.246,hbhimani,11/10/2016
getEnclosures,457,2016-11-10 05:29:34.372,hbhimani,11/10/2016
getAuditTrail,1061,2016-11-10 05:29:36.034,hbhimani,11/10/2016
getRelatedDefects,5,2016-11-10 05:29:36.586,hbhimani,11/10/2016
getServiceRequests,5,2016-11-10 05:29:36.864,hbhimani,11/10/2016
getForeignBugs,270,2016-11-10 05:29:37.408,hbhimani,11/10/2016
getEnclosures,455,2016-11-10 05:29:50.087,hbhimani,11/10/2016
getSummary,5505,2016-11-10 05:32:26.584,hbhimani,11/10/2016
getEnclosures,459,2016-11-10 05:32:27.940,hbhimani,11/10/2016
login,997,2016-11-10 05:32:29.480,anshanno,11/10/2016
getRelatedDefects,5,2016-11-10 05:32:30.027,anshanno,11/10/2016
getServiceRequests,5,2016-11-10 05:32:30.306,anshanno,11/10/2016
getForeignBugs,6,2016-11-10 05:32:30.585,anshanno,11/10/2016
そのように動作するように設計されていないので?あなたの質問は何ですか?スライスについて読む。特に彼らがどのように 'pandas'データ構造で動作するか。 –
質問は[XY問題の質問](http://meta.stackexchange.com/a/66378)のように見えます。あなたのサンプルデータセットに基づいて、希望のデータセット( 'day、User、session_duration(min)、getPreference_count、total_session_actions')を投稿できますか? – MaxU
@ juanpa.arrivillaga私は見て、私がやろうとしているものに似た何かを見ませんでした。 – anshanno