From fa244ff5b065e9dd1cf5fe2b9006730e38ca6ad6 Mon Sep 17 00:00:00 2001 From: Maggie Brown <163785855+magatrons@users.noreply.github.com> Date: Sat, 16 Nov 2024 09:53:23 -0800 Subject: [PATCH 1/3] Created using Colab --- Assessment/Data_Analytics_with_Python_Assessment.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assessment/Data_Analytics_with_Python_Assessment.ipynb b/Assessment/Data_Analytics_with_Python_Assessment.ipynb index bfb5557..eb3d58b 100644 --- a/Assessment/Data_Analytics_with_Python_Assessment.ipynb +++ b/Assessment/Data_Analytics_with_Python_Assessment.ipynb @@ -20,7 +20,6 @@ "SRu7LPAYEOjw", "ZT4ReqO1EWyJ" ], - "authorship_tag": "ABX9TyPxgQWbcz0VylzXsR1503Zj", "include_colab_link": true }, "kernelspec": { @@ -39,7 +38,7 @@ "colab_type": "text" }, "source": [ - "\"Open" + "\"Open" ] }, { @@ -106,7 +105,8 @@ }, "outputs": [], "source": [ - "# Write your code here" + "# Write your code here\n", + "LAWIDh;ewfio;" ] }, { From 22a354302abc8aca59f0696daa4947cfdebe33ae Mon Sep 17 00:00:00 2001 From: Maggie Brown <163785855+magatrons@users.noreply.github.com> Date: Sat, 16 Nov 2024 09:54:54 -0800 Subject: [PATCH 2/3] Created using Colab --- Assessment/Data_Analytics_with_Python_Assessment.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assessment/Data_Analytics_with_Python_Assessment.ipynb b/Assessment/Data_Analytics_with_Python_Assessment.ipynb index eb3d58b..a96e0a6 100644 --- a/Assessment/Data_Analytics_with_Python_Assessment.ipynb +++ b/Assessment/Data_Analytics_with_Python_Assessment.ipynb @@ -106,7 +106,7 @@ "outputs": [], "source": [ "# Write your code here\n", - "LAWIDh;ewfio;" + "wdqHOUHeqwf" ] }, { From 1f59bf88a8b6db127e72c36c997d63bcb1a66919 Mon Sep 17 00:00:00 2001 From: Maggie Brown <163785855+magatrons@users.noreply.github.com> Date: Sat, 16 Nov 2024 14:05:36 -0800 Subject: [PATCH 3/3] Created using Colab --- ...ata_Analytics_with_Python_Assessment.ipynb | 1955 ++++++++++++++++- 1 file changed, 1905 insertions(+), 50 deletions(-) diff --git a/Assessment/Data_Analytics_with_Python_Assessment.ipynb b/Assessment/Data_Analytics_with_Python_Assessment.ipynb index a96e0a6..21005d9 100644 --- a/Assessment/Data_Analytics_with_Python_Assessment.ipynb +++ b/Assessment/Data_Analytics_with_Python_Assessment.ipynb @@ -99,14 +99,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "metadata": { "id": "4lXTHMaCC8VO" }, "outputs": [], "source": [ "# Write your code here\n", - "wdqHOUHeqwf" + "budget = 200\n", + "item_names_list = []\n", + "item_prices_list = []" ] }, { @@ -128,12 +130,28 @@ { "cell_type": "code", "source": [ - "# Write your code here" + "# Write your code here\n", + "def add_item_to_cart(item_name, item_price):\n", + " item_names_list.append(item_name)\n", + " item_prices_list.append(item_price)\n", + " return item_names_list, item_prices_list\n", + "\n", + "\n", + "def calculate_total(item_prices):\n", + " total = sum(item_prices)\n", + " if total > budget:\n", + " print(\"Budget exceeded!\")\n", + " return 0\n", + " elif total < budget and total > 100:\n", + " discount = total * 0.1\n", + " total -= discount\n", + " print(f\"Discounted total: ${total}\")\n", + " return total\n" ], "metadata": { "id": "g_UiAVHSD3UK" }, - "execution_count": null, + "execution_count": 23, "outputs": [] }, { @@ -154,24 +172,88 @@ { "cell_type": "code", "source": [ - "# Write your code here" + "# Write your code here\n", + "start = input(\"Type 'start' to begin: \")" ], "metadata": { - "id": "CJtjsE8YD6Mv" + "id": "CJtjsE8YD6Mv", + "outputId": "2c6e2f0c-e394-49e3-a644-658e8b76c7d0", + "colab": { + "base_uri": "https://localhost:8080/" + } }, - "execution_count": null, - "outputs": [] + "execution_count": 24, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Type 'start' to begin: start\n" + ] + } + ] }, { "cell_type": "code", "source": [ - "# Write your code here" + "\n", + "# Write your code here\n", + "while start == 'start':\n", + " item_name = input(\"Enter item name: \")\n", + " item_price = float(input(\"Enter item price: \"))\n", + " add_item_to_cart(item_name, item_price)\n", + " total = calculate_total(item_prices_list)\n", + " user_input = input(\"Enter 'done' to stop or press Enter to add another item: \")\n", + " if user_input == 'done':\n", + " break\n", + "\n", + "initial_total = sum(item_prices_list)\n", + "final_total = calculate_total(item_prices_list)\n", + "\n", + "print(\"\\nFinal Cart:\")\n", + "for i in range(len(item_names_list)):\n", + " print(f\"{item_names_list[i]}: ${item_prices_list[i]:.2f}\")\n", + "print(f\"Initial Total: ${initial_total:.2f}\")\n", + "if final_total < initial_total:\n", + " print(f\"Discount Applied: -${initial_total - final_total:.2f}\")\n", + "print(f\"Final Total: ${final_total:.2f}\")\n" ], "metadata": { - "id": "M9IlBMeDEOxd" + "id": "M9IlBMeDEOxd", + "outputId": "2566245a-1885-41ec-a2a7-b556606c6570", + "colab": { + "base_uri": "https://localhost:8080/" + } }, - "execution_count": null, - "outputs": [] + "execution_count": 25, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Enter item name: laptop\n", + "Enter item price: 120\n", + "Discounted total: $108.0\n", + "Enter 'done' to stop or press Enter to add another item: \n", + "Enter item name: cheese\n", + "Enter item price: 50\n", + "Discounted total: $153.0\n", + "Enter 'done' to stop or press Enter to add another item: \n", + "Enter item name: shirt\n", + "Enter item price: 60\n", + "Budget exceeded!\n", + "Enter 'done' to stop or press Enter to add another item: done\n", + "\n", + "Final Cart:\n", + "laptop: $120.00\n", + "cheese: $50.00\n", + "shirt: $60.00\n", + "Initial Total: $230.00\n", + "Discount Applied: -$230.00\n", + "Final Total: $0.00\n" + ] + } + ] }, { "cell_type": "markdown", @@ -200,12 +282,15 @@ { "cell_type": "code", "source": [ - "# Import necessary modules and libraries" + "# Import necessary modules and libraries\n", + "import pandas as pd\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt" ], "metadata": { "id": "zX8_bEfKSGcB" }, - "execution_count": null, + "execution_count": 27, "outputs": [] }, { @@ -222,13 +307,60 @@ { "cell_type": "code", "source": [ - "# Write code here" + "# Write code here\n", + "url = 'https://raw.githubusercontent.com/magatrons/PythonDA-course/refs/heads/main/Assessment/dataset.csv'\n", + "df = pd.read_csv(url)\n", + "df.head()\n", + "df.info()\n", + "# The dataset contains the following structure:\n", + "# - Rows: Represents individual entries, the total number of rows can be determined from the data.info() output.\n", + "# - Columns: Each column represents a variable in the dataset.\n", + "# - Data types: The data.info() output will detail the types (e.g., int64, float64, object).\n", + "# Example columns might include patient health indicators, diagnosis results, or other related features." ], "metadata": { - "id": "iN_Ne4xKSE_g" + "id": "iN_Ne4xKSE_g", + "outputId": "1e7cec65-b81b-4d95-eada-550513d2ee98", + "colab": { + "base_uri": "https://localhost:8080/" + } }, - "execution_count": null, - "outputs": [] + "execution_count": 29, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "RangeIndex: 5000 entries, 0 to 4999\n", + "Data columns (total 20 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 Employee_ID 5000 non-null object\n", + " 1 Age 5000 non-null int64 \n", + " 2 Gender 5000 non-null object\n", + " 3 Job_Role 5000 non-null object\n", + " 4 Industry 5000 non-null object\n", + " 5 Years_of_Experience 5000 non-null int64 \n", + " 6 Work_Location 5000 non-null object\n", + " 7 Hours_Worked_Per_Week 5000 non-null int64 \n", + " 8 Number_of_Virtual_Meetings 5000 non-null int64 \n", + " 9 Work_Life_Balance_Rating 5000 non-null int64 \n", + " 10 Stress_Level 5000 non-null object\n", + " 11 Mental_Health_Condition 3804 non-null object\n", + " 12 Access_to_Mental_Health_Resources 5000 non-null object\n", + " 13 Productivity_Change 5000 non-null object\n", + " 14 Social_Isolation_Rating 5000 non-null int64 \n", + " 15 Satisfaction_with_Remote_Work 5000 non-null object\n", + " 16 Company_Support_for_Remote_Work 5000 non-null int64 \n", + " 17 Physical_Activity 3371 non-null object\n", + " 18 Sleep_Quality 5000 non-null object\n", + " 19 Region 5000 non-null object\n", + "dtypes: int64(7), object(13)\n", + "memory usage: 781.4+ KB\n" + ] + } + ] }, { "cell_type": "markdown", @@ -243,13 +375,694 @@ { "cell_type": "code", "source": [ - "# Write code here" + "# Write code here\n", + "df.head(13)" ], "metadata": { - "id": "aojeUCP3-DlN" + "id": "aojeUCP3-DlN", + "outputId": "c6b065e3-fe70-4f02-fbf1-a22822f83107", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 693 + } }, - "execution_count": null, - "outputs": [] + "execution_count": 30, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + " Employee_ID Age Gender Job_Role Industry \\\n", + "0 EMP0001 32 Non-binary HR Healthcare \n", + "1 EMP0002 40 Female Data Scientist IT \n", + "2 EMP0003 59 Non-binary Software Engineer Education \n", + "3 EMP0004 27 Male Software Engineer Finance \n", + "4 EMP0005 49 Male Sales Consulting \n", + "5 EMP0006 59 Non-binary Sales IT \n", + "6 EMP0007 31 Prefer not to say Sales IT \n", + "7 EMP0008 42 Non-binary Data Scientist Manufacturing \n", + "8 EMP0009 56 Prefer not to say Data Scientist Healthcare \n", + "9 EMP0010 30 Female HR IT \n", + "10 EMP0011 33 Non-binary Software Engineer Finance \n", + "11 EMP0012 47 Female Marketing Consulting \n", + "12 EMP0013 40 Female Marketing Consulting \n", + "\n", + " Years_of_Experience Work_Location Hours_Worked_Per_Week \\\n", + "0 13 Hybrid 47 \n", + "1 3 Remote 52 \n", + "2 22 Hybrid 46 \n", + "3 20 Onsite 32 \n", + "4 32 Onsite 35 \n", + "5 31 Hybrid 39 \n", + "6 24 Remote 51 \n", + "7 6 Onsite 54 \n", + "8 9 Hybrid 24 \n", + "9 28 Hybrid 57 \n", + "10 17 Remote 48 \n", + "11 31 Hybrid 26 \n", + "12 1 Remote 21 \n", + "\n", + " Number_of_Virtual_Meetings Work_Life_Balance_Rating Stress_Level \\\n", + "0 7 2 Medium \n", + "1 4 1 Medium \n", + "2 11 5 Medium \n", + "3 8 4 High \n", + "4 12 2 High \n", + "5 3 4 High \n", + "6 7 3 Low \n", + "7 7 3 Medium \n", + "8 4 2 High \n", + "9 6 1 Low \n", + "10 3 3 High \n", + "11 12 4 Medium \n", + "12 7 2 High \n", + "\n", + " Mental_Health_Condition Access_to_Mental_Health_Resources \\\n", + "0 Depression No \n", + "1 Anxiety No \n", + "2 Anxiety No \n", + "3 Depression Yes \n", + "4 NaN Yes \n", + "5 NaN No \n", + "6 Anxiety Yes \n", + "7 Depression No \n", + "8 NaN Yes \n", + "9 Depression Yes \n", + "10 NaN Yes \n", + "11 NaN Yes \n", + "12 Depression Yes \n", + "\n", + " Productivity_Change Social_Isolation_Rating Satisfaction_with_Remote_Work \\\n", + "0 Decrease 1 Unsatisfied \n", + "1 Increase 3 Satisfied \n", + "2 No Change 4 Unsatisfied \n", + "3 Increase 3 Unsatisfied \n", + "4 Decrease 3 Unsatisfied \n", + "5 Increase 5 Unsatisfied \n", + "6 Decrease 5 Neutral \n", + "7 Decrease 5 Satisfied \n", + "8 Decrease 2 Unsatisfied \n", + "9 Decrease 2 Neutral \n", + "10 Decrease 4 Satisfied \n", + "11 No Change 4 Neutral \n", + "12 Decrease 2 Neutral \n", + "\n", + " Company_Support_for_Remote_Work Physical_Activity Sleep_Quality \\\n", + "0 1 Weekly Good \n", + "1 2 Weekly Good \n", + "2 5 NaN Poor \n", + "3 3 NaN Poor \n", + "4 3 Weekly Average \n", + "5 1 NaN Average \n", + "6 3 Daily Poor \n", + "7 4 NaN Average \n", + "8 4 Daily Poor \n", + "9 1 Weekly Poor \n", + "10 2 Weekly Average \n", + "11 3 Weekly Poor \n", + "12 1 Weekly Good \n", + "\n", + " Region \n", + "0 Europe \n", + "1 Asia \n", + "2 North America \n", + "3 Europe \n", + "4 North America \n", + "5 South America \n", + "6 Asia \n", + "7 North America \n", + "8 Europe \n", + "9 North America \n", + "10 Oceania \n", + "11 Africa \n", + "12 Europe " + ], + "text/html": [ + "\n", + "
\n", + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Employee_IDAgeGenderJob_RoleIndustryYears_of_ExperienceWork_LocationHours_Worked_Per_WeekNumber_of_Virtual_MeetingsWork_Life_Balance_RatingStress_LevelMental_Health_ConditionAccess_to_Mental_Health_ResourcesProductivity_ChangeSocial_Isolation_RatingSatisfaction_with_Remote_WorkCompany_Support_for_Remote_WorkPhysical_ActivitySleep_QualityRegion
0EMP000132Non-binaryHRHealthcare13Hybrid4772MediumDepressionNoDecrease1Unsatisfied1WeeklyGoodEurope
1EMP000240FemaleData ScientistIT3Remote5241MediumAnxietyNoIncrease3Satisfied2WeeklyGoodAsia
2EMP000359Non-binarySoftware EngineerEducation22Hybrid46115MediumAnxietyNoNo Change4Unsatisfied5NaNPoorNorth America
3EMP000427MaleSoftware EngineerFinance20Onsite3284HighDepressionYesIncrease3Unsatisfied3NaNPoorEurope
4EMP000549MaleSalesConsulting32Onsite35122HighNaNYesDecrease3Unsatisfied3WeeklyAverageNorth America
5EMP000659Non-binarySalesIT31Hybrid3934HighNaNNoIncrease5Unsatisfied1NaNAverageSouth America
6EMP000731Prefer not to saySalesIT24Remote5173LowAnxietyYesDecrease5Neutral3DailyPoorAsia
7EMP000842Non-binaryData ScientistManufacturing6Onsite5473MediumDepressionNoDecrease5Satisfied4NaNAverageNorth America
8EMP000956Prefer not to sayData ScientistHealthcare9Hybrid2442HighNaNYesDecrease2Unsatisfied4DailyPoorEurope
9EMP001030FemaleHRIT28Hybrid5761LowDepressionYesDecrease2Neutral1WeeklyPoorNorth America
10EMP001133Non-binarySoftware EngineerFinance17Remote4833HighNaNYesDecrease4Satisfied2WeeklyAverageOceania
11EMP001247FemaleMarketingConsulting31Hybrid26124MediumNaNYesNo Change4Neutral3WeeklyPoorAfrica
12EMP001340FemaleMarketingConsulting1Remote2172HighDepressionYesDecrease2Neutral1WeeklyGoodEurope
\n", + "
\n", + "
\n", + "\n", + "
\n", + " \n", + "\n", + " \n", + "\n", + " \n", + "
\n", + "\n", + "\n", + "
\n", + " \n", + "\n", + "\n", + "\n", + " \n", + "
\n", + "\n", + "
\n", + "
\n" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "dataframe", + "variable_name": "df", + "summary": "{\n \"name\": \"df\",\n \"rows\": 5000,\n \"fields\": [\n {\n \"column\": \"Employee_ID\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 5000,\n \"samples\": [\n \"EMP1502\",\n \"EMP2587\",\n \"EMP2654\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Age\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 11,\n \"min\": 22,\n \"max\": 60,\n \"num_unique_values\": 39,\n \"samples\": [\n 55,\n 34,\n 49\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Gender\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 4,\n \"samples\": [\n \"Female\",\n \"Prefer not to say\",\n \"Non-binary\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Job_Role\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 7,\n \"samples\": [\n \"HR\",\n \"Data Scientist\",\n \"Designer\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Industry\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 7,\n \"samples\": [\n \"Healthcare\",\n \"IT\",\n \"Manufacturing\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Years_of_Experience\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 10,\n \"min\": 1,\n \"max\": 35,\n \"num_unique_values\": 35,\n \"samples\": [\n 12,\n 23,\n 14\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Work_Location\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Hybrid\",\n \"Remote\",\n \"Onsite\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Hours_Worked_Per_Week\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 11,\n \"min\": 20,\n \"max\": 60,\n \"num_unique_values\": 41,\n \"samples\": [\n 29,\n 45,\n 24\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Number_of_Virtual_Meetings\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 4,\n \"min\": 0,\n \"max\": 15,\n \"num_unique_values\": 16,\n \"samples\": [\n 7,\n 4,\n 3\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Work_Life_Balance_Rating\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 1,\n \"max\": 5,\n \"num_unique_values\": 5,\n \"samples\": [\n 1,\n 3,\n 5\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Stress_Level\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Medium\",\n \"High\",\n \"Low\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Mental_Health_Condition\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Depression\",\n \"Anxiety\",\n \"Burnout\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Access_to_Mental_Health_Resources\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"Yes\",\n \"No\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Productivity_Change\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Decrease\",\n \"Increase\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Social_Isolation_Rating\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 1,\n \"max\": 5,\n \"num_unique_values\": 5,\n \"samples\": [\n 3,\n 2\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Satisfaction_with_Remote_Work\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Unsatisfied\",\n \"Satisfied\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Company_Support_for_Remote_Work\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 1,\n \"max\": 5,\n \"num_unique_values\": 5,\n \"samples\": [\n 2,\n 4\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Physical_Activity\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"Daily\",\n \"Weekly\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Sleep_Quality\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Good\",\n \"Poor\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Region\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 6,\n \"samples\": [\n \"Europe\",\n \"Asia\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" + } + }, + "metadata": {}, + "execution_count": 30 + } + ] }, { "cell_type": "markdown", @@ -263,13 +1076,513 @@ { "cell_type": "code", "source": [ - "# Write code here" + "# Write code here\n", + "df.tail(7)" ], "metadata": { - "id": "bvxs1GHK-Iv4" + "id": "bvxs1GHK-Iv4", + "outputId": "4f044c54-cc4a-4d4d-924a-e18d873f8251", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 337 + } }, - "execution_count": null, - "outputs": [] + "execution_count": 31, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + " Employee_ID Age Gender Job_Role Industry \\\n", + "4993 EMP4994 35 Non-binary Marketing Retail \n", + "4994 EMP4995 40 Prefer not to say Marketing IT \n", + "4995 EMP4996 32 Male Sales Consulting \n", + "4996 EMP4997 39 Female Sales Healthcare \n", + "4997 EMP4998 42 Female Sales Healthcare \n", + "4998 EMP4999 27 Female Sales Healthcare \n", + "4999 EMP5000 29 Male HR IT \n", + "\n", + " Years_of_Experience Work_Location Hours_Worked_Per_Week \\\n", + "4993 12 Hybrid 32 \n", + "4994 17 Hybrid 52 \n", + "4995 4 Onsite 24 \n", + "4996 27 Onsite 48 \n", + "4997 21 Hybrid 34 \n", + "4998 26 Remote 58 \n", + "4999 30 Onsite 20 \n", + "\n", + " Number_of_Virtual_Meetings Work_Life_Balance_Rating Stress_Level \\\n", + "4993 13 5 Medium \n", + "4994 1 2 Medium \n", + "4995 2 5 High \n", + "4996 15 1 Low \n", + "4997 1 4 High \n", + "4998 0 5 Low \n", + "4999 15 1 Low \n", + "\n", + " Mental_Health_Condition Access_to_Mental_Health_Resources \\\n", + "4993 NaN Yes \n", + "4994 Burnout Yes \n", + "4995 Burnout Yes \n", + "4996 Depression Yes \n", + "4997 Burnout No \n", + "4998 NaN Yes \n", + "4999 Depression Yes \n", + "\n", + " Productivity_Change Social_Isolation_Rating \\\n", + "4993 Decrease 2 \n", + "4994 Increase 3 \n", + "4995 Decrease 4 \n", + "4996 Decrease 1 \n", + "4997 Increase 3 \n", + "4998 Increase 3 \n", + "4999 No Change 3 \n", + "\n", + " Satisfaction_with_Remote_Work Company_Support_for_Remote_Work \\\n", + "4993 Satisfied 3 \n", + "4994 Neutral 5 \n", + "4995 Neutral 1 \n", + "4996 Satisfied 1 \n", + "4997 Satisfied 1 \n", + "4998 Unsatisfied 4 \n", + "4999 Unsatisfied 5 \n", + "\n", + " Physical_Activity Sleep_Quality Region \n", + "4993 Daily Good Asia \n", + "4994 Daily Good Oceania \n", + "4995 Weekly Average Asia \n", + "4996 NaN Average Africa \n", + "4997 Daily Poor Oceania \n", + "4998 Daily Average Asia \n", + "4999 NaN Poor Asia " + ], + "text/html": [ + "\n", + "
\n", + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Employee_IDAgeGenderJob_RoleIndustryYears_of_ExperienceWork_LocationHours_Worked_Per_WeekNumber_of_Virtual_MeetingsWork_Life_Balance_RatingStress_LevelMental_Health_ConditionAccess_to_Mental_Health_ResourcesProductivity_ChangeSocial_Isolation_RatingSatisfaction_with_Remote_WorkCompany_Support_for_Remote_WorkPhysical_ActivitySleep_QualityRegion
4993EMP499435Non-binaryMarketingRetail12Hybrid32135MediumNaNYesDecrease2Satisfied3DailyGoodAsia
4994EMP499540Prefer not to sayMarketingIT17Hybrid5212MediumBurnoutYesIncrease3Neutral5DailyGoodOceania
4995EMP499632MaleSalesConsulting4Onsite2425HighBurnoutYesDecrease4Neutral1WeeklyAverageAsia
4996EMP499739FemaleSalesHealthcare27Onsite48151LowDepressionYesDecrease1Satisfied1NaNAverageAfrica
4997EMP499842FemaleSalesHealthcare21Hybrid3414HighBurnoutNoIncrease3Satisfied1DailyPoorOceania
4998EMP499927FemaleSalesHealthcare26Remote5805LowNaNYesIncrease3Unsatisfied4DailyAverageAsia
4999EMP500029MaleHRIT30Onsite20151LowDepressionYesNo Change3Unsatisfied5NaNPoorAsia
\n", + "
\n", + "
\n", + "\n", + "
\n", + " \n", + "\n", + " \n", + "\n", + " \n", + "
\n", + "\n", + "\n", + "
\n", + " \n", + "\n", + "\n", + "\n", + " \n", + "
\n", + "\n", + "
\n", + "
\n" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "dataframe", + "summary": "{\n \"name\": \"df\",\n \"rows\": 7,\n \"fields\": [\n {\n \"column\": \"Employee_ID\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 7,\n \"samples\": [\n \"EMP4994\",\n \"EMP4995\",\n \"EMP4999\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Age\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 5,\n \"min\": 27,\n \"max\": 42,\n \"num_unique_values\": 7,\n \"samples\": [\n 35,\n 40,\n 27\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Gender\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 4,\n \"samples\": [\n \"Prefer not to say\",\n \"Female\",\n \"Non-binary\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Job_Role\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Marketing\",\n \"Sales\",\n \"HR\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Industry\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 4,\n \"samples\": [\n \"IT\",\n \"Healthcare\",\n \"Retail\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Years_of_Experience\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 9,\n \"min\": 4,\n \"max\": 30,\n \"num_unique_values\": 7,\n \"samples\": [\n 12,\n 17,\n 26\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Work_Location\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Hybrid\",\n \"Onsite\",\n \"Remote\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Hours_Worked_Per_Week\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 14,\n \"min\": 20,\n \"max\": 58,\n \"num_unique_values\": 7,\n \"samples\": [\n 32,\n 52,\n 58\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Number_of_Virtual_Meetings\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 7,\n \"min\": 0,\n \"max\": 15,\n \"num_unique_values\": 5,\n \"samples\": [\n 1,\n 0,\n 2\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Work_Life_Balance_Rating\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 1,\n \"max\": 5,\n \"num_unique_values\": 4,\n \"samples\": [\n 2,\n 4,\n 5\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Stress_Level\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Medium\",\n \"High\",\n \"Low\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Mental_Health_Condition\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"Depression\",\n \"Burnout\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Access_to_Mental_Health_Resources\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"No\",\n \"Yes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Productivity_Change\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Decrease\",\n \"Increase\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Social_Isolation_Rating\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 1,\n \"max\": 4,\n \"num_unique_values\": 4,\n \"samples\": [\n 3,\n 1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Satisfaction_with_Remote_Work\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Satisfied\",\n \"Neutral\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Company_Support_for_Remote_Work\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 1,\n \"max\": 5,\n \"num_unique_values\": 4,\n \"samples\": [\n 5,\n 4\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Physical_Activity\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"Weekly\",\n \"Daily\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Sleep_Quality\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Good\",\n \"Average\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Region\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Asia\",\n \"Oceania\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" + } + }, + "metadata": {}, + "execution_count": 31 + } + ] }, { "cell_type": "markdown", @@ -283,13 +1596,157 @@ { "cell_type": "code", "source": [ - "# Write code here" + "# Write code here\n", + "df.isna().sum()" ], "metadata": { - "id": "VL7WVh2x_e2u" + "id": "VL7WVh2x_e2u", + "outputId": "7adcd307-e125-4a1d-eac9-35b1579ccfd1", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 703 + } }, - "execution_count": null, - "outputs": [] + "execution_count": 55, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Employee_ID 0\n", + "Age 0\n", + "Gender 0\n", + "Job_Role 0\n", + "Industry 0\n", + "Years_of_Experience 0\n", + "Work_Location 0\n", + "Hours_Worked_Per_Week 0\n", + "Number_of_Virtual_Meetings 0\n", + "Work_Life_Balance_Rating 0\n", + "Stress_Level 0\n", + "Mental_Health_Condition 1196\n", + "Access_to_Mental_Health_Resources 0\n", + "Productivity_Change 0\n", + "Social_Isolation_Rating 0\n", + "Satisfaction_with_Remote_Work 0\n", + "Company_Support_for_Remote_Work 0\n", + "Physical_Activity 1629\n", + "Sleep_Quality 0\n", + "Region 0\n", + "dtype: int64" + ], + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
Employee_ID0
Age0
Gender0
Job_Role0
Industry0
Years_of_Experience0
Work_Location0
Hours_Worked_Per_Week0
Number_of_Virtual_Meetings0
Work_Life_Balance_Rating0
Stress_Level0
Mental_Health_Condition1196
Access_to_Mental_Health_Resources0
Productivity_Change0
Social_Isolation_Rating0
Satisfaction_with_Remote_Work0
Company_Support_for_Remote_Work0
Physical_Activity1629
Sleep_Quality0
Region0
\n", + "

" + ] + }, + "metadata": {}, + "execution_count": 55 + } + ] }, { "cell_type": "markdown", @@ -313,13 +1770,157 @@ { "cell_type": "code", "source": [ - "# Write code here\n" + "# Write code here\n", + "df.count()" ], "metadata": { - "id": "rdhV-VNf_gcm" + "id": "rdhV-VNf_gcm", + "outputId": "f892021e-f318-4cb6-eb76-c5aaa1c78d61", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 703 + } }, - "execution_count": null, - "outputs": [] + "execution_count": 45, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Employee_ID 5000\n", + "Age 5000\n", + "Gender 5000\n", + "Job_Role 5000\n", + "Industry 5000\n", + "Years_of_Experience 5000\n", + "Work_Location 5000\n", + "Hours_Worked_Per_Week 5000\n", + "Number_of_Virtual_Meetings 5000\n", + "Work_Life_Balance_Rating 5000\n", + "Stress_Level 5000\n", + "Mental_Health_Condition 3804\n", + "Access_to_Mental_Health_Resources 5000\n", + "Productivity_Change 5000\n", + "Social_Isolation_Rating 5000\n", + "Satisfaction_with_Remote_Work 5000\n", + "Company_Support_for_Remote_Work 5000\n", + "Physical_Activity 3371\n", + "Sleep_Quality 5000\n", + "Region 5000\n", + "dtype: int64" + ], + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
Employee_ID5000
Age5000
Gender5000
Job_Role5000
Industry5000
Years_of_Experience5000
Work_Location5000
Hours_Worked_Per_Week5000
Number_of_Virtual_Meetings5000
Work_Life_Balance_Rating5000
Stress_Level5000
Mental_Health_Condition3804
Access_to_Mental_Health_Resources5000
Productivity_Change5000
Social_Isolation_Rating5000
Satisfaction_with_Remote_Work5000
Company_Support_for_Remote_Work5000
Physical_Activity3371
Sleep_Quality5000
Region5000
\n", + "

" + ] + }, + "metadata": {}, + "execution_count": 45 + } + ] }, { "cell_type": "markdown", @@ -333,13 +1934,92 @@ { "cell_type": "code", "source": [ - "# Write code here\n" + "# Write code here\n", + "df.select_dtypes(include=np.number).mean()" ], "metadata": { - "id": "MyCg6EO4_v1V" + "id": "MyCg6EO4_v1V", + "outputId": "be12f3fc-5f0e-46ad-8e5d-e401702de5ee", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 300 + } }, - "execution_count": null, - "outputs": [] + "execution_count": 44, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Age 40.9950\n", + "Years_of_Experience 17.8102\n", + "Hours_Worked_Per_Week 39.6146\n", + "Number_of_Virtual_Meetings 7.5590\n", + "Work_Life_Balance_Rating 2.9842\n", + "Social_Isolation_Rating 2.9938\n", + "Company_Support_for_Remote_Work 3.0078\n", + "dtype: float64" + ], + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
Age40.9950
Years_of_Experience17.8102
Hours_Worked_Per_Week39.6146
Number_of_Virtual_Meetings7.5590
Work_Life_Balance_Rating2.9842
Social_Isolation_Rating2.9938
Company_Support_for_Remote_Work3.0078
\n", + "

" + ] + }, + "metadata": {}, + "execution_count": 44 + } + ] }, { "cell_type": "markdown", @@ -353,13 +2033,92 @@ { "cell_type": "code", "source": [ - "# Write code here\n" + "# Write code here\n", + "df.select_dtypes(include=np.number).std()" ], "metadata": { - "id": "sKUiXGdy_y_7" + "id": "sKUiXGdy_y_7", + "outputId": "a78b0da9-6bbb-43bd-ac75-770d3b6c507a", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 300 + } }, - "execution_count": null, - "outputs": [] + "execution_count": 50, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Age 11.296021\n", + "Years_of_Experience 10.020412\n", + "Hours_Worked_Per_Week 11.860194\n", + "Number_of_Virtual_Meetings 4.636121\n", + "Work_Life_Balance_Rating 1.410513\n", + "Social_Isolation_Rating 1.394615\n", + "Company_Support_for_Remote_Work 1.399046\n", + "dtype: float64" + ], + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
Age11.296021
Years_of_Experience10.020412
Hours_Worked_Per_Week11.860194
Number_of_Virtual_Meetings4.636121
Work_Life_Balance_Rating1.410513
Social_Isolation_Rating1.394615
Company_Support_for_Remote_Work1.399046
\n", + "

" + ] + }, + "metadata": {}, + "execution_count": 50 + } + ] }, { "cell_type": "markdown", @@ -373,13 +2132,29 @@ { "cell_type": "code", "source": [ - "# Write code here\n" + "# Write code here\n", + "np.quantile(df.select_dtypes(include=np.number), [0.25, 0.5, 0.75])" ], "metadata": { - "id": "TVThkvwx_0zt" + "id": "TVThkvwx_0zt", + "outputId": "9ef9a5c4-0e62-48f2-ae7c-2b0a2650d1e9", + "colab": { + "base_uri": "https://localhost:8080/" + } }, - "execution_count": null, - "outputs": [] + "execution_count": 51, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "array([ 3., 5., 29.])" + ] + }, + "metadata": {}, + "execution_count": 51 + } + ] }, { "cell_type": "markdown", @@ -393,13 +2168,93 @@ { "cell_type": "code", "source": [ - "# Write code here\n" + "# Write code here\n", + "df.min(numeric_only=True)\n", + "df.max(numeric_only=True)" ], "metadata": { - "id": "u6cVQN3l_0ut" + "id": "u6cVQN3l_0ut", + "outputId": "605a1853-d588-48f3-c384-86802ab2cf35", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 300 + } }, - "execution_count": null, - "outputs": [] + "execution_count": 53, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Age 60\n", + "Years_of_Experience 35\n", + "Hours_Worked_Per_Week 60\n", + "Number_of_Virtual_Meetings 15\n", + "Work_Life_Balance_Rating 5\n", + "Social_Isolation_Rating 5\n", + "Company_Support_for_Remote_Work 5\n", + "dtype: int64" + ], + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
Age60
Years_of_Experience35
Hours_Worked_Per_Week60
Number_of_Virtual_Meetings15
Work_Life_Balance_Rating5
Social_Isolation_Rating5
Company_Support_for_Remote_Work5
\n", + "

" + ] + }, + "metadata": {}, + "execution_count": 53 + } + ] }, { "cell_type": "markdown",