From 2281b6a0acf3daaf7f19d24b3ef0464aea94e601 Mon Sep 17 00:00:00 2001 From: rigel-B Date: Mon, 6 Sep 2021 13:38:44 +0200 Subject: [PATCH] midterm project update --- Connect Python_MySQL-D.ipynb | 62 +++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/Connect Python_MySQL-D.ipynb b/Connect Python_MySQL-D.ipynb index 90cf311..edf2bae 100644 --- a/Connect Python_MySQL-D.ipynb +++ b/Connect Python_MySQL-D.ipynb @@ -83,7 +83,7 @@ }, { "cell_type": "markdown", - "id": "fd2da802", + "id": "695d1a9f", "metadata": {}, "source": [ "Inspect the Data Base" @@ -100141,7 +100141,7 @@ { "cell_type": "code", "execution_count": 15, - "id": "8b8e1dff", + "id": "9a01ee48", "metadata": {}, "outputs": [ { @@ -100279,7 +100279,7 @@ { "cell_type": "code", "execution_count": 17, - "id": "f065e8a7", + "id": "996252de", "metadata": {}, "outputs": [ { @@ -100416,7 +100416,7 @@ { "cell_type": "code", "execution_count": 18, - "id": "09884db8", + "id": "c57f1f62", "metadata": {}, "outputs": [ { @@ -100516,7 +100516,7 @@ { "cell_type": "code", "execution_count": 25, - "id": "0ca2cd8d", + "id": "deccdcfb", "metadata": {}, "outputs": [ { @@ -100622,7 +100622,7 @@ { "cell_type": "code", "execution_count": 28, - "id": "457af3fd", + "id": "243a7aba", "metadata": {}, "outputs": [ { @@ -100746,12 +100746,12 @@ }, { "cell_type": "code", - "execution_count": 69, - "id": "31611c8d", + "execution_count": null, + "id": "f8fb5bfb", "metadata": {}, "outputs": [], "source": [ - "# query8 = \"SELECT * olist.order_items JOIN olist.order_status_year_price ON order_item_id\"\n", + "# query8 = \"select * from olist.order_items inner join olist.order_status_year_price on olist.order_items.order_item_id\"\n", "# res_df = pd.read_sql_query(query8, db_connection)\n", "# res_df.head()" ] @@ -100759,7 +100759,7 @@ { "cell_type": "code", "execution_count": 51, - "id": "ca02e3f6", + "id": "55e42743", "metadata": {}, "outputs": [ { @@ -100865,7 +100865,7 @@ { "cell_type": "code", "execution_count": 54, - "id": "59fd5502", + "id": "f8292c07", "metadata": {}, "outputs": [ { @@ -100995,7 +100995,7 @@ }, { "cell_type": "markdown", - "id": "8fc7b14a", + "id": "0991b4ef", "metadata": {}, "source": [ "### Data exploration" @@ -101004,7 +101004,7 @@ { "cell_type": "code", "execution_count": 21, - "id": "2956ef12", + "id": "bdc90223", "metadata": {}, "outputs": [ { @@ -101027,7 +101027,7 @@ { "cell_type": "code", "execution_count": 23, - "id": "cfac4819", + "id": "38fe57b2", "metadata": {}, "outputs": [ { @@ -101048,7 +101048,7 @@ { "cell_type": "code", "execution_count": 26, - "id": "dc2268f5", + "id": "8337af02", "metadata": {}, "outputs": [ { @@ -101069,7 +101069,7 @@ { "cell_type": "code", "execution_count": 29, - "id": "2fe8f647", + "id": "be67f1ea", "metadata": {}, "outputs": [ { @@ -101090,7 +101090,7 @@ { "cell_type": "code", "execution_count": 55, - "id": "d30a6203", + "id": "52c99399", "metadata": {}, "outputs": [ { @@ -101111,7 +101111,7 @@ { "cell_type": "code", "execution_count": 56, - "id": "471e0cfc", + "id": "a2dbc70c", "metadata": {}, "outputs": [ { @@ -101132,7 +101132,7 @@ { "cell_type": "code", "execution_count": 35, - "id": "cda20df7", + "id": "cefdc59c", "metadata": {}, "outputs": [ { @@ -101153,7 +101153,7 @@ { "cell_type": "code", "execution_count": 38, - "id": "b63018f5", + "id": "026c7343", "metadata": {}, "outputs": [ { @@ -101174,7 +101174,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f71fc7f", + "id": "ead6fe4b", "metadata": {}, "outputs": [], "source": [ @@ -101184,7 +101184,7 @@ { "cell_type": "code", "execution_count": 77, - "id": "a796e709", + "id": "5ed21e41", "metadata": {}, "outputs": [ { @@ -101213,7 +101213,7 @@ { "cell_type": "code", "execution_count": 78, - "id": "be8f7039", + "id": "83f47ac6", "metadata": {}, "outputs": [ { @@ -101242,7 +101242,7 @@ { "cell_type": "code", "execution_count": 79, - "id": "0271cb2d", + "id": "f6ab0605", "metadata": {}, "outputs": [ { @@ -101271,7 +101271,7 @@ { "cell_type": "code", "execution_count": 80, - "id": "ac8d3124", + "id": "5ca5e138", "metadata": {}, "outputs": [ { @@ -101300,7 +101300,7 @@ { "cell_type": "code", "execution_count": 36, - "id": "c098908b", + "id": "2b132eb3", "metadata": {}, "outputs": [ { @@ -101321,7 +101321,7 @@ { "cell_type": "code", "execution_count": 39, - "id": "09cd1275", + "id": "1eb9a2fc", "metadata": {}, "outputs": [ { @@ -101342,7 +101342,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f94b5920", + "id": "82c50770", "metadata": {}, "outputs": [], "source": [ @@ -101351,7 +101351,7 @@ }, { "cell_type": "markdown", - "id": "ccf39e09", + "id": "a26e6f38", "metadata": {}, "source": [ "### Data cleaning pipeline" @@ -101360,11 +101360,13 @@ { "cell_type": "code", "execution_count": null, - "id": "f69c99db", + "id": "9c206851", "metadata": {}, "outputs": [], "source": [ "def data_cleaning(df):\n", + " fillna(value=mean_xx)\n", + "\n", " df = df.dropna()\n", " \n", " \n",