aboutsummaryrefslogtreecommitdiff
path: root/CS105MiniProject.ipynb
blob: d19a0961128739f5761b4076b784df22f5703a14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "daa13044",
   "metadata": {
    "id": "daa13044",
    "outputId": "4d440aaa-1ee7-4771-c526-f55e9458ca8a",
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 614
    },
    "ExecuteTime": {
     "end_time": "2024-02-16T00:42:12.437369Z",
     "start_time": "2024-02-16T00:42:11.755307Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "              Timestamp What gender do you identify as?  \\\n0     2/9/2024 20:12:14                            Male   \n1     2/9/2024 20:16:34                          Female   \n2     2/9/2024 20:18:55                          Female   \n3     2/9/2024 20:24:00                            Male   \n4     2/9/2024 20:26:16                            Male   \n..                  ...                             ...   \n255  2/14/2024 19:46:28                            Male   \n256   2/15/2024 0:28:38                            Male   \n257   2/15/2024 8:33:45                            Male   \n258  2/15/2024 16:10:40                          Female   \n259  2/15/2024 16:14:11                          Female   \n\n    Who do you live with?   \\\n0                  Neither   \n1                     Both   \n2                  Friends   \n3                  Neither   \n4                  Neither   \n..                     ...   \n255                Friends   \n256                 Family   \n257                 Family   \n258                 Family   \n259                Friends   \n\n    Do you currently live in a house, apartnment, or dorm?   \\\n0                                                House        \n1                                            Apartment        \n2                                                House        \n3                                            Apartment        \n4                                            Apartment        \n..                                                 ...        \n255                                              House        \n256                                          Apartment        \n257                                              House        \n258                                          Apartment        \n259                                               Dorm        \n\n    How many people live in your household? Do you currently work?  \\\n0                                         6                    Yes   \n1                                         4                     No   \n2                                         4                     No   \n3                                         1                     No   \n4                                         1                    Yes   \n..                                      ...                    ...   \n255                                       5                    Yes   \n256             North District 4 bed 2 bath                     No   \n257                                       9                     No   \n258                                       4                    Yes   \n259      3 (room), 8 (hall), ~70 (building)                     No   \n\n    How many hours do you work per week on average?  \\\n0                                            5 - 10   \n1                                               NaN   \n2                                               NaN   \n3                                               NaN   \n4                                           10 - 20   \n..                                              ...   \n255                                         10 - 20   \n256                                             NaN   \n257                                           1 - 5   \n258                                          5 - 10   \n259                                             NaN   \n\n    Do you work on or off campus?  \\\n0                      Off-campus   \n1                             NaN   \n2                             NaN   \n3                             NaN   \n4                      Off-campus   \n..                            ...   \n255                     On-campus   \n256                           NaN   \n257                    Off-campus   \n258                     On-campus   \n259                           NaN   \n\n    Do you work in a department related to your major?  \\\n0                                                   No   \n1                                                  NaN   \n2                                                  NaN   \n3                                                   No   \n4                                                  Yes   \n..                                                 ...   \n255                                                 No   \n256                                                NaN   \n257                                                 No   \n258                                                 No   \n259                                                NaN   \n\n    Do you have roommates that are part of your major?  \n0                                                   No  \n1                                                  Yes  \n2                                                   No  \n3                                                   No  \n4                                                   No  \n..                                                 ...  \n255                                                 No  \n256                                                 No  \n257                                                 No  \n258                                                 No  \n259                                                Yes  \n\n[260 rows x 10 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Timestamp</th>\n      <th>What gender do you identify as?</th>\n      <th>Who do you live with?</th>\n      <th>Do you currently live in a house, apartnment, or dorm?</th>\n      <th>How many people live in your household?</th>\n      <th>Do you currently work?</th>\n      <th>How many hours do you work per week on average?</th>\n      <th>Do you work on or off campus?</th>\n      <th>Do you work in a department related to your major?</th>\n      <th>Do you have roommates that are part of your major?</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2/9/2024 20:12:14</td>\n      <td>Male</td>\n      <td>Neither</td>\n      <td>House</td>\n      <td>6</td>\n      <td>Yes</td>\n      <td>5 - 10</td>\n      <td>Off-campus</td>\n      <td>No</td>\n      <td>No</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2/9/2024 20:16:34</td>\n      <td>Female</td>\n      <td>Both</td>\n      <td>Apartment</td>\n      <td>4</td>\n      <td>No</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>Yes</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2/9/2024 20:18:55</td>\n      <td>Female</td>\n      <td>Friends</td>\n      <td>House</td>\n      <td>4</td>\n      <td>No</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>No</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2/9/2024 20:24:00</td>\n      <td>Male</td>\n      <td>Neither</td>\n      <td>Apartment</td>\n      <td>1</td>\n      <td>No</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>No</td>\n      <td>No</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2/9/2024 20:26:16</td>\n      <td>Male</td>\n      <td>Neither</td>\n      <td>Apartment</td>\n      <td>1</td>\n      <td>Yes</td>\n      <td>10 - 20</td>\n      <td>Off-campus</td>\n      <td>Yes</td>\n      <td>No</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>255</th>\n      <td>2/14/2024 19:46:28</td>\n      <td>Male</td>\n      <td>Friends</td>\n      <td>House</td>\n      <td>5</td>\n      <td>Yes</td>\n      <td>10 - 20</td>\n      <td>On-campus</td>\n      <td>No</td>\n      <td>No</td>\n    </tr>\n    <tr>\n      <th>256</th>\n      <td>2/15/2024 0:28:38</td>\n      <td>Male</td>\n      <td>Family</td>\n      <td>Apartment</td>\n      <td>North District 4 bed 2 bath</td>\n      <td>No</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>No</td>\n    </tr>\n    <tr>\n      <th>257</th>\n      <td>2/15/2024 8:33:45</td>\n      <td>Male</td>\n      <td>Family</td>\n      <td>House</td>\n      <td>9</td>\n      <td>No</td>\n      <td>1 - 5</td>\n      <td>Off-campus</td>\n      <td>No</td>\n      <td>No</td>\n    </tr>\n    <tr>\n      <th>258</th>\n      <td>2/15/2024 16:10:40</td>\n      <td>Female</td>\n      <td>Family</td>\n      <td>Apartment</td>\n      <td>4</td>\n      <td>Yes</td>\n      <td>5 - 10</td>\n      <td>On-campus</td>\n      <td>No</td>\n      <td>No</td>\n    </tr>\n    <tr>\n      <th>259</th>\n      <td>2/15/2024 16:14:11</td>\n      <td>Female</td>\n      <td>Friends</td>\n      <td>Dorm</td>\n      <td>3 (room), 8 (hall), ~70 (building)</td>\n      <td>No</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>Yes</td>\n    </tr>\n  </tbody>\n</table>\n<p>260 rows × 10 columns</p>\n</div>"
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "df = pd.read_csv(\"data.csv\")\n",
    "df = df.iloc[:, [0, 5, 7, 8, 9, 58, 59, 60, 61, 26]]\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "29889175",
   "metadata": {
    "id": "29889175",
    "ExecuteTime": {
     "end_time": "2024-02-16T00:42:12.440256Z",
     "start_time": "2024-02-16T00:42:12.438587Z"
    }
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  },
  "colab": {
   "provenance": []
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}