From ea5001515b9cf0c7b6a7ac26475844aba57f9fe3 Mon Sep 17 00:00:00 2001 From: franc Date: Thu, 17 Aug 2023 10:19:35 -0400 Subject: [PATCH] update lab3 1.3 --- docs/labs/lab_03.ipynb | 323 ----------------------------------------- 1 file changed, 323 deletions(-) delete mode 100644 docs/labs/lab_03.ipynb diff --git a/docs/labs/lab_03.ipynb b/docs/labs/lab_03.ipynb deleted file mode 100644 index ad1b0e7..0000000 --- a/docs/labs/lab_03.ipynb +++ /dev/null @@ -1,323 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\"Open\n", - "\n", - "\n", - "# MAT281 - Laboratorio N°03\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Problema 01\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "EL conjunto de datos se denomina `ocupation.csv`, el cual contiene información de distintos usuarios (edad ,sexo, profesión, etc.).\n", - "\n", - "Lo primero es cargar el conjunto de datos y ver las primeras filas que lo componen:" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import pandas as pd" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "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", - "
user_idagegenderoccupationzip_code
0124Mtechnician85711
1253Fother94043
2323Mwriter32067
3424Mtechnician43537
4533Fother15213
\n", - "
" - ], - "text/plain": [ - " user_id age gender occupation zip_code\n", - "0 1 24 M technician 85711\n", - "1 2 53 F other 94043\n", - "2 3 23 M writer 32067\n", - "3 4 24 M technician 43537\n", - "4 5 33 F other 15213" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# load data\n", - "url='https://drive.google.com/file/d/1SW1_vWBLd50COj4FbQdZenqAwA0nLDqC/view?usp=drive_link'\n", - "url='https://drive.google.com/uc?id=' + url.split('/')[-2]\n", - "\n", - "df = pd.read_csv(url, sep=\"|\" )\n", - "df.head()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "El objetivo es tratar de obtener la mayor información posible de este conjunto de datos. Para cumplir este objetivo debe resolver las siguientes problemáticas:" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "1.- ¿Cuál es el número de observaciones en el conjunto de datos?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "2.- ¿Cuál es el número de columnas en el conjunto de datos?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "3.- Imprime el nombre de todas las columnas" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "4.- Imprima el índice del dataframe" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "5.- ¿Cuál es el tipo de datos de cada columna?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "6.- Describir el conjunto de datos (**hint**: .describe())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "7.- Imprimir solo la columna de **occupation**." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "8.- ¿Cuántas ocupaciones diferentes hay en este conjunto de datos?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "9.- ¿Cuál es la ocupación más frecuente?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "10.- ¿Cuál es la edad media de los usuarios?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "11.- ¿Cuál es la edad con menos ocurrencia?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "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.8.10" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -}