From af3220ce3e38b48e402bbc319d621150b77fd3e9 Mon Sep 17 00:00:00 2001 From: javad787 <74126351+javad787@users.noreply.github.com> Date: Sat, 16 Dec 2023 12:08:53 +0330 Subject: [PATCH 1/2] Add files via upload --- pandas_q.ipynb | 543 +++++++++++++++++++++++++++++++++++++++++++++++++ python_q.ipynb | 117 +++++++++++ 2 files changed, 660 insertions(+) create mode 100644 pandas_q.ipynb create mode 100644 python_q.ipynb diff --git a/pandas_q.ipynb b/pandas_q.ipynb new file mode 100644 index 0000000..d74e30c --- /dev/null +++ b/pandas_q.ipynb @@ -0,0 +1,543 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "id": "w9JF9U0GL6VR" + }, + "outputs": [], + "source": [ + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 363 + }, + "id": "foyH8052MUCC", + "outputId": "a239f577-8d66-4608-9a11-b55e2bb89ecc" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | id | \n", + "client_id | \n", + "driver_id | \n", + "city_id | \n", + "status | \n", + "request_at | \n", + "
---|---|---|---|---|---|---|
0 | \n", + "1 | \n", + "1 | \n", + "10 | \n", + "1 | \n", + "completed | \n", + "2013-10-01 | \n", + "
1 | \n", + "2 | \n", + "2 | \n", + "11 | \n", + "1 | \n", + "cancelled_by_driver | \n", + "2013-10-01 | \n", + "
2 | \n", + "3 | \n", + "3 | \n", + "12 | \n", + "6 | \n", + "completed | \n", + "2013-10-01 | \n", + "
3 | \n", + "4 | \n", + "4 | \n", + "13 | \n", + "6 | \n", + "cancelled_by_client | \n", + "2013-10-01 | \n", + "
4 | \n", + "5 | \n", + "1 | \n", + "10 | \n", + "1 | \n", + "completed | \n", + "2013-10-02 | \n", + "
5 | \n", + "6 | \n", + "2 | \n", + "11 | \n", + "6 | \n", + "completed | \n", + "2013-10-02 | \n", + "
6 | \n", + "7 | \n", + "3 | \n", + "12 | \n", + "6 | \n", + "completed | \n", + "2013-10-02 | \n", + "
7 | \n", + "8 | \n", + "2 | \n", + "12 | \n", + "12 | \n", + "completed | \n", + "2013-10-03 | \n", + "
8 | \n", + "9 | \n", + "3 | \n", + "10 | \n", + "12 | \n", + "completed | \n", + "2013-10-03 | \n", + "
9 | \n", + "10 | \n", + "4 | \n", + "13 | \n", + "12 | \n", + "cancelled_by_driver | \n", + "2013-10-03 | \n", + "
\n", + " | users_id | \n", + "banned | \n", + "role | \n", + "
---|---|---|---|
0 | \n", + "1 | \n", + "False | \n", + "client | \n", + "
1 | \n", + "2 | \n", + "True | \n", + "client | \n", + "
2 | \n", + "3 | \n", + "False | \n", + "client | \n", + "
3 | \n", + "4 | \n", + "False | \n", + "client | \n", + "
4 | \n", + "10 | \n", + "False | \n", + "driver | \n", + "
5 | \n", + "11 | \n", + "False | \n", + "driver | \n", + "
6 | \n", + "12 | \n", + "False | \n", + "driver | \n", + "
7 | \n", + "13 | \n", + "False | \n", + "driver | \n", + "
\n", + " | Day | \n", + "Cancellation Rate | \n", + "
---|---|---|
0 | \n", + "2013-10-01 | \n", + "0.33 | \n", + "
1 | \n", + "2013-10-02 | \n", + "0.00 | \n", + "
2 | \n", + "2013-10-03 | \n", + "0.50 | \n", + "
\n", + " | Day | \n", + "Cancellation Rate | \n", + "
---|---|---|
0 | \n", + "2013-10-01 | \n", + "0.33 | \n", + "
1 | \n", + "2013-10-02 | \n", + "0.00 | \n", + "
2 | \n", + "2013-10-03 | \n", + "0.00 | \n", + "
\n", + " | age | \n", + "job | \n", + "marital | \n", + "education | \n", + "default | \n", + "balance | \n", + "housing | \n", + "loan | \n", + "contact | \n", + "day | \n", + "month | \n", + "duration | \n", + "campaign | \n", + "pdays | \n", + "previous | \n", + "poutcome | \n", + "y | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "58 | \n", + "management | \n", + "married | \n", + "tertiary | \n", + "no | \n", + "2143 | \n", + "yes | \n", + "no | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "261 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "no | \n", + "
1 | \n", + "44 | \n", + "technician | \n", + "single | \n", + "secondary | \n", + "no | \n", + "29 | \n", + "yes | \n", + "no | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "151 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "no | \n", + "
2 | \n", + "33 | \n", + "entrepreneur | \n", + "married | \n", + "secondary | \n", + "no | \n", + "2 | \n", + "yes | \n", + "yes | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "76 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "no | \n", + "
3 | \n", + "47 | \n", + "blue-collar | \n", + "married | \n", + "unknown | \n", + "no | \n", + "1506 | \n", + "yes | \n", + "no | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "92 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "no | \n", + "
4 | \n", + "33 | \n", + "unknown | \n", + "single | \n", + "unknown | \n", + "no | \n", + "1 | \n", + "no | \n", + "no | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "198 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "no | \n", + "
\n", + " | age | \n", + "balance | \n", + "day | \n", + "duration | \n", + "campaign | \n", + "pdays | \n", + "previous | \n", + "
---|---|---|---|---|---|---|---|
count | \n", + "45211.000000 | \n", + "45211.000000 | \n", + "45211.000000 | \n", + "45211.000000 | \n", + "45211.000000 | \n", + "45211.000000 | \n", + "45211.000000 | \n", + "
mean | \n", + "40.936210 | \n", + "1362.272058 | \n", + "15.806419 | \n", + "258.163080 | \n", + "2.763841 | \n", + "40.197828 | \n", + "0.580323 | \n", + "
std | \n", + "10.618762 | \n", + "3044.765829 | \n", + "8.322476 | \n", + "257.527812 | \n", + "3.098021 | \n", + "100.128746 | \n", + "2.303441 | \n", + "
min | \n", + "18.000000 | \n", + "-8019.000000 | \n", + "1.000000 | \n", + "0.000000 | \n", + "1.000000 | \n", + "-1.000000 | \n", + "0.000000 | \n", + "
25% | \n", + "33.000000 | \n", + "72.000000 | \n", + "8.000000 | \n", + "103.000000 | \n", + "1.000000 | \n", + "-1.000000 | \n", + "0.000000 | \n", + "
50% | \n", + "39.000000 | \n", + "448.000000 | \n", + "16.000000 | \n", + "180.000000 | \n", + "2.000000 | \n", + "-1.000000 | \n", + "0.000000 | \n", + "
75% | \n", + "48.000000 | \n", + "1428.000000 | \n", + "21.000000 | \n", + "319.000000 | \n", + "3.000000 | \n", + "-1.000000 | \n", + "0.000000 | \n", + "
max | \n", + "95.000000 | \n", + "102127.000000 | \n", + "31.000000 | \n", + "4918.000000 | \n", + "63.000000 | \n", + "871.000000 | \n", + "275.000000 | \n", + "
\n", + " | age | \n", + "job | \n", + "marital | \n", + "education | \n", + "default | \n", + "balance | \n", + "housing | \n", + "loan | \n", + "contact | \n", + "day | \n", + "month | \n", + "duration | \n", + "campaign | \n", + "pdays | \n", + "previous | \n", + "poutcome | \n", + "y | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "58 | \n", + "management | \n", + "married | \n", + "tertiary | \n", + "no | \n", + "2143 | \n", + "yes | \n", + "no | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "261 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "0 | \n", + "
1 | \n", + "44 | \n", + "technician | \n", + "single | \n", + "secondary | \n", + "no | \n", + "29 | \n", + "yes | \n", + "no | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "151 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "0 | \n", + "
2 | \n", + "33 | \n", + "entrepreneur | \n", + "married | \n", + "secondary | \n", + "no | \n", + "2 | \n", + "yes | \n", + "yes | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "76 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "0 | \n", + "
3 | \n", + "47 | \n", + "blue-collar | \n", + "married | \n", + "unknown | \n", + "no | \n", + "1506 | \n", + "yes | \n", + "no | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "92 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "0 | \n", + "
4 | \n", + "33 | \n", + "unknown | \n", + "single | \n", + "unknown | \n", + "no | \n", + "1 | \n", + "no | \n", + "no | \n", + "unknown | \n", + "5 | \n", + "may | \n", + "198 | \n", + "1 | \n", + "-1 | \n", + "0 | \n", + "unknown | \n", + "0 | \n", + "