From 1f20e6ff2cfdcdf1900567577b3022fa83b710bc Mon Sep 17 00:00:00 2001 From: ajoubrel-ensae Date: Mon, 1 Jan 2024 12:31:02 +0000 Subject: [PATCH] Update --- Notebook_AJ.ipynb | 95 ++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 64 deletions(-) diff --git a/Notebook_AJ.ipynb b/Notebook_AJ.ipynb index 0b73ffc..f61e733 100644 --- a/Notebook_AJ.ipynb +++ b/Notebook_AJ.ipynb @@ -124,7 +124,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 4, "id": "ba9d04ad-6cc1-4bac-b1a0-44bedfb09763", "metadata": {}, "outputs": [], @@ -148,7 +148,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 5, "id": "cacaecc1-4d8a-4e20-8cd3-b452cf17db56", "metadata": {}, "outputs": [], @@ -161,7 +161,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 6, "id": "2ec4b583-dc64-43e9-b3ae-6bbaee0bc135", "metadata": {}, "outputs": [ @@ -192,28 +192,28 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 7, "id": "77894273-b3e5-4f29-bd63-9f4df8082b9b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0 2021-03-28 18:01:09+02:00\n", - "1 2021-03-28 18:01:09+02:00\n", - "2 2021-03-28 18:00:59+02:00\n", - "3 2021-03-28 18:00:59+02:00\n", - "4 2021-03-28 18:01:06+02:00\n", - " ... \n", - "6214803 2023-10-23 11:32:33+02:00\n", - "6214804 2023-10-23 11:32:49+02:00\n", - "6214805 2023-10-23 11:33:28+02:00\n", - "6214806 2023-10-23 11:31:53+02:00\n", - "6214807 2023-10-23 11:33:54+02:00\n", - "Name: sent_at, Length: 6214808, dtype: object" + "0 2021-03-28 16:01:09+00:00\n", + "1 2021-03-28 16:01:09+00:00\n", + "2 2021-03-28 16:00:59+00:00\n", + "3 2021-03-28 16:00:59+00:00\n", + "4 2021-03-28 16:01:06+00:00\n", + " ... \n", + "6214803 2023-10-23 09:32:33+00:00\n", + "6214804 2023-10-23 09:32:49+00:00\n", + "6214805 2023-10-23 09:33:28+00:00\n", + "6214806 2023-10-23 09:31:53+00:00\n", + "6214807 2023-10-23 09:33:54+00:00\n", + "Name: sent_at, Length: 6214808, dtype: datetime64[ns, UTC]" ] }, - "execution_count": 26, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -232,7 +232,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 8, "id": "4223c873-cbd3-46d1-ac96-c9a3b9e97092", "metadata": {}, "outputs": [ @@ -240,7 +240,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/tmp/ipykernel_426/4118060109.py:9: DtypeWarning: Columns (20) have mixed types. Specify dtype option on import or set low_memory=False.\n", + "/tmp/ipykernel_1362/4118060109.py:9: DtypeWarning: Columns (20) have mixed types. Specify dtype option on import or set low_memory=False.\n", " customers_plus_2 = pd.read_csv(file_in, sep=\",\")\n" ] } @@ -259,7 +259,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 10, "id": "460f853a-68c0-42a7-9877-b83d3aaec813", "metadata": {}, "outputs": [ @@ -280,81 +280,48 @@ " dtype='object')" ] }, - "execution_count": 39, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "customers_plus.columns" + "customers_plus_1.columns" ] }, { "cell_type": "code", - "execution_count": 43, + "execution_count": null, "id": "d5a9398f-72fc-4548-9f53-b20b372144b2", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(151866, 43)" - ] - }, - "execution_count": 43, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "customers_plus.shape" + "customers_plus_1.shape" ] }, { "cell_type": "code", - "execution_count": 52, + "execution_count": null, "id": "7467ddbe-0bd4-44cc-8a16-84aa41853638", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "151866" - ] - }, - "execution_count": 52, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "customers_plus_1['id'].nunique()" ] }, { "cell_type": "code", - "execution_count": 53, + "execution_count": null, "id": "e15f05f8-3a89-4fc3-84a9-dae70e168440", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "275622" - ] - }, - "execution_count": 53, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "customers_plus_2['id'].nunique()" ] }, { "cell_type": "code", - "execution_count": 55, + "execution_count": null, "id": "b40a653e-013f-48d0-8b57-0284587b36c5", "metadata": {}, "outputs": [], @@ -445,7 +412,7 @@ } ], "source": [ - "print(customers_plus.isna().mean()*100)" + "pd.DataFrame(customers_plus_1.isna().mean()*100)" ] } ],