diff --git a/docs/user_guide/preprocessing/screen.ipynb b/docs/user_guide/preprocessing/screen.ipynb index d5ab6d9c..bac34db9 100644 --- a/docs/user_guide/preprocessing/screen.ipynb +++ b/docs/user_guide/preprocessing/screen.ipynb @@ -708,53 +708,53 @@ " \n", " \n", " \n", - " user\n", - " screen_on_count\n", - " screen_use_count\n", " screen_off_count\n", + " screen_use_count\n", + " user\n", " device\n", + " screen_on_count\n", " \n", " \n", " \n", " \n", " 2020-01-09 02:00:00+02:00\n", - " jd9INuQ5BBlW\n", - " 2\n", " 2\n", " 2\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 2\n", " \n", " \n", " 2020-01-09 02:20:00+02:00\n", - " jd9INuQ5BBlW\n", - " 3\n", - " 2\n", " 4\n", + " 2\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 3\n", " \n", " \n", " 2020-01-09 02:40:00+02:00\n", - " jd9INuQ5BBlW\n", " 2\n", " 1\n", - " 2\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 2\n", " \n", " \n", " 2020-01-09 03:00:00+02:00\n", - " jd9INuQ5BBlW\n", - " 0\n", " 0\n", " 0\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 0\n", " \n", " \n", " 2020-01-09 03:20:00+02:00\n", - " jd9INuQ5BBlW\n", - " 0\n", " 0\n", " 0\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 0\n", " \n", " \n", " ...\n", @@ -766,43 +766,43 @@ " \n", " \n", " 2020-01-09 21:40:00+02:00\n", - " jd9INuQ5BBlW\n", " 1\n", " 0\n", - " 1\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 1\n", " \n", " \n", " 2020-01-09 22:00:00+02:00\n", - " jd9INuQ5BBlW\n", " 1\n", " 0\n", - " 1\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 1\n", " \n", " \n", " 2020-01-09 22:20:00+02:00\n", - " jd9INuQ5BBlW\n", - " 0\n", " 0\n", " 0\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 0\n", " \n", " \n", " 2020-01-09 22:40:00+02:00\n", - " jd9INuQ5BBlW\n", - " 0\n", " 0\n", " 0\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 0\n", " \n", " \n", " 2020-01-09 23:00:00+02:00\n", - " jd9INuQ5BBlW\n", - " 4\n", - " 0\n", " 3\n", + " 0\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 4\n", " \n", " \n", "\n", @@ -810,31 +810,31 @@ "" ], "text/plain": [ - " user screen_on_count screen_use_count \\\n", - "2020-01-09 02:00:00+02:00 jd9INuQ5BBlW 2 2 \n", - "2020-01-09 02:20:00+02:00 jd9INuQ5BBlW 3 2 \n", - "2020-01-09 02:40:00+02:00 jd9INuQ5BBlW 2 1 \n", - "2020-01-09 03:00:00+02:00 jd9INuQ5BBlW 0 0 \n", - "2020-01-09 03:20:00+02:00 jd9INuQ5BBlW 0 0 \n", - "... ... ... ... \n", - "2020-01-09 21:40:00+02:00 jd9INuQ5BBlW 1 0 \n", - "2020-01-09 22:00:00+02:00 jd9INuQ5BBlW 1 0 \n", - "2020-01-09 22:20:00+02:00 jd9INuQ5BBlW 0 0 \n", - "2020-01-09 22:40:00+02:00 jd9INuQ5BBlW 0 0 \n", - "2020-01-09 23:00:00+02:00 jd9INuQ5BBlW 4 0 \n", - "\n", - " screen_off_count device \n", - "2020-01-09 02:00:00+02:00 2 OWd1Uau8POix \n", - "2020-01-09 02:20:00+02:00 4 OWd1Uau8POix \n", - "2020-01-09 02:40:00+02:00 2 OWd1Uau8POix \n", - "2020-01-09 03:00:00+02:00 0 OWd1Uau8POix \n", - "2020-01-09 03:20:00+02:00 0 OWd1Uau8POix \n", - "... ... ... \n", - "2020-01-09 21:40:00+02:00 1 OWd1Uau8POix \n", - "2020-01-09 22:00:00+02:00 1 OWd1Uau8POix \n", - "2020-01-09 22:20:00+02:00 0 OWd1Uau8POix \n", - "2020-01-09 22:40:00+02:00 0 OWd1Uau8POix \n", - "2020-01-09 23:00:00+02:00 3 OWd1Uau8POix \n", + " screen_off_count screen_use_count user \\\n", + "2020-01-09 02:00:00+02:00 2 2 jd9INuQ5BBlW \n", + "2020-01-09 02:20:00+02:00 4 2 jd9INuQ5BBlW \n", + "2020-01-09 02:40:00+02:00 2 1 jd9INuQ5BBlW \n", + "2020-01-09 03:00:00+02:00 0 0 jd9INuQ5BBlW \n", + "2020-01-09 03:20:00+02:00 0 0 jd9INuQ5BBlW \n", + "... ... ... ... \n", + "2020-01-09 21:40:00+02:00 1 0 jd9INuQ5BBlW \n", + "2020-01-09 22:00:00+02:00 1 0 jd9INuQ5BBlW \n", + "2020-01-09 22:20:00+02:00 0 0 jd9INuQ5BBlW \n", + "2020-01-09 22:40:00+02:00 0 0 jd9INuQ5BBlW \n", + "2020-01-09 23:00:00+02:00 3 0 jd9INuQ5BBlW \n", + "\n", + " device screen_on_count \n", + "2020-01-09 02:00:00+02:00 OWd1Uau8POix 2 \n", + "2020-01-09 02:20:00+02:00 OWd1Uau8POix 3 \n", + "2020-01-09 02:40:00+02:00 OWd1Uau8POix 2 \n", + "2020-01-09 03:00:00+02:00 OWd1Uau8POix 0 \n", + "2020-01-09 03:20:00+02:00 OWd1Uau8POix 0 \n", + "... ... ... \n", + "2020-01-09 21:40:00+02:00 OWd1Uau8POix 1 \n", + "2020-01-09 22:00:00+02:00 OWd1Uau8POix 1 \n", + "2020-01-09 22:20:00+02:00 OWd1Uau8POix 0 \n", + "2020-01-09 22:40:00+02:00 OWd1Uau8POix 0 \n", + "2020-01-09 23:00:00+02:00 OWd1Uau8POix 4 \n", "\n", "[64 rows x 5 columns]" ] @@ -1048,53 +1048,53 @@ " \n", " \n", " \n", - " user\n", - " screen_on_count\n", - " screen_use_count\n", " screen_off_count\n", + " screen_use_count\n", + " user\n", " device\n", + " screen_on_count\n", " \n", " \n", " \n", " \n", " 2020-01-09 02:06:41.573999882+02:00\n", - " jd9INuQ5BBlW\n", - " 4\n", " 3\n", " 3\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 4\n", " \n", " \n", " 2020-01-09 02:26:41.573999882+02:00\n", - " jd9INuQ5BBlW\n", - " 2\n", - " 1\n", " 3\n", + " 1\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 2\n", " \n", " \n", " 2020-01-09 02:46:41.573999882+02:00\n", - " jd9INuQ5BBlW\n", " 2\n", " 1\n", - " 2\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 2\n", " \n", " \n", " 2020-01-09 03:06:41.573999882+02:00\n", - " jd9INuQ5BBlW\n", - " 0\n", " 0\n", " 0\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 0\n", " \n", " \n", " 2020-01-09 03:26:41.573999882+02:00\n", - " jd9INuQ5BBlW\n", - " 0\n", " 0\n", " 0\n", + " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", + " 0\n", " \n", " \n", " ...\n", @@ -1106,43 +1106,43 @@ " \n", " \n", " 2019-08-07 17:52:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", " 2019-08-07 18:12:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", " 2019-08-07 18:32:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 1\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 1\n", " \n", " \n", " 2019-08-07 18:52:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", " 2019-08-07 19:12:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 0\n", - " 0\n", " 1\n", + " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", "\n", @@ -1150,23 +1150,10 @@ "" ], "text/plain": [ - " user screen_on_count \\\n", - "2020-01-09 02:06:41.573999882+02:00 jd9INuQ5BBlW 4 \n", - "2020-01-09 02:26:41.573999882+02:00 jd9INuQ5BBlW 2 \n", - "2020-01-09 02:46:41.573999882+02:00 jd9INuQ5BBlW 2 \n", - "2020-01-09 03:06:41.573999882+02:00 jd9INuQ5BBlW 0 \n", - "2020-01-09 03:26:41.573999882+02:00 jd9INuQ5BBlW 0 \n", - "... ... ... \n", - "2019-08-07 17:52:41.009999990+03:00 dvWdLQesv21a 0 \n", - "2019-08-07 18:12:41.009999990+03:00 dvWdLQesv21a 0 \n", - "2019-08-07 18:32:41.009999990+03:00 dvWdLQesv21a 1 \n", - "2019-08-07 18:52:41.009999990+03:00 dvWdLQesv21a 0 \n", - "2019-08-07 19:12:41.009999990+03:00 dvWdLQesv21a 0 \n", - "\n", - " screen_use_count screen_off_count \\\n", + " screen_off_count screen_use_count \\\n", "2020-01-09 02:06:41.573999882+02:00 3 3 \n", - "2020-01-09 02:26:41.573999882+02:00 1 3 \n", - "2020-01-09 02:46:41.573999882+02:00 1 2 \n", + "2020-01-09 02:26:41.573999882+02:00 3 1 \n", + "2020-01-09 02:46:41.573999882+02:00 2 1 \n", "2020-01-09 03:06:41.573999882+02:00 0 0 \n", "2020-01-09 03:26:41.573999882+02:00 0 0 \n", "... ... ... \n", @@ -1174,20 +1161,33 @@ "2019-08-07 18:12:41.009999990+03:00 0 0 \n", "2019-08-07 18:32:41.009999990+03:00 0 0 \n", "2019-08-07 18:52:41.009999990+03:00 0 0 \n", - "2019-08-07 19:12:41.009999990+03:00 0 1 \n", - "\n", - " device \n", - "2020-01-09 02:06:41.573999882+02:00 OWd1Uau8POix \n", - "2020-01-09 02:26:41.573999882+02:00 OWd1Uau8POix \n", - "2020-01-09 02:46:41.573999882+02:00 OWd1Uau8POix \n", - "2020-01-09 03:06:41.573999882+02:00 OWd1Uau8POix \n", - "2020-01-09 03:26:41.573999882+02:00 OWd1Uau8POix \n", - "... ... \n", - "2019-08-07 17:52:41.009999990+03:00 i8jmoIuoe12Mo \n", - "2019-08-07 18:12:41.009999990+03:00 i8jmoIuoe12Mo \n", - "2019-08-07 18:32:41.009999990+03:00 i8jmoIuoe12Mo \n", - "2019-08-07 18:52:41.009999990+03:00 i8jmoIuoe12Mo \n", - "2019-08-07 19:12:41.009999990+03:00 i8jmoIuoe12Mo \n", + "2019-08-07 19:12:41.009999990+03:00 1 0 \n", + "\n", + " user device \\\n", + "2020-01-09 02:06:41.573999882+02:00 jd9INuQ5BBlW OWd1Uau8POix \n", + "2020-01-09 02:26:41.573999882+02:00 jd9INuQ5BBlW OWd1Uau8POix \n", + "2020-01-09 02:46:41.573999882+02:00 jd9INuQ5BBlW OWd1Uau8POix \n", + "2020-01-09 03:06:41.573999882+02:00 jd9INuQ5BBlW OWd1Uau8POix \n", + "2020-01-09 03:26:41.573999882+02:00 jd9INuQ5BBlW OWd1Uau8POix \n", + "... ... ... \n", + "2019-08-07 17:52:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-07 18:12:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-07 18:32:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-07 18:52:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-07 19:12:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "\n", + " screen_on_count \n", + "2020-01-09 02:06:41.573999882+02:00 4 \n", + "2020-01-09 02:26:41.573999882+02:00 2 \n", + "2020-01-09 02:46:41.573999882+02:00 2 \n", + "2020-01-09 03:06:41.573999882+02:00 0 \n", + "2020-01-09 03:26:41.573999882+02:00 0 \n", + "... ... \n", + "2019-08-07 17:52:41.009999990+03:00 0 \n", + "2019-08-07 18:12:41.009999990+03:00 0 \n", + "2019-08-07 18:32:41.009999990+03:00 1 \n", + "2019-08-07 18:52:41.009999990+03:00 0 \n", + "2019-08-07 19:12:41.009999990+03:00 0 \n", "\n", "[2689 rows x 5 columns]" ] @@ -1237,72 +1237,72 @@ " \n", " \n", " \n", - " user\n", - " screen_on_count\n", - " screen_use_count\n", " screen_off_count\n", + " screen_use_count\n", + " user\n", " device\n", + " screen_on_count\n", " \n", " \n", " \n", " \n", " 2019-08-05 15:30:00+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", " 2019-08-05 16:00:00+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", " 2019-08-05 16:30:00+03:00\n", - " dvWdLQesv21a\n", - " 1\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 1\n", " \n", " \n", " 2019-08-05 17:00:00+03:00\n", - " dvWdLQesv21a\n", - " 0\n", - " 0\n", " 1\n", + " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", " 2019-08-05 17:30:00+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", "\n", "" ], "text/plain": [ - " user screen_on_count screen_use_count \\\n", - "2019-08-05 15:30:00+03:00 dvWdLQesv21a 0 0 \n", - "2019-08-05 16:00:00+03:00 dvWdLQesv21a 0 0 \n", - "2019-08-05 16:30:00+03:00 dvWdLQesv21a 1 0 \n", - "2019-08-05 17:00:00+03:00 dvWdLQesv21a 0 0 \n", - "2019-08-05 17:30:00+03:00 dvWdLQesv21a 0 0 \n", - "\n", - " screen_off_count device \n", - "2019-08-05 15:30:00+03:00 0 i8jmoIuoe12Mo \n", - "2019-08-05 16:00:00+03:00 0 i8jmoIuoe12Mo \n", - "2019-08-05 16:30:00+03:00 0 i8jmoIuoe12Mo \n", - "2019-08-05 17:00:00+03:00 1 i8jmoIuoe12Mo \n", - "2019-08-05 17:30:00+03:00 0 i8jmoIuoe12Mo " + " screen_off_count screen_use_count user \\\n", + "2019-08-05 15:30:00+03:00 0 0 dvWdLQesv21a \n", + "2019-08-05 16:00:00+03:00 0 0 dvWdLQesv21a \n", + "2019-08-05 16:30:00+03:00 0 0 dvWdLQesv21a \n", + "2019-08-05 17:00:00+03:00 1 0 dvWdLQesv21a \n", + "2019-08-05 17:30:00+03:00 0 0 dvWdLQesv21a \n", + "\n", + " device screen_on_count \n", + "2019-08-05 15:30:00+03:00 i8jmoIuoe12Mo 0 \n", + "2019-08-05 16:00:00+03:00 i8jmoIuoe12Mo 0 \n", + "2019-08-05 16:30:00+03:00 i8jmoIuoe12Mo 1 \n", + "2019-08-05 17:00:00+03:00 i8jmoIuoe12Mo 0 \n", + "2019-08-05 17:30:00+03:00 i8jmoIuoe12Mo 0 " ] }, "execution_count": 13, @@ -1351,79 +1351,79 @@ " \n", " \n", " \n", - " user\n", - " screen_on_count\n", - " screen_use_count\n", " screen_off_count\n", + " screen_use_count\n", + " user\n", " device\n", + " screen_on_count\n", " \n", " \n", " \n", " \n", " 2019-08-05 15:32:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", " 2019-08-05 15:52:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", " 2019-08-05 16:12:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", " 2019-08-05 16:32:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 1\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 1\n", " \n", " \n", " 2019-08-05 16:52:41.009999990+03:00\n", - " dvWdLQesv21a\n", - " 0\n", " 0\n", " 0\n", + " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 0\n", " \n", " \n", "\n", "" ], "text/plain": [ - " user screen_on_count \\\n", - "2019-08-05 15:32:41.009999990+03:00 dvWdLQesv21a 0 \n", - "2019-08-05 15:52:41.009999990+03:00 dvWdLQesv21a 0 \n", - "2019-08-05 16:12:41.009999990+03:00 dvWdLQesv21a 0 \n", - "2019-08-05 16:32:41.009999990+03:00 dvWdLQesv21a 1 \n", - "2019-08-05 16:52:41.009999990+03:00 dvWdLQesv21a 0 \n", - "\n", - " screen_use_count screen_off_count \\\n", + " screen_off_count screen_use_count \\\n", "2019-08-05 15:32:41.009999990+03:00 0 0 \n", "2019-08-05 15:52:41.009999990+03:00 0 0 \n", "2019-08-05 16:12:41.009999990+03:00 0 0 \n", "2019-08-05 16:32:41.009999990+03:00 0 0 \n", "2019-08-05 16:52:41.009999990+03:00 0 0 \n", "\n", - " device \n", - "2019-08-05 15:32:41.009999990+03:00 i8jmoIuoe12Mo \n", - "2019-08-05 15:52:41.009999990+03:00 i8jmoIuoe12Mo \n", - "2019-08-05 16:12:41.009999990+03:00 i8jmoIuoe12Mo \n", - "2019-08-05 16:32:41.009999990+03:00 i8jmoIuoe12Mo \n", - "2019-08-05 16:52:41.009999990+03:00 i8jmoIuoe12Mo " + " user device \\\n", + "2019-08-05 15:32:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-05 15:52:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-05 16:12:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-05 16:32:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-05 16:52:41.009999990+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "\n", + " screen_on_count \n", + "2019-08-05 15:32:41.009999990+03:00 0 \n", + "2019-08-05 15:52:41.009999990+03:00 0 \n", + "2019-08-05 16:12:41.009999990+03:00 0 \n", + "2019-08-05 16:32:41.009999990+03:00 1 \n", + "2019-08-05 16:52:41.009999990+03:00 0 " ] }, "execution_count": 14, @@ -1573,9 +1573,9 @@ " \n", " user\n", " device\n", + " screen_off_durationtotal\n", " screen_use_durationtotal\n", " screen_on_durationtotal\n", - " screen_off_durationtotal\n", " \n", " \n", " \n", @@ -1584,23 +1584,23 @@ " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", " NaN\n", - " 3000.0\n", " NaN\n", + " 3000.0\n", " \n", " \n", " 2019-08-05 16:40:00+03:00\n", " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 3000.0\n", " NaN\n", " 0.0\n", - " 3000.0\n", " \n", " \n", " 2019-08-05 17:30:00+03:00\n", " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", - " 3000.0\n", " 0.0\n", + " 3000.0\n", " 0.0\n", " \n", " \n", @@ -1616,8 +1616,8 @@ " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", " 0.0\n", - " 3000.0\n", " 0.0\n", + " 3000.0\n", " \n", " \n", "\n", @@ -1631,19 +1631,19 @@ "2019-08-05 18:20:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", "2019-08-05 19:10:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", "\n", - " screen_use_durationtotal screen_on_durationtotal \\\n", - "2019-08-05 15:50:00+03:00 NaN 3000.0 \n", - "2019-08-05 16:40:00+03:00 NaN 0.0 \n", - "2019-08-05 17:30:00+03:00 3000.0 0.0 \n", - "2019-08-05 18:20:00+03:00 0.0 0.0 \n", - "2019-08-05 19:10:00+03:00 0.0 3000.0 \n", - "\n", - " screen_off_durationtotal \n", - "2019-08-05 15:50:00+03:00 NaN \n", - "2019-08-05 16:40:00+03:00 3000.0 \n", - "2019-08-05 17:30:00+03:00 0.0 \n", - "2019-08-05 18:20:00+03:00 0.0 \n", - "2019-08-05 19:10:00+03:00 0.0 " + " screen_off_durationtotal screen_use_durationtotal \\\n", + "2019-08-05 15:50:00+03:00 NaN NaN \n", + "2019-08-05 16:40:00+03:00 3000.0 NaN \n", + "2019-08-05 17:30:00+03:00 0.0 3000.0 \n", + "2019-08-05 18:20:00+03:00 0.0 0.0 \n", + "2019-08-05 19:10:00+03:00 0.0 0.0 \n", + "\n", + " screen_on_durationtotal \n", + "2019-08-05 15:50:00+03:00 3000.0 \n", + "2019-08-05 16:40:00+03:00 0.0 \n", + "2019-08-05 17:30:00+03:00 0.0 \n", + "2019-08-05 18:20:00+03:00 0.0 \n", + "2019-08-05 19:10:00+03:00 3000.0 " ] }, "execution_count": 19, @@ -1694,12 +1694,12 @@ " \n", " user\n", " device\n", + " screen_off_durationtotal\n", " screen_use_durationtotal\n", " screen_on_durationtotal\n", - " screen_off_durationtotal\n", - " screen_on_count\n", - " screen_use_count\n", " screen_off_count\n", + " screen_use_count\n", + " screen_on_count\n", " \n", " \n", " \n", @@ -1708,29 +1708,29 @@ " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", " NaN\n", - " 3000.0\n", " NaN\n", - " 1\n", + " 3000.0\n", " 0\n", " 0\n", + " 1\n", " \n", " \n", " 2019-08-05 16:40:00+03:00\n", " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 3000.0\n", " NaN\n", " 0.0\n", - " 3000.0\n", + " 1\n", " 0\n", " 0\n", - " 1\n", " \n", " \n", " 2019-08-05 17:30:00+03:00\n", " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", - " 3000.0\n", " 0.0\n", + " 3000.0\n", " 0.0\n", " 0\n", " 1\n", @@ -1752,11 +1752,11 @@ " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", " 0.0\n", - " 3000.0\n", " 0.0\n", - " 1\n", + " 3000.0\n", " 0\n", " 0\n", + " 1\n", " \n", " \n", "\n", @@ -1770,26 +1770,26 @@ "2019-08-05 18:20:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", "2019-08-05 19:10:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", "\n", - " screen_use_durationtotal screen_on_durationtotal \\\n", - "2019-08-05 15:50:00+03:00 NaN 3000.0 \n", - "2019-08-05 16:40:00+03:00 NaN 0.0 \n", - "2019-08-05 17:30:00+03:00 3000.0 0.0 \n", - "2019-08-05 18:20:00+03:00 0.0 0.0 \n", - "2019-08-05 19:10:00+03:00 0.0 3000.0 \n", - "\n", - " screen_off_durationtotal screen_on_count \\\n", - "2019-08-05 15:50:00+03:00 NaN 1 \n", - "2019-08-05 16:40:00+03:00 3000.0 0 \n", - "2019-08-05 17:30:00+03:00 0.0 0 \n", - "2019-08-05 18:20:00+03:00 0.0 0 \n", - "2019-08-05 19:10:00+03:00 0.0 1 \n", - "\n", - " screen_use_count screen_off_count \n", - "2019-08-05 15:50:00+03:00 0 0 \n", - "2019-08-05 16:40:00+03:00 0 1 \n", - "2019-08-05 17:30:00+03:00 1 0 \n", - "2019-08-05 18:20:00+03:00 0 0 \n", - "2019-08-05 19:10:00+03:00 0 0 " + " screen_off_durationtotal screen_use_durationtotal \\\n", + "2019-08-05 15:50:00+03:00 NaN NaN \n", + "2019-08-05 16:40:00+03:00 3000.0 NaN \n", + "2019-08-05 17:30:00+03:00 0.0 3000.0 \n", + "2019-08-05 18:20:00+03:00 0.0 0.0 \n", + "2019-08-05 19:10:00+03:00 0.0 0.0 \n", + "\n", + " screen_on_durationtotal screen_off_count \\\n", + "2019-08-05 15:50:00+03:00 3000.0 0 \n", + "2019-08-05 16:40:00+03:00 0.0 1 \n", + "2019-08-05 17:30:00+03:00 0.0 0 \n", + "2019-08-05 18:20:00+03:00 0.0 0 \n", + "2019-08-05 19:10:00+03:00 3000.0 0 \n", + "\n", + " screen_use_count screen_on_count \n", + "2019-08-05 15:50:00+03:00 0 1 \n", + "2019-08-05 16:40:00+03:00 0 0 \n", + "2019-08-05 17:30:00+03:00 1 0 \n", + "2019-08-05 18:20:00+03:00 0 0 \n", + "2019-08-05 19:10:00+03:00 0 1 " ] }, "execution_count": 20, @@ -1842,12 +1842,12 @@ " \n", " user\n", " device\n", + " screen_off_durationtotal\n", " screen_use_durationtotal\n", " screen_on_durationtotal\n", - " screen_off_durationtotal\n", - " screen_on_count\n", - " screen_use_count\n", " screen_off_count\n", + " screen_use_count\n", + " screen_on_count\n", " \n", " \n", " \n", @@ -1855,9 +1855,9 @@ " 2019-08-05 00:00:00+03:00\n", " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 6000.000000\n", " 6000.000\n", " 9000.000\n", - " 6000.000000\n", " NaN\n", " NaN\n", " NaN\n", @@ -1866,9 +1866,9 @@ " 2019-08-06 00:00:00+03:00\n", " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 24000.000000\n", " 15000.000\n", " 27000.000\n", - " 24000.000000\n", " NaN\n", " NaN\n", " NaN\n", @@ -1877,9 +1877,9 @@ " 2019-08-07 00:00:00+03:00\n", " dvWdLQesv21a\n", " i8jmoIuoe12Mo\n", + " 15000.000000\n", " 15000.000\n", " 21000.000\n", - " 15000.000000\n", " NaN\n", " NaN\n", " NaN\n", @@ -1888,9 +1888,9 @@ " 2019-08-05 00:00:00+03:00\n", " iGyXetHE3S8u\n", " Cq9vueHh3zVs\n", + " 287266.927999\n", " 1.189\n", " 276.382\n", - " 287266.927999\n", " NaN\n", " NaN\n", " NaN\n", @@ -1899,9 +1899,9 @@ " 2019-08-06 00:00:00+03:00\n", " iGyXetHE3S8u\n", " Cq9vueHh3zVs\n", + " 0.000000\n", " 0.000\n", " 0.000\n", - " 0.000000\n", " NaN\n", " NaN\n", " NaN\n", @@ -1918,26 +1918,26 @@ "2019-08-05 00:00:00+03:00 iGyXetHE3S8u Cq9vueHh3zVs \n", "2019-08-06 00:00:00+03:00 iGyXetHE3S8u Cq9vueHh3zVs \n", "\n", - " screen_use_durationtotal screen_on_durationtotal \\\n", - "2019-08-05 00:00:00+03:00 6000.000 9000.000 \n", - "2019-08-06 00:00:00+03:00 15000.000 27000.000 \n", - "2019-08-07 00:00:00+03:00 15000.000 21000.000 \n", - "2019-08-05 00:00:00+03:00 1.189 276.382 \n", - "2019-08-06 00:00:00+03:00 0.000 0.000 \n", - "\n", - " screen_off_durationtotal screen_on_count \\\n", - "2019-08-05 00:00:00+03:00 6000.000000 NaN \n", - "2019-08-06 00:00:00+03:00 24000.000000 NaN \n", - "2019-08-07 00:00:00+03:00 15000.000000 NaN \n", - "2019-08-05 00:00:00+03:00 287266.927999 NaN \n", - "2019-08-06 00:00:00+03:00 0.000000 NaN \n", - "\n", - " screen_use_count screen_off_count \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2019-08-06 00:00:00+03:00 NaN NaN \n", - "2019-08-07 00:00:00+03:00 NaN NaN \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2019-08-06 00:00:00+03:00 NaN NaN " + " screen_off_durationtotal screen_use_durationtotal \\\n", + "2019-08-05 00:00:00+03:00 6000.000000 6000.000 \n", + "2019-08-06 00:00:00+03:00 24000.000000 15000.000 \n", + "2019-08-07 00:00:00+03:00 15000.000000 15000.000 \n", + "2019-08-05 00:00:00+03:00 287266.927999 1.189 \n", + "2019-08-06 00:00:00+03:00 0.000000 0.000 \n", + "\n", + " screen_on_durationtotal screen_off_count \\\n", + "2019-08-05 00:00:00+03:00 9000.000 NaN \n", + "2019-08-06 00:00:00+03:00 27000.000 NaN \n", + "2019-08-07 00:00:00+03:00 21000.000 NaN \n", + "2019-08-05 00:00:00+03:00 276.382 NaN \n", + "2019-08-06 00:00:00+03:00 0.000 NaN \n", + "\n", + " screen_use_count screen_on_count \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2019-08-06 00:00:00+03:00 NaN NaN \n", + "2019-08-07 00:00:00+03:00 NaN NaN \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2019-08-06 00:00:00+03:00 NaN NaN " ] }, "execution_count": 21, @@ -1981,12 +1981,12 @@ " \n", " user\n", " device\n", + " screen_off_durationtotal\n", " screen_use_durationtotal\n", " screen_on_durationtotal\n", - " screen_off_durationtotal\n", - " screen_on_count\n", - " screen_use_count\n", " screen_off_count\n", + " screen_use_count\n", + " screen_on_count\n", " \n", " \n", " \n", @@ -1997,9 +1997,9 @@ " NaN\n", " NaN\n", " NaN\n", - " 7.0\n", - " 5.0\n", " 8.0\n", + " 5.0\n", + " 7.0\n", " \n", " \n", " 2020-01-09 05:05:00+02:00\n", @@ -2041,9 +2041,9 @@ " NaN\n", " NaN\n", " NaN\n", - " 12.0\n", - " 3.0\n", " 11.0\n", + " 3.0\n", + " 12.0\n", " \n", " \n", "\n", @@ -2057,26 +2057,26 @@ "2020-01-09 15:05:00+02:00 jd9INuQ5BBlW OWd1Uau8POix \n", "2020-01-09 20:05:00+02:00 jd9INuQ5BBlW OWd1Uau8POix \n", "\n", - " screen_use_durationtotal screen_on_durationtotal \\\n", - "2020-01-09 00:05:00+02:00 NaN NaN \n", - "2020-01-09 05:05:00+02:00 NaN NaN \n", - "2020-01-09 10:05:00+02:00 NaN NaN \n", - "2020-01-09 15:05:00+02:00 NaN NaN \n", - "2020-01-09 20:05:00+02:00 NaN NaN \n", - "\n", - " screen_off_durationtotal screen_on_count \\\n", - "2020-01-09 00:05:00+02:00 NaN 7.0 \n", - "2020-01-09 05:05:00+02:00 NaN 0.0 \n", - "2020-01-09 10:05:00+02:00 NaN 9.0 \n", - "2020-01-09 15:05:00+02:00 NaN 17.0 \n", - "2020-01-09 20:05:00+02:00 NaN 12.0 \n", - "\n", - " screen_use_count screen_off_count \n", - "2020-01-09 00:05:00+02:00 5.0 8.0 \n", - "2020-01-09 05:05:00+02:00 0.0 0.0 \n", - "2020-01-09 10:05:00+02:00 3.0 9.0 \n", - "2020-01-09 15:05:00+02:00 7.0 17.0 \n", - "2020-01-09 20:05:00+02:00 3.0 11.0 " + " screen_off_durationtotal screen_use_durationtotal \\\n", + "2020-01-09 00:05:00+02:00 NaN NaN \n", + "2020-01-09 05:05:00+02:00 NaN NaN \n", + "2020-01-09 10:05:00+02:00 NaN NaN \n", + "2020-01-09 15:05:00+02:00 NaN NaN \n", + "2020-01-09 20:05:00+02:00 NaN NaN \n", + "\n", + " screen_on_durationtotal screen_off_count \\\n", + "2020-01-09 00:05:00+02:00 NaN 8.0 \n", + "2020-01-09 05:05:00+02:00 NaN 0.0 \n", + "2020-01-09 10:05:00+02:00 NaN 9.0 \n", + "2020-01-09 15:05:00+02:00 NaN 17.0 \n", + "2020-01-09 20:05:00+02:00 NaN 11.0 \n", + "\n", + " screen_use_count screen_on_count \n", + "2020-01-09 00:05:00+02:00 5.0 7.0 \n", + "2020-01-09 05:05:00+02:00 0.0 0.0 \n", + "2020-01-09 10:05:00+02:00 3.0 9.0 \n", + "2020-01-09 15:05:00+02:00 7.0 17.0 \n", + "2020-01-09 20:05:00+02:00 3.0 12.0 " ] }, "execution_count": 22, @@ -2155,24 +2155,24 @@ " \n", " user\n", " device\n", - " screen_on_count\n", - " screen_use_count\n", " screen_off_count\n", + " screen_use_count\n", + " screen_on_count\n", + " screen_off_durationtotal\n", " screen_use_durationtotal\n", " screen_on_durationtotal\n", - " screen_off_durationtotal\n", - " screen_off_durationminimum\n", " screen_on_durationminimum\n", + " screen_off_durationminimum\n", " ...\n", - " screen_use_durationmean\n", - " screen_on_durationmean\n", " screen_off_durationmean\n", - " screen_use_durationmedian\n", - " screen_off_durationmedian\n", + " screen_on_durationmean\n", + " screen_use_durationmean\n", " screen_on_durationmedian\n", - " screen_use_durationstd\n", + " screen_off_durationmedian\n", + " screen_use_durationmedian\n", " screen_off_durationstd\n", " screen_on_durationstd\n", + " screen_use_durationstd\n", " first_unlock\n", " \n", " \n", @@ -2208,18 +2208,18 @@ " 1.0\n", " 1.0\n", " 1.0\n", + " 0.005\n", " 28.930\n", " 8.253\n", - " 0.005\n", - " 0.005\n", " 8.253\n", + " 0.005\n", " ...\n", - " 28.930\n", - " 8.253000\n", " 0.005000\n", + " 8.253000\n", " 28.930\n", - " 0.005\n", " 8.2530\n", + " 0.005\n", + " 28.930\n", " NaN\n", " NaN\n", " NaN\n", @@ -2229,48 +2229,48 @@ " 2020-01-09 21:00:00+02:00\n", " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", - " 2.0\n", " 1.0\n", " 1.0\n", + " 2.0\n", + " 0.010\n", " 39.087\n", " 11.158\n", - " 0.010\n", - " 0.010\n", " 5.234\n", + " 0.010\n", " ...\n", - " 39.087\n", - " 5.579000\n", " 0.010000\n", + " 5.579000\n", " 39.087\n", - " 0.010\n", " 5.5790\n", - " NaN\n", + " 0.010\n", + " 39.087\n", " NaN\n", " 0.487904\n", + " NaN\n", " NaT\n", " \n", " \n", " 2020-01-09 21:30:00+02:00\n", " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", - " 4.0\n", - " 1.0\n", " 5.0\n", + " 1.0\n", + " 4.0\n", + " 46.028\n", " 101.062\n", " 376.930\n", - " 46.028\n", - " 0.006\n", " 33.834\n", + " 0.006\n", " ...\n", - " 101.062\n", - " 94.232500\n", " 9.205600\n", + " 94.232500\n", " 101.062\n", - " 0.012\n", " 73.2835\n", - " NaN\n", + " 0.012\n", + " 101.062\n", " 20.561987\n", " 71.990324\n", + " NaN\n", " NaT\n", " \n", " \n", @@ -2280,18 +2280,18 @@ " 1.0\n", " 0.0\n", " 1.0\n", + " 0.011\n", " NaN\n", " 154.643\n", - " 0.011\n", - " 0.011\n", " 154.643\n", + " 0.011\n", " ...\n", - " NaN\n", - " 154.643000\n", " 0.011000\n", + " 154.643000\n", " NaN\n", - " 0.011\n", " 154.6430\n", + " 0.011\n", + " NaN\n", " NaN\n", " NaN\n", " NaN\n", @@ -2304,8 +2304,8 @@ " 0.0\n", " 0.0\n", " 0.0\n", - " NaN\n", " 0.000\n", + " NaN\n", " 0.000\n", " NaN\n", " NaN\n", @@ -2325,24 +2325,24 @@ " 2020-01-09 23:00:00+02:00\n", " jd9INuQ5BBlW\n", " OWd1Uau8POix\n", - " 4.0\n", - " 0.0\n", " 3.0\n", + " 0.0\n", + " 4.0\n", + " 0.025\n", " NaN\n", " 6.931\n", - " 0.025\n", - " 0.008\n", " 2.079\n", + " 0.008\n", " ...\n", - " NaN\n", - " 2.310333\n", " 0.008333\n", + " 2.310333\n", " NaN\n", - " 0.008\n", " 2.2620\n", + " 0.008\n", " NaN\n", " 0.000577\n", " 0.258906\n", + " NaN\n", " NaT\n", " \n", " \n", @@ -2423,101 +2423,89 @@ "" ], "text/plain": [ - " user device screen_on_count \\\n", - "2020-01-09 20:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 0.0 \n", - "2020-01-09 20:30:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 1.0 \n", - "2020-01-09 21:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 2.0 \n", - "2020-01-09 21:30:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 4.0 \n", - "2020-01-09 22:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 1.0 \n", - "2020-01-09 22:30:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 0.0 \n", - "2020-01-09 23:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 4.0 \n", - "2019-08-05 00:00:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo NaN \n", - "2019-08-05 00:00:00+03:00 iGyXetHE3S8u Cq9vueHh3zVs NaN \n", - "2020-01-09 00:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix NaN \n", - "\n", - " screen_use_count screen_off_count \\\n", - "2020-01-09 20:00:00+02:00 0.0 0.0 \n", - "2020-01-09 20:30:00+02:00 1.0 1.0 \n", - "2020-01-09 21:00:00+02:00 1.0 1.0 \n", - "2020-01-09 21:30:00+02:00 1.0 5.0 \n", - "2020-01-09 22:00:00+02:00 0.0 1.0 \n", - "2020-01-09 22:30:00+02:00 0.0 0.0 \n", - "2020-01-09 23:00:00+02:00 0.0 3.0 \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2020-01-09 00:00:00+02:00 NaN NaN \n", - "\n", - " screen_use_durationtotal screen_on_durationtotal \\\n", - "2020-01-09 20:00:00+02:00 0.000 0.000 \n", - "2020-01-09 20:30:00+02:00 28.930 8.253 \n", - "2020-01-09 21:00:00+02:00 39.087 11.158 \n", - "2020-01-09 21:30:00+02:00 101.062 376.930 \n", - "2020-01-09 22:00:00+02:00 NaN 154.643 \n", - "2020-01-09 22:30:00+02:00 NaN 0.000 \n", - "2020-01-09 23:00:00+02:00 NaN 6.931 \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2020-01-09 00:00:00+02:00 NaN NaN \n", - "\n", - " screen_off_durationtotal \\\n", - "2020-01-09 20:00:00+02:00 0.000 \n", - "2020-01-09 20:30:00+02:00 0.005 \n", - "2020-01-09 21:00:00+02:00 0.010 \n", - "2020-01-09 21:30:00+02:00 46.028 \n", - "2020-01-09 22:00:00+02:00 0.011 \n", - "2020-01-09 22:30:00+02:00 0.000 \n", - "2020-01-09 23:00:00+02:00 0.025 \n", - "2019-08-05 00:00:00+03:00 NaN \n", - "2019-08-05 00:00:00+03:00 NaN \n", - "2020-01-09 00:00:00+02:00 NaN \n", - "\n", - " screen_off_durationminimum \\\n", - "2020-01-09 20:00:00+02:00 NaN \n", - "2020-01-09 20:30:00+02:00 0.005 \n", - "2020-01-09 21:00:00+02:00 0.010 \n", - "2020-01-09 21:30:00+02:00 0.006 \n", - "2020-01-09 22:00:00+02:00 0.011 \n", - "2020-01-09 22:30:00+02:00 NaN \n", - "2020-01-09 23:00:00+02:00 0.008 \n", - "2019-08-05 00:00:00+03:00 NaN \n", - "2019-08-05 00:00:00+03:00 NaN \n", - "2020-01-09 00:00:00+02:00 NaN \n", - "\n", - " screen_on_durationminimum ... \\\n", - "2020-01-09 20:00:00+02:00 NaN ... \n", - "2020-01-09 20:30:00+02:00 8.253 ... \n", - "2020-01-09 21:00:00+02:00 5.234 ... \n", - "2020-01-09 21:30:00+02:00 33.834 ... \n", - "2020-01-09 22:00:00+02:00 154.643 ... \n", - "2020-01-09 22:30:00+02:00 NaN ... \n", - "2020-01-09 23:00:00+02:00 2.079 ... \n", - "2019-08-05 00:00:00+03:00 NaN ... \n", - "2019-08-05 00:00:00+03:00 NaN ... \n", - "2020-01-09 00:00:00+02:00 NaN ... \n", - "\n", - " screen_use_durationmean screen_on_durationmean \\\n", + " user device screen_off_count \\\n", + "2020-01-09 20:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 0.0 \n", + "2020-01-09 20:30:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 1.0 \n", + "2020-01-09 21:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 1.0 \n", + "2020-01-09 21:30:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 5.0 \n", + "2020-01-09 22:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 1.0 \n", + "2020-01-09 22:30:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 0.0 \n", + "2020-01-09 23:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix 3.0 \n", + "2019-08-05 00:00:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo NaN \n", + "2019-08-05 00:00:00+03:00 iGyXetHE3S8u Cq9vueHh3zVs NaN \n", + "2020-01-09 00:00:00+02:00 jd9INuQ5BBlW OWd1Uau8POix NaN \n", + "\n", + " screen_use_count screen_on_count \\\n", + "2020-01-09 20:00:00+02:00 0.0 0.0 \n", + "2020-01-09 20:30:00+02:00 1.0 1.0 \n", + "2020-01-09 21:00:00+02:00 1.0 2.0 \n", + "2020-01-09 21:30:00+02:00 1.0 4.0 \n", + "2020-01-09 22:00:00+02:00 0.0 1.0 \n", + "2020-01-09 22:30:00+02:00 0.0 0.0 \n", + "2020-01-09 23:00:00+02:00 0.0 4.0 \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2020-01-09 00:00:00+02:00 NaN NaN \n", + "\n", + " screen_off_durationtotal screen_use_durationtotal \\\n", + "2020-01-09 20:00:00+02:00 0.000 0.000 \n", + "2020-01-09 20:30:00+02:00 0.005 28.930 \n", + "2020-01-09 21:00:00+02:00 0.010 39.087 \n", + "2020-01-09 21:30:00+02:00 46.028 101.062 \n", + "2020-01-09 22:00:00+02:00 0.011 NaN \n", + "2020-01-09 22:30:00+02:00 0.000 NaN \n", + "2020-01-09 23:00:00+02:00 0.025 NaN \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2020-01-09 00:00:00+02:00 NaN NaN \n", + "\n", + " screen_on_durationtotal screen_on_durationminimum \\\n", + "2020-01-09 20:00:00+02:00 0.000 NaN \n", + "2020-01-09 20:30:00+02:00 8.253 8.253 \n", + "2020-01-09 21:00:00+02:00 11.158 5.234 \n", + "2020-01-09 21:30:00+02:00 376.930 33.834 \n", + "2020-01-09 22:00:00+02:00 154.643 154.643 \n", + "2020-01-09 22:30:00+02:00 0.000 NaN \n", + "2020-01-09 23:00:00+02:00 6.931 2.079 \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2020-01-09 00:00:00+02:00 NaN NaN \n", + "\n", + " screen_off_durationminimum ... \\\n", + "2020-01-09 20:00:00+02:00 NaN ... \n", + "2020-01-09 20:30:00+02:00 0.005 ... \n", + "2020-01-09 21:00:00+02:00 0.010 ... \n", + "2020-01-09 21:30:00+02:00 0.006 ... \n", + "2020-01-09 22:00:00+02:00 0.011 ... \n", + "2020-01-09 22:30:00+02:00 NaN ... \n", + "2020-01-09 23:00:00+02:00 0.008 ... \n", + "2019-08-05 00:00:00+03:00 NaN ... \n", + "2019-08-05 00:00:00+03:00 NaN ... \n", + "2020-01-09 00:00:00+02:00 NaN ... \n", + "\n", + " screen_off_durationmean screen_on_durationmean \\\n", "2020-01-09 20:00:00+02:00 NaN NaN \n", - "2020-01-09 20:30:00+02:00 28.930 8.253000 \n", - "2020-01-09 21:00:00+02:00 39.087 5.579000 \n", - "2020-01-09 21:30:00+02:00 101.062 94.232500 \n", - "2020-01-09 22:00:00+02:00 NaN 154.643000 \n", + "2020-01-09 20:30:00+02:00 0.005000 8.253000 \n", + "2020-01-09 21:00:00+02:00 0.010000 5.579000 \n", + "2020-01-09 21:30:00+02:00 9.205600 94.232500 \n", + "2020-01-09 22:00:00+02:00 0.011000 154.643000 \n", "2020-01-09 22:30:00+02:00 NaN NaN \n", - "2020-01-09 23:00:00+02:00 NaN 2.310333 \n", + "2020-01-09 23:00:00+02:00 0.008333 2.310333 \n", "2019-08-05 00:00:00+03:00 NaN NaN \n", "2019-08-05 00:00:00+03:00 NaN NaN \n", "2020-01-09 00:00:00+02:00 NaN NaN \n", "\n", - " screen_off_durationmean screen_use_durationmedian \\\n", - "2020-01-09 20:00:00+02:00 NaN NaN \n", - "2020-01-09 20:30:00+02:00 0.005000 28.930 \n", - "2020-01-09 21:00:00+02:00 0.010000 39.087 \n", - "2020-01-09 21:30:00+02:00 9.205600 101.062 \n", - "2020-01-09 22:00:00+02:00 0.011000 NaN \n", - "2020-01-09 22:30:00+02:00 NaN NaN \n", - "2020-01-09 23:00:00+02:00 0.008333 NaN \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2020-01-09 00:00:00+02:00 NaN NaN \n", + " screen_use_durationmean screen_on_durationmedian \\\n", + "2020-01-09 20:00:00+02:00 NaN NaN \n", + "2020-01-09 20:30:00+02:00 28.930 8.2530 \n", + "2020-01-09 21:00:00+02:00 39.087 5.5790 \n", + "2020-01-09 21:30:00+02:00 101.062 73.2835 \n", + "2020-01-09 22:00:00+02:00 NaN 154.6430 \n", + "2020-01-09 22:30:00+02:00 NaN NaN \n", + "2020-01-09 23:00:00+02:00 NaN 2.2620 \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2020-01-09 00:00:00+02:00 NaN NaN \n", "\n", " screen_off_durationmedian \\\n", "2020-01-09 20:00:00+02:00 NaN \n", @@ -2531,29 +2519,29 @@ "2019-08-05 00:00:00+03:00 NaN \n", "2020-01-09 00:00:00+02:00 NaN \n", "\n", - " screen_on_durationmedian screen_use_durationstd \\\n", - "2020-01-09 20:00:00+02:00 NaN NaN \n", - "2020-01-09 20:30:00+02:00 8.2530 NaN \n", - "2020-01-09 21:00:00+02:00 5.5790 NaN \n", - "2020-01-09 21:30:00+02:00 73.2835 NaN \n", - "2020-01-09 22:00:00+02:00 154.6430 NaN \n", - "2020-01-09 22:30:00+02:00 NaN NaN \n", - "2020-01-09 23:00:00+02:00 2.2620 NaN \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2020-01-09 00:00:00+02:00 NaN NaN \n", - "\n", - " screen_off_durationstd screen_on_durationstd \\\n", - "2020-01-09 20:00:00+02:00 NaN NaN \n", - "2020-01-09 20:30:00+02:00 NaN NaN \n", - "2020-01-09 21:00:00+02:00 NaN 0.487904 \n", - "2020-01-09 21:30:00+02:00 20.561987 71.990324 \n", - "2020-01-09 22:00:00+02:00 NaN NaN \n", - "2020-01-09 22:30:00+02:00 NaN NaN \n", - "2020-01-09 23:00:00+02:00 0.000577 0.258906 \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2019-08-05 00:00:00+03:00 NaN NaN \n", - "2020-01-09 00:00:00+02:00 NaN NaN \n", + " screen_use_durationmedian screen_off_durationstd \\\n", + "2020-01-09 20:00:00+02:00 NaN NaN \n", + "2020-01-09 20:30:00+02:00 28.930 NaN \n", + "2020-01-09 21:00:00+02:00 39.087 NaN \n", + "2020-01-09 21:30:00+02:00 101.062 20.561987 \n", + "2020-01-09 22:00:00+02:00 NaN NaN \n", + "2020-01-09 22:30:00+02:00 NaN NaN \n", + "2020-01-09 23:00:00+02:00 NaN 0.000577 \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2020-01-09 00:00:00+02:00 NaN NaN \n", + "\n", + " screen_on_durationstd screen_use_durationstd \\\n", + "2020-01-09 20:00:00+02:00 NaN NaN \n", + "2020-01-09 20:30:00+02:00 NaN NaN \n", + "2020-01-09 21:00:00+02:00 0.487904 NaN \n", + "2020-01-09 21:30:00+02:00 71.990324 NaN \n", + "2020-01-09 22:00:00+02:00 NaN NaN \n", + "2020-01-09 22:30:00+02:00 NaN NaN \n", + "2020-01-09 23:00:00+02:00 0.258906 NaN \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2019-08-05 00:00:00+03:00 NaN NaN \n", + "2020-01-09 00:00:00+02:00 NaN NaN \n", "\n", " first_unlock \n", "2020-01-09 20:00:00+02:00 NaT \n", @@ -2605,19 +2593,12 @@ "metadata": {}, "outputs": [], "source": [ - "def screen_last_unlock(df, bat, config=None):\n", - " if not \"screen_column_name\" in config:\n", - " col_name = \"screen_status\"\n", - " else:\n", - " col_name = config[\"screen_column_name\"]\n", - " if not \"resample_args\" in config.keys():\n", - " config[\"resample_args\"] = {\"rule\":\"30T\"}\n", - " \n", - " df2 = s.util_screen(df, bat, config)\n", - " df2 = s.event_classification_screen(df2, config)\n", + "def screen_last_unlock(df, bat, screen_column_name = \"screen_status\", resample_args = {\"rule\":\"30T\"}): \n", + " df2 = s.util_screen(df, bat, screen_column_name=screen_column_name)\n", + " df2 = s.event_classification_screen(df2, screen_column_name=screen_column_name)\n", " \n", " df2[\"time\"] = df2.index\n", - " result = df2[df2.on==1].groupby([\"user\", \"device\"])[\"time\"].resample(rule='1D').max()\n", + " result = df2[df2.on==1].groupby([\"user\", \"device\"])[\"time\"].resample(**resample_args).max()\n", " result = result.to_frame(name=\"first_unlock\")\n", " result = result.reset_index([\"user\", \"device\"])\n", " \n", @@ -2638,28 +2619,14 @@ "execution_count": 26, "id": "0ee78bf7", "metadata": {}, - "outputs": [ - { - "ename": "TypeError", - "evalue": "argument of type 'NoneType' is not iterable", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[26], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m customized_features \u001b[38;5;241m=\u001b[39m \u001b[43ms\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mextract_features_screen\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdata\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbat_data\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfeatures\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m{\u001b[49m\u001b[43mscreen_last_unlock\u001b[49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43m{\u001b[49m\u001b[43m}\u001b[49m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/src/niimpy/niimpy/preprocessing/screen.py:585\u001b[0m, in \u001b[0;36mextract_features_screen\u001b[0;34m(df, bat, features)\u001b[0m\n\u001b[1;32m 583\u001b[0m computed_features \u001b[38;5;241m=\u001b[39m []\n\u001b[1;32m 584\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m feature, feature_arg \u001b[38;5;129;01min\u001b[39;00m features\u001b[38;5;241m.\u001b[39mitems():\n\u001b[0;32m--> 585\u001b[0m computed_feature \u001b[38;5;241m=\u001b[39m \u001b[43mfeature\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbat\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mfeature_arg\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 586\u001b[0m computed_feature \u001b[38;5;241m=\u001b[39m util\u001b[38;5;241m.\u001b[39mset_conserved_index(computed_feature)\n\u001b[1;32m 587\u001b[0m computed_features\u001b[38;5;241m.\u001b[39mappend(computed_feature)\n", - "Cell \u001b[0;32mIn[25], line 2\u001b[0m, in \u001b[0;36mscreen_last_unlock\u001b[0;34m(df, bat, config)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mscreen_last_unlock\u001b[39m(df, bat, config\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m):\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mscreen_column_name\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mconfig\u001b[49m:\n\u001b[1;32m 3\u001b[0m col_name \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mscreen_status\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n", - "\u001b[0;31mTypeError\u001b[0m: argument of type 'NoneType' is not iterable" - ] - } - ], + "outputs": [], "source": [ "customized_features = s.extract_features_screen(data, bat_data, features={screen_last_unlock: {}})" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 27, "id": "babdda7a", "metadata": {}, "outputs": [ @@ -2691,56 +2658,56 @@ " \n", " \n", " \n", - " 2019-08-05 00:00:00+03:00\n", - " iGyXetHE3S8u\n", - " Cq9vueHh3zVs\n", - " 2019-08-05 14:49:45.596999936+03:00\n", + " 2019-08-05 16:30:00+03:00\n", + " dvWdLQesv21a\n", + " i8jmoIuoe12Mo\n", + " 2019-08-05 16:32:41.009999990+03:00\n", " \n", " \n", - " 2019-08-06 00:00:00+03:00\n", - " iGyXetHE3S8u\n", - " Cq9vueHh3zVs\n", + " 2019-08-05 17:00:00+03:00\n", + " dvWdLQesv21a\n", + " i8jmoIuoe12Mo\n", " NaT\n", " \n", " \n", - " 2019-08-07 00:00:00+03:00\n", - " iGyXetHE3S8u\n", - " Cq9vueHh3zVs\n", + " 2019-08-05 17:30:00+03:00\n", + " dvWdLQesv21a\n", + " i8jmoIuoe12Mo\n", " NaT\n", " \n", " \n", - " 2019-08-08 00:00:00+03:00\n", - " iGyXetHE3S8u\n", - " Cq9vueHh3zVs\n", - " 2019-08-08 22:44:13.834000128+03:00\n", + " 2019-08-05 18:00:00+03:00\n", + " dvWdLQesv21a\n", + " i8jmoIuoe12Mo\n", + " NaT\n", " \n", " \n", - " 2019-08-09 00:00:00+03:00\n", - " iGyXetHE3S8u\n", - " Cq9vueHh3zVs\n", - " 2019-08-09 07:50:33.224000+03:00\n", + " 2019-08-05 18:30:00+03:00\n", + " dvWdLQesv21a\n", + " i8jmoIuoe12Mo\n", + " NaT\n", " \n", " \n", "\n", "" ], "text/plain": [ - " user device \\\n", - "2019-08-05 00:00:00+03:00 iGyXetHE3S8u Cq9vueHh3zVs \n", - "2019-08-06 00:00:00+03:00 iGyXetHE3S8u Cq9vueHh3zVs \n", - "2019-08-07 00:00:00+03:00 iGyXetHE3S8u Cq9vueHh3zVs \n", - "2019-08-08 00:00:00+03:00 iGyXetHE3S8u Cq9vueHh3zVs \n", - "2019-08-09 00:00:00+03:00 iGyXetHE3S8u Cq9vueHh3zVs \n", + " user device \\\n", + "2019-08-05 16:30:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-05 17:00:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-05 17:30:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-05 18:00:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", + "2019-08-05 18:30:00+03:00 dvWdLQesv21a i8jmoIuoe12Mo \n", "\n", " first_unlock \n", - "2019-08-05 00:00:00+03:00 2019-08-05 14:49:45.596999936+03:00 \n", - "2019-08-06 00:00:00+03:00 NaT \n", - "2019-08-07 00:00:00+03:00 NaT \n", - "2019-08-08 00:00:00+03:00 2019-08-08 22:44:13.834000128+03:00 \n", - "2019-08-09 00:00:00+03:00 2019-08-09 07:50:33.224000+03:00 " + "2019-08-05 16:30:00+03:00 2019-08-05 16:32:41.009999990+03:00 \n", + "2019-08-05 17:00:00+03:00 NaT \n", + "2019-08-05 17:30:00+03:00 NaT \n", + "2019-08-05 18:00:00+03:00 NaT \n", + "2019-08-05 18:30:00+03:00 NaT " ] }, - "execution_count": 28, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" }