{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "daa13044", "metadata": { "id": "daa13044", "outputId": "4d440aaa-1ee7-4771-c526-f55e9458ca8a", "colab": { "base_uri": "https://localhost:8080/", "height": 614 } }, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Timestamp What gender do you identify as? \\\n", "0 2/9/2024 20:12:14 Male \n", "1 2/9/2024 20:16:34 Female \n", "2 2/9/2024 20:18:55 Female \n", "3 2/9/2024 20:24:00 Male \n", "4 2/9/2024 20:26:16 Male \n", ".. ... ... \n", "255 2/14/2024 19:46:28 Male \n", "256 2/15/2024 0:28:38 Male \n", "257 2/15/2024 8:33:45 Male \n", "258 2/15/2024 16:10:40 Female \n", "259 2/15/2024 16:14:11 Female \n", "\n", " Who do you live with? How many people live in your household? \n", "0 Neither 6 \n", "1 Both 4 \n", "2 Friends 4 \n", "3 Neither 1 \n", "4 Neither 1 \n", ".. ... ... \n", "255 Friends 5 \n", "256 Family North District 4 bed 2 bath \n", "257 Family 9 \n", "258 Family 4 \n", "259 Friends 3 (room), 8 (hall), ~70 (building) \n", "\n", "[260 rows x 4 columns]" ], "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", "
TimestampWhat gender do you identify as?Who do you live with?How many people live in your household?
02/9/2024 20:12:14MaleNeither6
12/9/2024 20:16:34FemaleBoth4
22/9/2024 20:18:55FemaleFriends4
32/9/2024 20:24:00MaleNeither1
42/9/2024 20:26:16MaleNeither1
...............
2552/14/2024 19:46:28MaleFriends5
2562/15/2024 0:28:38MaleFamilyNorth District 4 bed 2 bath
2572/15/2024 8:33:45MaleFamily9
2582/15/2024 16:10:40FemaleFamily4
2592/15/2024 16:14:11FemaleFriends3 (room), 8 (hall), ~70 (building)
\n", "

260 rows × 4 columns

\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": "df2", "summary": "{\n \"name\": \"df2\",\n \"rows\": 260,\n \"fields\": [\n {\n \"column\": \"Timestamp\",\n \"properties\": {\n \"dtype\": \"object\",\n \"min\": \"2/10/2024 0:03:14\",\n \"max\": \"2/9/2024 23:56:18\",\n \"samples\": [\n \"2/9/2024 22:54:55\",\n \"2/12/2024 2:12:41\",\n \"2/12/2024 19:19:36\"\n ],\n \"num_unique_values\": 260,\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"What gender do you identify as?\",\n \"properties\": {\n \"dtype\": \"category\",\n \"samples\": [\n \"Female\",\n \"Non-binary\",\n \"Male\"\n ],\n \"num_unique_values\": 4,\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Who do you live with? \",\n \"properties\": {\n \"dtype\": \"category\",\n \"samples\": [\n \"Neither\",\n \"Both\",\n \"Family, Friends, Both\"\n ],\n \"num_unique_values\": 6,\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"How many people live in your household?\",\n \"properties\": {\n \"dtype\": \"category\",\n \"samples\": [\n \"6\",\n \"4\",\n \"2\"\n ],\n \"num_unique_values\": 17,\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" } }, "metadata": {}, "execution_count": 1 } ], "source": [ "%matplotlib inline\n", "import pandas as pd\n", "import numpy as np\n", "\n", "df = pd.read_csv(\"CS105 W24 Survey (Responses) - Form Responses 1.csv\")\n", "#df\n", "df2 = df.iloc[:, [0, 5, 7, 9]]\n", "df2" ] }, { "cell_type": "code", "execution_count": null, "id": "29889175", "metadata": { "id": "29889175" }, "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 }