From bd3049e5b2bab5e5eb8d885a82dd744b46a0146a Mon Sep 17 00:00:00 2001 From: RenzoMosquera <128960051+RenzoMosquera@users.noreply.github.com> Date: Sun, 11 Jun 2023 22:51:19 -0500 Subject: [PATCH 1/4] #141 --- Labs/tarea6/Grupo_8_py.ipynb | 1370 ++++++++++++++++++++++++++++++++++ 1 file changed, 1370 insertions(+) create mode 100644 Labs/tarea6/Grupo_8_py.ipynb diff --git a/Labs/tarea6/Grupo_8_py.ipynb b/Labs/tarea6/Grupo_8_py.ipynb new file mode 100644 index 0000000..8d27d8f --- /dev/null +++ b/Labs/tarea6/Grupo_8_py.ipynb @@ -0,0 +1,1370 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "d19b8c04", + "metadata": {}, + "source": [ + "## Trabajo Grupal 6\n", + "\n", + " Integrantes Grupo 8:\n", + " \n", + " - Renzo Mosquera (20181960)\n", + " - Yenner Huancahuire (20173340)\n", + " - Pamela Obregón (20173040)" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "ffe4f13c", + "metadata": {}, + "outputs": [], + "source": [ + "# Importamos librerias\n", + "\n", + "import pandas as pd\n", + "import numpy as np\n", + "import warnings\n", + "import pyreadstat\n", + "import seaborn as sns\n", + "import re \n", + "import matplotlib.pyplot as plt \n", + "from matplotlib.lines import Line2D\n", + "warnings.filterwarnings('ignore')" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "5b85a80d", + "metadata": {}, + "outputs": [], + "source": [ + "# Importamos las bases de datos (data.dta y unidos.dta)\n", + "\n", + "data = pd.read_stata(\"../../data/Juntos_program/data.dta\",\n", + " convert_categoricals=False)\n", + "\n", + "unidos = pd.read_stata(\"../../data/Juntos_program/unidos.dta\",\n", + " convert_categoricals=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "ee7c5304", + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
numpernumpanh15numpanh16numpanh17numpanh18numpanh19mes_15ubigeo_15dominio_15p400a3_15...mes_18ubigeo_18dominio_18p400a3_18p4022_18mes_19ubigeo_19dominio_19p400a3_19p4022_19
015368115811581158115811581110101sierra norte1946.0...1210101sierra norte1946.00.01110101sierra norte1946.00.0
115369115811581158115811581110101sierra norte1973.0...1210101sierra norte1973.00.01110101sierra norte1973.00.0
215380116211621162116211621110101sierra norte1987.0...1210101sierra norte1987.00.01110101sierra norte1987.01.0
315381116211621162116211621110101sierra norte2009.0...1210101sierra norte2009.00.01110101sierra norte2009.00.0
41541011851185118511851185710101sierra norte1955.0...710101sierra norte1955.00.0710101sierra norte1955.01.0
..................................................................
554134848185491854918549185491854912250101selva2002.0...12250101selva2002.00.010250101selva2002.01.0
554234846185491854918549185491854912250101selva1985.0...12250101selva1985.00.010250101selva1985.00.0
554334847185491854918549185491854912250101selva1976.0...12250101selva1976.00.010250101selva1976.01.0
554434849185491854918549185491854912250101selva2007.0...12250101selva2007.00.010250101selva2007.01.0
554534850185491854918549185491854912250101selva2011.0...12250101selva2011.01.010250101selva2011.00.0
\n", + "

5546 rows × 31 columns

\n", + "
" + ], + "text/plain": [ + " numper numpanh15 numpanh16 numpanh17 numpanh18 numpanh19 mes_15 \\\n", + "0 15368 1158 1158 1158 1158 1158 11 \n", + "1 15369 1158 1158 1158 1158 1158 11 \n", + "2 15380 1162 1162 1162 1162 1162 11 \n", + "3 15381 1162 1162 1162 1162 1162 11 \n", + "4 15410 1185 1185 1185 1185 1185 7 \n", + "... ... ... ... ... ... ... ... \n", + "5541 34848 18549 18549 18549 18549 18549 12 \n", + "5542 34846 18549 18549 18549 18549 18549 12 \n", + "5543 34847 18549 18549 18549 18549 18549 12 \n", + "5544 34849 18549 18549 18549 18549 18549 12 \n", + "5545 34850 18549 18549 18549 18549 18549 12 \n", + "\n", + " ubigeo_15 dominio_15 p400a3_15 ... mes_18 ubigeo_18 \\\n", + "0 10101 sierra norte 1946.0 ... 12 10101 \n", + "1 10101 sierra norte 1973.0 ... 12 10101 \n", + "2 10101 sierra norte 1987.0 ... 12 10101 \n", + "3 10101 sierra norte 2009.0 ... 12 10101 \n", + "4 10101 sierra norte 1955.0 ... 7 10101 \n", + "... ... ... ... ... ... ... \n", + "5541 250101 selva 2002.0 ... 12 250101 \n", + "5542 250101 selva 1985.0 ... 12 250101 \n", + "5543 250101 selva 1976.0 ... 12 250101 \n", + "5544 250101 selva 2007.0 ... 12 250101 \n", + "5545 250101 selva 2011.0 ... 12 250101 \n", + "\n", + " dominio_18 p400a3_18 p4022_18 mes_19 ubigeo_19 dominio_19 \\\n", + "0 sierra norte 1946.0 0.0 11 10101 sierra norte \n", + "1 sierra norte 1973.0 0.0 11 10101 sierra norte \n", + "2 sierra norte 1987.0 0.0 11 10101 sierra norte \n", + "3 sierra norte 2009.0 0.0 11 10101 sierra norte \n", + "4 sierra norte 1955.0 0.0 7 10101 sierra norte \n", + "... ... ... ... ... ... ... \n", + "5541 selva 2002.0 0.0 10 250101 selva \n", + "5542 selva 1985.0 0.0 10 250101 selva \n", + "5543 selva 1976.0 0.0 10 250101 selva \n", + "5544 selva 2007.0 0.0 10 250101 selva \n", + "5545 selva 2011.0 1.0 10 250101 selva \n", + "\n", + " p400a3_19 p4022_19 \n", + "0 1946.0 0.0 \n", + "1 1973.0 0.0 \n", + "2 1987.0 1.0 \n", + "3 2009.0 0.0 \n", + "4 1955.0 1.0 \n", + "... ... ... \n", + "5541 2002.0 1.0 \n", + "5542 1985.0 0.0 \n", + "5543 1976.0 1.0 \n", + "5544 2007.0 1.0 \n", + "5545 2011.0 0.0 \n", + "\n", + "[5546 rows x 31 columns]" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Mostramos \"data\"\n", + "\n", + "data" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "c54126e7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['numper', 'numpanh15', 'numpanh16', 'numpanh17', 'numpanh18',\n", + " 'numpanh19', 'mes_15', 'ubigeo_15', 'dominio_15', 'p400a3_15',\n", + " 'p4022_15', 'mes_16', 'ubigeo_16', 'dominio_16', 'p400a3_16',\n", + " 'p4022_16', 'mes_17', 'ubigeo_17', 'dominio_17', 'p400a3_17',\n", + " 'p4022_17', 'mes_18', 'ubigeo_18', 'dominio_18', 'p400a3_18',\n", + " 'p4022_18', 'mes_19', 'ubigeo_19', 'dominio_19', 'p400a3_19',\n", + " 'p4022_19'],\n", + " dtype='object')" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Mostramos los nombres de las variables de la base \"data\"\n", + "\n", + "data.columns" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "ff0e6d05", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['numper', 'numpanh_15', 'numpanh_16', 'numpanh_17', 'numpanh_18',\n", + " 'numpanh_19', 'mes_15', 'ubigeo_15', 'dominio_15', 'p400a3_15',\n", + " 'p4022_15', 'mes_16', 'ubigeo_16', 'dominio_16', 'p400a3_16',\n", + " 'p4022_16', 'mes_17', 'ubigeo_17', 'dominio_17', 'p400a3_17',\n", + " 'p4022_17', 'mes_18', 'ubigeo_18', 'dominio_18', 'p400a3_18',\n", + " 'p4022_18', 'mes_19', 'ubigeo_19', 'dominio_19', 'p400a3_19',\n", + " 'p4022_19'],\n", + " dtype='object')" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "## Transformación de formato wide a long\n", + "\n", + "# Se usará la variable \"numper\" como indentificador.\n", + "# Renombramos la variable \"numpanh\"\n", + "\n", + "data.rename(columns = {\"numpanh15\":\"numpanh_15\", \"numpanh16\":\"numpanh_16\", \n", + " \"numpanh17\":\"numpanh_17\", \"numpanh18\":\"numpanh_18\",\n", + " \"numpanh19\":\"numpanh_19\"}, inplace = True)\n", + "data.columns" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "d5482971", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['numpanh', 'mes', 'ubigeo', 'dominio', 'p400a3', 'p4022']" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Creamos la lista de variables que estarán en la base de formato \"long\"\n", + "\n", + "varlong = list( map( lambda x: re.sub('.{3}$',\"\", x), list(data.columns)[1::]))\n", + "\n", + "# Se eliminan los duplicados\n", + "\n", + "new_var = list(dict.fromkeys(varlong))\n", + "\n", + "new_var" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "9575b327", + "metadata": {}, + "outputs": [], + "source": [ + "# Realizamos el reshape\n", + "\n", + "reshape_data = pd.wide_to_long(data, stubnames = new_var, i = ['numper'] , \n", + " j = 'period' , sep = '_').reset_index()" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "9c7c6edf", + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
numperperiodnumpanhmesubigeodominiop400a3p4022
0153681511581110101sierra norte1946.00.0
1153691511581110101sierra norte1973.00.0
2153801511621110101sierra norte1987.01.0
3153811511621110101sierra norte2009.01.0
415410151185710101sierra norte1955.00.0
...........................
2772534848191854910250101selva2002.01.0
2772634846191854910250101selva1985.00.0
2772734847191854910250101selva1976.01.0
2772834849191854910250101selva2007.01.0
2772934850191854910250101selva2011.00.0
\n", + "

27730 rows × 8 columns

\n", + "
" + ], + "text/plain": [ + " numper period numpanh mes ubigeo dominio p400a3 p4022\n", + "0 15368 15 1158 11 10101 sierra norte 1946.0 0.0\n", + "1 15369 15 1158 11 10101 sierra norte 1973.0 0.0\n", + "2 15380 15 1162 11 10101 sierra norte 1987.0 1.0\n", + "3 15381 15 1162 11 10101 sierra norte 2009.0 1.0\n", + "4 15410 15 1185 7 10101 sierra norte 1955.0 0.0\n", + "... ... ... ... ... ... ... ... ...\n", + "27725 34848 19 18549 10 250101 selva 2002.0 1.0\n", + "27726 34846 19 18549 10 250101 selva 1985.0 0.0\n", + "27727 34847 19 18549 10 250101 selva 1976.0 1.0\n", + "27728 34849 19 18549 10 250101 selva 2007.0 1.0\n", + "27729 34850 19 18549 10 250101 selva 2011.0 0.0\n", + "\n", + "[27730 rows x 8 columns]" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "reshape_data" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "c765eeff", + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ubigeonumperperiodnumpanhmesdominiop400a3p4022
0101011536815115811sierra norte1946.00.0
1101011536915115811sierra norte1973.00.0
2101011538015116211sierra norte1987.01.0
3101011538115116211sierra norte2009.01.0
410101154101511857sierra norte1955.00.0
...........................
2772525010134848191854910selva2002.01.0
2772625010134846191854910selva1985.00.0
2772725010134847191854910selva1976.01.0
2772825010134849191854910selva2007.01.0
2772925010134850191854910selva2011.00.0
\n", + "

27730 rows × 8 columns

\n", + "
" + ], + "text/plain": [ + " ubigeo numper period numpanh mes dominio p400a3 p4022\n", + "0 10101 15368 15 1158 11 sierra norte 1946.0 0.0\n", + "1 10101 15369 15 1158 11 sierra norte 1973.0 0.0\n", + "2 10101 15380 15 1162 11 sierra norte 1987.0 1.0\n", + "3 10101 15381 15 1162 11 sierra norte 2009.0 1.0\n", + "4 10101 15410 15 1185 7 sierra norte 1955.0 0.0\n", + "... ... ... ... ... ... ... ... ...\n", + "27725 250101 34848 19 18549 10 selva 2002.0 1.0\n", + "27726 250101 34846 19 18549 10 selva 1985.0 0.0\n", + "27727 250101 34847 19 18549 10 selva 1976.0 1.0\n", + "27728 250101 34849 19 18549 10 selva 2007.0 1.0\n", + "27729 250101 34850 19 18549 10 selva 2011.0 0.0\n", + "\n", + "[27730 rows x 8 columns]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Ordenamos las variables\n", + "\n", + "cols = reshape_data.columns.tolist()\n", + "\n", + "order = [ cols[-4] ] + cols[0:3] + cols[3:-4] + cols[5:8]\n", + "\n", + "reshape_data = reshape_data.loc[:, order]\n", + "\n", + "reshape_data" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "efb9dc6e", + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ubigeodistritoprovinciaregionunidos
010101ChachapoyasChachapoyasAmazonas1
110102AsuncionChachapoyasAmazonas1
210103BalsasChachapoyasAmazonas0
310104ChetoChachapoyasAmazonas1
410105ChiliquinChachapoyasAmazonas0
..................
1869250302IrazolaPadre AbadUcayali0
1870250303CurimanaPadre AbadUcayali0
1871250304NeshuyaPadre AbadUcayali0
1872250305Alexander von HumboldtPadre AbadUcayali0
1873250401PurusPurusUcayali1
\n", + "

1874 rows × 5 columns

\n", + "
" + ], + "text/plain": [ + " ubigeo distrito provincia region unidos\n", + "0 10101 Chachapoyas Chachapoyas Amazonas 1\n", + "1 10102 Asuncion Chachapoyas Amazonas 1\n", + "2 10103 Balsas Chachapoyas Amazonas 0\n", + "3 10104 Cheto Chachapoyas Amazonas 1\n", + "4 10105 Chiliquin Chachapoyas Amazonas 0\n", + "... ... ... ... ... ...\n", + "1869 250302 Irazola Padre Abad Ucayali 0\n", + "1870 250303 Curimana Padre Abad Ucayali 0\n", + "1871 250304 Neshuya Padre Abad Ucayali 0\n", + "1872 250305 Alexander von Humboldt Padre Abad Ucayali 0\n", + "1873 250401 Purus Purus Ucayali 1\n", + "\n", + "[1874 rows x 5 columns]" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Mostramos \"unidos\"\n", + "\n", + "unidos" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "d51a84b7", + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ubigeodistritoprovinciaregionunidosnumperperiodnumpanhmesdominiop400a3p4022
010101ChachapoyasChachapoyasAmazonas11536815115811sierra norte1946.00.0
110101ChachapoyasChachapoyasAmazonas11536915115811sierra norte1973.00.0
210101ChachapoyasChachapoyasAmazonas11538015116211sierra norte1987.01.0
310101ChachapoyasChachapoyasAmazonas11538115116211sierra norte2009.01.0
410101ChachapoyasChachapoyasAmazonas1154101511857sierra norte1955.00.0
.......................................
27725250301Padre AbadPadre AbadUcayali03253119167392selva2013.00.0
27726250301Padre AbadPadre AbadUcayali03252919167392selva2003.00.0
27727250301Padre AbadPadre AbadUcayali03253019167392selva2009.00.0
27728250301Padre AbadPadre AbadUcayali03252819167392selva1985.01.0
27729250301Padre AbadPadre AbadUcayali03253319167402selva1961.00.0
\n", + "

27730 rows × 12 columns

\n", + "
" + ], + "text/plain": [ + " ubigeo distrito provincia region unidos numper period \\\n", + "0 10101 Chachapoyas Chachapoyas Amazonas 1 15368 15 \n", + "1 10101 Chachapoyas Chachapoyas Amazonas 1 15369 15 \n", + "2 10101 Chachapoyas Chachapoyas Amazonas 1 15380 15 \n", + "3 10101 Chachapoyas Chachapoyas Amazonas 1 15381 15 \n", + "4 10101 Chachapoyas Chachapoyas Amazonas 1 15410 15 \n", + "... ... ... ... ... ... ... ... \n", + "27725 250301 Padre Abad Padre Abad Ucayali 0 32531 19 \n", + "27726 250301 Padre Abad Padre Abad Ucayali 0 32529 19 \n", + "27727 250301 Padre Abad Padre Abad Ucayali 0 32530 19 \n", + "27728 250301 Padre Abad Padre Abad Ucayali 0 32528 19 \n", + "27729 250301 Padre Abad Padre Abad Ucayali 0 32533 19 \n", + "\n", + " numpanh mes dominio p400a3 p4022 \n", + "0 1158 11 sierra norte 1946.0 0.0 \n", + "1 1158 11 sierra norte 1973.0 0.0 \n", + "2 1162 11 sierra norte 1987.0 1.0 \n", + "3 1162 11 sierra norte 2009.0 1.0 \n", + "4 1185 7 sierra norte 1955.0 0.0 \n", + "... ... ... ... ... ... \n", + "27725 16739 2 selva 2013.0 0.0 \n", + "27726 16739 2 selva 2003.0 0.0 \n", + "27727 16739 2 selva 2009.0 0.0 \n", + "27728 16739 2 selva 1985.0 1.0 \n", + "27729 16740 2 selva 1961.0 0.0 \n", + "\n", + "[27730 rows x 12 columns]" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "## Realizamos el Merge Dataset\n", + "\n", + "# Tomamos como data master la base \"unidos\", ya que tiene como identificador\n", + "# la variable ubigeo (sin repetir).\n", + "\n", + "pd.merge(unidos, reshape_data, how = \"inner\", on = \"ubigeo\", validate = \"1:m\")" + ] + } + ], + "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.9.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 6080e86e5c3d8d932f5beac589e524af99ac458d Mon Sep 17 00:00:00 2001 From: Pamela Obregon <128948502+pameov@users.noreply.github.com> Date: Sun, 11 Jun 2023 22:53:55 -0500 Subject: [PATCH 2/4] #141 --- Labs/tarea6/Grupo8_r.R | 88 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Labs/tarea6/Grupo8_r.R diff --git a/Labs/tarea6/Grupo8_r.R b/Labs/tarea6/Grupo8_r.R new file mode 100644 index 0000000..343d861 --- /dev/null +++ b/Labs/tarea6/Grupo8_r.R @@ -0,0 +1,88 @@ +#TAREA 6------------------------------------------------ +#Grupo 8 +# Integrantes: +#- Renzo Mosquera (20181960) +#- Yenner Huancahuire (20173340) +#- Pamela Obregón (20173040) + + +# clean environment variables + +rm(list = ls()) + +# clean plots +graphics.off() + +# clean console + +cat("\014") + +# additional options +options(scipen = 999) # No scientific notation + +# Library + +library(pacman) +p_load(reshape, tidyverse, haven,dplyr,Hmisc) + + +# Change working directory + +setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) + + +# Cargamos las bases de datos + +enaho <- read_dta("../../data/Juntos_program/data.dta") +unidos <- read_dta("../../data/Juntos_program/unidos.dta") + +# +#PREGUNTA 1 ---- +# + +# Renombramos la variable numpanh añadiendole un guion + +enaho <- enaho |> dplyr::rename( "numpanh_15" = "numpanh15", "numpanh_16" = "numpanh16", + "numpanh_17" = "numpanh17","numpanh_18" = "numpanh18","numpanh_19" = "numpanh19") + +# Mostramos nuestras variables de interés + +colnames(enaho) + +# Creamos la nueva de base de datos en formato long + +reshape_enaho <- enaho %>% pivot_longer(cols = -numper, names_to = c(".value", "año"), + names_sep = "_") + + +# +#PREGUNTA 2 ---- +# + +# Revisamos las variables de ambas bases de datos para identificar la variable en comun + +colnames(enaho) +colnames(unidos) + +# Unimos las bases de datos + +bases <- merge(reshape_enaho, unidos, by = c("ubigeo")) + +# +#PREGUNTA 3 ---- +# + +# Colocamos etiquetas a todas las variables + +label(bases$numper)<-'Identificador individual único' +label(bases$numpanh)<-'Identificador único de hogar en 2015' +label(bases$p400a3)<-'Año de nacimiento de la persona, reportado en 2015' +label(bases$p4022)<-'¿Estabas enfermo las ultimas 4 semanas?' +label(bases$unidos)<-'¿Programa Juntos aplicado en el distrito?' + +# Colocamos etiquetas de valores a las siguientes variables p4022 y unidos + +bases$p4022 <- ifelse(bases$p4022 == 1, "Si", "No") +bases$unidos <- ifelse(bases$unidos == 1, "Si", "No") + + From 7fcd7f27a38ea274e07a292e3a0b065a47dd7e0a Mon Sep 17 00:00:00 2001 From: Pamela Obregon <128948502+pameov@users.noreply.github.com> Date: Sun, 11 Jun 2023 23:41:33 -0500 Subject: [PATCH 3/4] #141 --- Labs/tarea6/Grupo8.ipynb | 4397 ++++++++++++++++++++++++++++++ Labs/tarea6/_jec_data_Grupo8.dta | Bin 0 -> 25954 bytes 2 files changed, 4397 insertions(+) create mode 100644 Labs/tarea6/Grupo8.ipynb create mode 100644 Labs/tarea6/_jec_data_Grupo8.dta diff --git a/Labs/tarea6/Grupo8.ipynb b/Labs/tarea6/Grupo8.ipynb new file mode 100644 index 0000000..d973652 --- /dev/null +++ b/Labs/tarea6/Grupo8.ipynb @@ -0,0 +1,4397 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "code", + "source": [ + "#TAREA 6\n", + "#Grupo 8\n", + "# Integrantes:\n", + "#- Renzo Mosquera (20181960)\n", + "#- Yenner Huancahuire (20173340)\n", + "#- Pamela Obregón (20173040)\n" + ], + "metadata": { + "id": "1W0zrQ7-5EOt" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "4IZdWc8YrdTg", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "ffbad23b-f5ee-453a-9324-70b0aa01b93c" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", + "Collecting ghostscript\n", + " Downloading ghostscript-0.7-py2.py3-none-any.whl (25 kB)\n", + "Requirement already satisfied: setuptools>=38.6.0 in /usr/local/lib/python3.10/dist-packages (from ghostscript) (67.7.2)\n", + "Installing collected packages: ghostscript\n", + "Successfully installed ghostscript-0.7\n", + "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", + "Collecting camelot-py[cv]\n", + " Downloading camelot_py-0.11.0-py3-none-any.whl (40 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.0/41.0 kB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: chardet>=3.0.4 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]) (4.0.0)\n", + "Requirement already satisfied: click>=6.7 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]) (8.1.3)\n", + "Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]) (1.22.4)\n", + "Requirement already satisfied: openpyxl>=2.5.8 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]) (3.0.10)\n", + "Requirement already satisfied: pandas>=0.23.4 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]) (1.5.3)\n", + "Collecting pdfminer.six>=20200726 (from camelot-py[cv])\n", + " Downloading pdfminer.six-20221105-py3-none-any.whl (5.6 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.6/5.6 MB\u001b[0m \u001b[31m60.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting pypdf>=3.0.0 (from camelot-py[cv])\n", + " Downloading pypdf-3.9.1-py3-none-any.whl (249 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m249.3/249.3 kB\u001b[0m \u001b[31m21.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: tabulate>=0.8.9 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]) (0.8.10)\n", + "Requirement already satisfied: ghostscript>=0.7 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]) (0.7)\n", + "Requirement already satisfied: opencv-python>=3.4.2.17 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]) (4.7.0.72)\n", + "INFO: pip is looking at multiple versions of camelot-py[cv] to determine which version is compatible with other requirements. This could take a while.\n", + "Collecting camelot-py[cv]\n", + " Downloading camelot_py-0.10.1-py3-none-any.whl (40 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.0/41.0 kB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting PyPDF2>=1.26.0 (from camelot-py[cv])\n", + " Downloading pypdf2-3.0.1-py3-none-any.whl (232 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m232.6/232.6 kB\u001b[0m \u001b[31m24.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting camelot-py[cv]\n", + " Downloading camelot_py-0.10.0-py3-none-any.whl (40 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.0/41.0 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading camelot_py-0.9.0-py3-none-any.whl (43 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m43.2/43.2 kB\u001b[0m \u001b[31m4.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: et-xmlfile in /usr/local/lib/python3.10/dist-packages (from openpyxl>=2.5.8->camelot-py[cv]) (1.1.0)\n", + "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=0.23.4->camelot-py[cv]) (2.8.2)\n", + "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=0.23.4->camelot-py[cv]) (2022.7.1)\n", + "Requirement already satisfied: charset-normalizer>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from pdfminer.six>=20200726->camelot-py[cv]) (2.0.12)\n", + "Requirement already satisfied: cryptography>=36.0.0 in /usr/local/lib/python3.10/dist-packages (from pdfminer.six>=20200726->camelot-py[cv]) (40.0.2)\n", + "Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.10/dist-packages (from cryptography>=36.0.0->pdfminer.six>=20200726->camelot-py[cv]) (1.15.1)\n", + "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas>=0.23.4->camelot-py[cv]) (1.16.0)\n", + "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.12->cryptography>=36.0.0->pdfminer.six>=20200726->camelot-py[cv]) (2.21)\n", + "Installing collected packages: PyPDF2, pdfminer.six, camelot-py\n", + "Successfully installed PyPDF2-3.0.1 camelot-py-0.9.0 pdfminer.six-20221105\n", + "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", + "Collecting excalibur-py\n", + " Downloading excalibur_py-0.4.3-py3-none-any.whl (1.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.5/1.5 MB\u001b[0m \u001b[31m20.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: camelot-py[cv]>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from excalibur-py) (0.9.0)\n", + "Collecting celery>=4.1.1 (from excalibur-py)\n", + " Downloading celery-5.3.0-py3-none-any.whl (420 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m420.3/420.3 kB\u001b[0m \u001b[31m33.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: Click>=7.0 in /usr/local/lib/python3.10/dist-packages (from excalibur-py) (8.1.3)\n", + "Collecting configparser<3.6.0,>=3.5.0 (from excalibur-py)\n", + " Downloading configparser-3.5.3-py3-none-any.whl (21 kB)\n", + "Requirement already satisfied: Flask>=1.0.2 in /usr/local/lib/python3.10/dist-packages (from excalibur-py) (2.2.4)\n", + "Requirement already satisfied: SQLAlchemy>=1.2.12 in /usr/local/lib/python3.10/dist-packages (from excalibur-py) (2.0.10)\n", + "Collecting Werkzeug<1.0.0 (from excalibur-py)\n", + " Downloading Werkzeug-0.16.1-py2.py3-none-any.whl (327 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m327.4/327.4 kB\u001b[0m \u001b[31m27.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: chardet>=3.0.4 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]>=0.7.1->excalibur-py) (4.0.0)\n", + "Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]>=0.7.1->excalibur-py) (1.22.4)\n", + "Requirement already satisfied: openpyxl>=2.5.8 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]>=0.7.1->excalibur-py) (3.0.10)\n", + "Requirement already satisfied: pandas>=0.23.4 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]>=0.7.1->excalibur-py) (1.5.3)\n", + "Requirement already satisfied: pdfminer.six>=20200726 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]>=0.7.1->excalibur-py) (20221105)\n", + "Requirement already satisfied: PyPDF2>=1.26.0 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]>=0.7.1->excalibur-py) (3.0.1)\n", + "Requirement already satisfied: opencv-python>=3.4.2.17 in /usr/local/lib/python3.10/dist-packages (from camelot-py[cv]>=0.7.1->excalibur-py) (4.7.0.72)\n", + "Collecting billiard<5.0,>=4.1.0 (from celery>=4.1.1->excalibur-py)\n", + " Downloading billiard-4.1.0-py3-none-any.whl (86 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.7/86.7 kB\u001b[0m \u001b[31m9.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting click-didyoumean>=0.3.0 (from celery>=4.1.1->excalibur-py)\n", + " Downloading click_didyoumean-0.3.0-py3-none-any.whl (2.7 kB)\n", + "Collecting click-plugins>=1.1.1 (from celery>=4.1.1->excalibur-py)\n", + " Downloading click_plugins-1.1.1-py2.py3-none-any.whl (7.5 kB)\n", + "Collecting click-repl>=0.2.0 (from celery>=4.1.1->excalibur-py)\n", + " Downloading click_repl-0.2.0-py3-none-any.whl (5.2 kB)\n", + "Collecting kombu<6.0,>=5.3.0 (from celery>=4.1.1->excalibur-py)\n", + " Downloading kombu-5.3.0-py3-none-any.whl (198 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m198.5/198.5 kB\u001b[0m \u001b[31m17.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from celery>=4.1.1->excalibur-py) (2.8.2)\n", + "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/dist-packages (from celery>=4.1.1->excalibur-py) (2023.3)\n", + "Collecting vine<6.0,>=5.0.0 (from celery>=4.1.1->excalibur-py)\n", + " Downloading vine-5.0.0-py2.py3-none-any.whl (9.4 kB)\n", + "INFO: pip is looking at multiple versions of flask to determine which version is compatible with other requirements. This could take a while.\n", + "Collecting Flask>=1.0.2 (from excalibur-py)\n", + " Downloading Flask-2.3.2-py3-none-any.whl (96 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m96.9/96.9 kB\u001b[0m \u001b[31m9.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.3.1-py3-none-any.whl (96 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m97.0/97.0 kB\u001b[0m \u001b[31m8.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.3.0-py3-none-any.whl (96 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m97.0/97.0 kB\u001b[0m \u001b[31m9.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.2.5-py3-none-any.whl (101 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m101.8/101.8 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.2.3-py3-none-any.whl (101 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m101.8/101.8 kB\u001b[0m \u001b[31m10.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.2.2-py3-none-any.whl (101 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m101.5/101.5 kB\u001b[0m \u001b[31m10.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.2.1-py3-none-any.whl (101 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m101.5/101.5 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hINFO: pip is looking at multiple versions of flask to determine which version is compatible with other requirements. This could take a while.\n", + " Downloading Flask-2.2.0-py3-none-any.whl (101 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m101.1/101.1 kB\u001b[0m \u001b[31m10.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.1.3-py3-none-any.whl (95 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m95.6/95.6 kB\u001b[0m \u001b[31m9.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.1.2-py3-none-any.whl (95 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m95.2/95.2 kB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.1.1-py3-none-any.whl (95 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m95.2/95.2 kB\u001b[0m \u001b[31m10.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.1.0-py3-none-any.whl (95 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m95.2/95.2 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hINFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.\n", + " Downloading Flask-2.0.3-py3-none-any.whl (95 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m95.6/95.6 kB\u001b[0m \u001b[31m7.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.0.2-py3-none-any.whl (95 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m95.2/95.2 kB\u001b[0m \u001b[31m10.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.0.1-py3-none-any.whl (94 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.8/94.8 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-2.0.0-py3-none-any.whl (93 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m93.2/93.2 kB\u001b[0m \u001b[31m7.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-1.1.4-py2.py3-none-any.whl (94 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.6/94.6 kB\u001b[0m \u001b[31m8.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting Jinja2<3.0,>=2.10.1 (from Flask>=1.0.2->excalibur-py)\n", + " Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m125.7/125.7 kB\u001b[0m \u001b[31m12.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting itsdangerous<2.0,>=0.24 (from Flask>=1.0.2->excalibur-py)\n", + " Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)\n", + "Collecting Flask>=1.0.2 (from excalibur-py)\n", + " Downloading Flask-1.1.3-py2.py3-none-any.whl (94 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.6/94.6 kB\u001b[0m \u001b[31m10.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.6/94.6 kB\u001b[0m \u001b[31m10.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: Jinja2>=2.10.1 in /usr/local/lib/python3.10/dist-packages (from Flask>=1.0.2->excalibur-py) (3.1.2)\n", + "Requirement already satisfied: itsdangerous>=0.24 in /usr/local/lib/python3.10/dist-packages (from Flask>=1.0.2->excalibur-py) (2.1.2)\n", + "Requirement already satisfied: typing-extensions>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from SQLAlchemy>=1.2.12->excalibur-py) (4.5.0)\n", + "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.10/dist-packages (from SQLAlchemy>=1.2.12->excalibur-py) (2.0.2)\n", + "Requirement already satisfied: prompt-toolkit in /usr/local/lib/python3.10/dist-packages (from click-repl>=0.2.0->celery>=4.1.1->excalibur-py) (3.0.38)\n", + "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from click-repl>=0.2.0->celery>=4.1.1->excalibur-py) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from Jinja2>=2.10.1->Flask>=1.0.2->excalibur-py) (2.1.2)\n", + "Collecting amqp<6.0.0,>=5.1.1 (from kombu<6.0,>=5.3.0->celery>=4.1.1->excalibur-py)\n", + " Downloading amqp-5.1.1-py3-none-any.whl (50 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.8/50.8 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: et-xmlfile in /usr/local/lib/python3.10/dist-packages (from openpyxl>=2.5.8->camelot-py[cv]>=0.7.1->excalibur-py) (1.1.0)\n", + "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=0.23.4->camelot-py[cv]>=0.7.1->excalibur-py) (2022.7.1)\n", + "Requirement already satisfied: charset-normalizer>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from pdfminer.six>=20200726->camelot-py[cv]>=0.7.1->excalibur-py) (2.0.12)\n", + "Requirement already satisfied: cryptography>=36.0.0 in /usr/local/lib/python3.10/dist-packages (from pdfminer.six>=20200726->camelot-py[cv]>=0.7.1->excalibur-py) (40.0.2)\n", + "Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.10/dist-packages (from cryptography>=36.0.0->pdfminer.six>=20200726->camelot-py[cv]>=0.7.1->excalibur-py) (1.15.1)\n", + "Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit->click-repl>=0.2.0->celery>=4.1.1->excalibur-py) (0.2.6)\n", + "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.12->cryptography>=36.0.0->pdfminer.six>=20200726->camelot-py[cv]>=0.7.1->excalibur-py) (2.21)\n", + "Installing collected packages: Werkzeug, vine, configparser, click-plugins, click-didyoumean, billiard, Flask, click-repl, amqp, kombu, celery, excalibur-py\n", + " Attempting uninstall: Werkzeug\n", + " Found existing installation: Werkzeug 2.3.0\n", + " Uninstalling Werkzeug-2.3.0:\n", + " Successfully uninstalled Werkzeug-2.3.0\n", + " Attempting uninstall: Flask\n", + " Found existing installation: Flask 2.2.4\n", + " Uninstalling Flask-2.2.4:\n", + " Successfully uninstalled Flask-2.2.4\n", + "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "tensorboard 2.12.2 requires werkzeug>=1.0.1, but you have werkzeug 0.16.1 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0mSuccessfully installed Flask-1.1.2 Werkzeug-0.16.1 amqp-5.1.1 billiard-4.1.0 celery-5.3.0 click-didyoumean-0.3.0 click-plugins-1.1.1 click-repl-0.2.0 configparser-3.5.3 excalibur-py-0.4.3 kombu-5.3.0 vine-5.0.0\n", + "Reading package lists... Done\n", + "Building dependency tree \n", + "Reading state information... Done\n", + "The following additional packages will be installed:\n", + " blt fonts-droid-fallback fonts-noto-mono fonts-urw-base35 libgs9\n", + " libgs9-common libidn11 libijs-0.35 libjbig2dec0 poppler-data tk8.6-blt2.5\n", + "Suggested packages:\n", + " blt-demo fonts-noto fonts-freefont-otf | fonts-freefont-ttf fonts-texgyre\n", + " ghostscript-x poppler-utils fonts-japanese-mincho | fonts-ipafont-mincho\n", + " fonts-japanese-gothic | fonts-ipafont-gothic fonts-arphic-ukai\n", + " fonts-arphic-uming fonts-nanum tix python3-tk-dbg\n", + "The following NEW packages will be installed:\n", + " blt fonts-droid-fallback fonts-noto-mono fonts-urw-base35 ghostscript libgs9\n", + " libgs9-common libidn11 libijs-0.35 libjbig2dec0 poppler-data python3-tk\n", + " tk8.6-blt2.5\n", + "0 upgraded, 13 newly installed, 0 to remove and 38 not upgraded.\n", + "Need to get 13.4 MB of archives.\n", + "After this operation, 54.8 MB of additional disk space will be used.\n", + "Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 fonts-droid-fallback all 1:6.0.1r16-1.1 [1,805 kB]\n", + "Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 poppler-data all 0.4.9-2 [1,475 kB]\n", + "Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 tk8.6-blt2.5 amd64 2.5.3+dfsg-4 [572 kB]\n", + "Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 blt amd64 2.5.3+dfsg-4 [4,944 B]\n", + "Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 fonts-noto-mono all 20200323-1build1~ubuntu20.04.1 [80.6 kB]\n", + "Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 fonts-urw-base35 all 20170801.1-3 [6,333 kB]\n", + "Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgs9-common all 9.50~dfsg-5ubuntu4.7 [681 kB]\n", + "Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 libidn11 amd64 1.33-2.2ubuntu2 [46.2 kB]\n", + "Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 libijs-0.35 amd64 0.35-15 [15.7 kB]\n", + "Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 libjbig2dec0 amd64 0.18-1ubuntu1 [60.0 kB]\n", + "Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgs9 amd64 9.50~dfsg-5ubuntu4.7 [2,173 kB]\n", + "Get:12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ghostscript amd64 9.50~dfsg-5ubuntu4.7 [51.9 kB]\n", + "Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-tk amd64 3.8.10-0ubuntu1~20.04 [104 kB]\n", + "Fetched 13.4 MB in 3s (4,667 kB/s)\n", + "Selecting previously unselected package fonts-droid-fallback.\n", + "(Reading database ... 122541 files and directories currently installed.)\n", + "Preparing to unpack .../00-fonts-droid-fallback_1%3a6.0.1r16-1.1_all.deb ...\n", + "Unpacking fonts-droid-fallback (1:6.0.1r16-1.1) ...\n", + "Selecting previously unselected package poppler-data.\n", + "Preparing to unpack .../01-poppler-data_0.4.9-2_all.deb ...\n", + "Unpacking poppler-data (0.4.9-2) ...\n", + "Selecting previously unselected package tk8.6-blt2.5.\n", + "Preparing to unpack .../02-tk8.6-blt2.5_2.5.3+dfsg-4_amd64.deb ...\n", + "Unpacking tk8.6-blt2.5 (2.5.3+dfsg-4) ...\n", + "Selecting previously unselected package blt.\n", + "Preparing to unpack .../03-blt_2.5.3+dfsg-4_amd64.deb ...\n", + "Unpacking blt (2.5.3+dfsg-4) ...\n", + "Selecting previously unselected package fonts-noto-mono.\n", + "Preparing to unpack .../04-fonts-noto-mono_20200323-1build1~ubuntu20.04.1_all.deb ...\n", + "Unpacking fonts-noto-mono (20200323-1build1~ubuntu20.04.1) ...\n", + "Selecting previously unselected package fonts-urw-base35.\n", + "Preparing to unpack .../05-fonts-urw-base35_20170801.1-3_all.deb ...\n", + "Unpacking fonts-urw-base35 (20170801.1-3) ...\n", + "Selecting previously unselected package libgs9-common.\n", + "Preparing to unpack .../06-libgs9-common_9.50~dfsg-5ubuntu4.7_all.deb ...\n", + "Unpacking libgs9-common (9.50~dfsg-5ubuntu4.7) ...\n", + "Selecting previously unselected package libidn11:amd64.\n", + "Preparing to unpack .../07-libidn11_1.33-2.2ubuntu2_amd64.deb ...\n", + "Unpacking libidn11:amd64 (1.33-2.2ubuntu2) ...\n", + "Selecting previously unselected package libijs-0.35:amd64.\n", + "Preparing to unpack .../08-libijs-0.35_0.35-15_amd64.deb ...\n", + "Unpacking libijs-0.35:amd64 (0.35-15) ...\n", + "Selecting previously unselected package libjbig2dec0:amd64.\n", + "Preparing to unpack .../09-libjbig2dec0_0.18-1ubuntu1_amd64.deb ...\n", + "Unpacking libjbig2dec0:amd64 (0.18-1ubuntu1) ...\n", + "Selecting previously unselected package libgs9:amd64.\n", + "Preparing to unpack .../10-libgs9_9.50~dfsg-5ubuntu4.7_amd64.deb ...\n", + "Unpacking libgs9:amd64 (9.50~dfsg-5ubuntu4.7) ...\n", + "Selecting previously unselected package ghostscript.\n", + "Preparing to unpack .../11-ghostscript_9.50~dfsg-5ubuntu4.7_amd64.deb ...\n", + "Unpacking ghostscript (9.50~dfsg-5ubuntu4.7) ...\n", + "Selecting previously unselected package python3-tk:amd64.\n", + "Preparing to unpack .../12-python3-tk_3.8.10-0ubuntu1~20.04_amd64.deb ...\n", + "Unpacking python3-tk:amd64 (3.8.10-0ubuntu1~20.04) ...\n", + "Setting up tk8.6-blt2.5 (2.5.3+dfsg-4) ...\n", + "Setting up fonts-noto-mono (20200323-1build1~ubuntu20.04.1) ...\n", + "Setting up libijs-0.35:amd64 (0.35-15) ...\n", + "Setting up blt (2.5.3+dfsg-4) ...\n", + "Setting up python3-tk:amd64 (3.8.10-0ubuntu1~20.04) ...\n", + "Setting up fonts-urw-base35 (20170801.1-3) ...\n", + "Setting up poppler-data (0.4.9-2) ...\n", + "Setting up libjbig2dec0:amd64 (0.18-1ubuntu1) ...\n", + "Setting up libidn11:amd64 (1.33-2.2ubuntu2) ...\n", + "Setting up fonts-droid-fallback (1:6.0.1r16-1.1) ...\n", + "Setting up libgs9-common (9.50~dfsg-5ubuntu4.7) ...\n", + "Setting up libgs9:amd64 (9.50~dfsg-5ubuntu4.7) ...\n", + "Setting up ghostscript (9.50~dfsg-5ubuntu4.7) ...\n", + "Processing triggers for fontconfig (2.13.1-2ubuntu3) ...\n", + "Processing triggers for libc-bin (2.31-0ubuntu9.9) ...\n", + "Processing triggers for man-db (2.9.1-1) ...\n" + ] + } + ], + "source": [ + "!pip install ghostscript\n", + "!pip install camelot-py[cv]\n", + "!pip install excalibur-py\n", + "!apt install ghostscript python3-tk" + ] + }, + { + "cell_type": "code", + "source": [ + "!pip install --upgrade PyPDF2==2.12.1" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "fDCAy_93th7U", + "outputId": "c80d8be6-8da1-4197-8f8b-06bcb07803c0" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", + "Collecting PyPDF2==2.12.1\n", + " Downloading pypdf2-2.12.1-py3-none-any.whl (222 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m222.8/222.8 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hInstalling collected packages: PyPDF2\n", + " Attempting uninstall: PyPDF2\n", + " Found existing installation: PyPDF2 3.0.1\n", + " Uninstalling PyPDF2-3.0.1:\n", + " Successfully uninstalled PyPDF2-3.0.1\n", + "Successfully installed PyPDF2-2.12.1\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "# Importamos las librerias\n", + "import camelot as cm # libreria de camelot\n", + "import numpy as np\n", + "import pandas as pd\n", + "from pandas import Series, DataFrame\n", + "import os\n", + "from PyPDF2 import PdfFileReader\n", + "import re # expresiones regulares" + ], + "metadata": { + "id": "3DXCu3c1trW8" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Cargamos el pdf\n", + "tables = cm.read_pdf(\"/content/sample_data/G8_HUANCAVELICA.pdf\", pages='1,2,3,4,5,6,7,8,9')" + ], + "metadata": { + "id": "Kuk_DZ11w1AM" + }, + "execution_count": 21, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# Identificamos el numero de tablas\n", + "tables" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "OI4KWGgQzS6X", + "outputId": "1a9fa9ec-03cb-4564-cdc8-c142634b8186" + }, + "execution_count": 22, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "" + ] + }, + "metadata": {}, + "execution_count": 22 + } + ] + }, + { + "cell_type": "code", + "source": [ + "# Revisamos los atributos\n", + "dir(tables[1])" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "cPc6bo3izzXT", + "outputId": "8da3bfc5-3f45-476d-f64e-6f89a432356c" + }, + "execution_count": 23, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['__class__',\n", + " '__delattr__',\n", + " '__dict__',\n", + " '__dir__',\n", + " '__doc__',\n", + " '__eq__',\n", + " '__format__',\n", + " '__ge__',\n", + " '__getattribute__',\n", + " '__gt__',\n", + " '__hash__',\n", + " '__init__',\n", + " '__init_subclass__',\n", + " '__le__',\n", + " '__lt__',\n", + " '__module__',\n", + " '__ne__',\n", + " '__new__',\n", + " '__reduce__',\n", + " '__reduce_ex__',\n", + " '__repr__',\n", + " '__setattr__',\n", + " '__sizeof__',\n", + " '__str__',\n", + " '__subclasshook__',\n", + " '__weakref__',\n", + " '_bbox',\n", + " '_image',\n", + " '_segments',\n", + " '_text',\n", + " '_textedges',\n", + " 'accuracy',\n", + " 'cells',\n", + " 'cols',\n", + " 'data',\n", + " 'df',\n", + " 'flavor',\n", + " 'order',\n", + " 'page',\n", + " 'parsing_report',\n", + " 'rows',\n", + " 'set_all_edges',\n", + " 'set_border',\n", + " 'set_edges',\n", + " 'set_span',\n", + " 'shape',\n", + " 'to_csv',\n", + " 'to_excel',\n", + " 'to_html',\n", + " 'to_json',\n", + " 'to_sqlite',\n", + " 'whitespace']" + ] + }, + "metadata": {}, + "execution_count": 23 + } + ] + }, + { + "cell_type": "code", + "source": [ + "# Extraemos cada una de las tablas y colocamos la primera fila como indice" + ], + "metadata": { + "id": "g2eCKfHu5X71" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "tabla1 = tables[0].df\n", + "tabla1.columns = tabla1.iloc[0]\n", + "tabla1 = tabla1[1:]\n", + "tabla1" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 890 + }, + "id": "HgF-klP41BZ0", + "outputId": "859d21f2-7a64-441e-ac79-ba39f171f8ae" + }, + "execution_count": 36, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0 # Año JEC Código \\nmodular Código \\nlocal \\\n", + "1 1 2015 0579979 176184 \n", + "2 2 2015 0421271 175863 \n", + "3 823 2015 0579987 176834 \n", + "4 824 2015 0421321 176626 \n", + "5 825 2015 1059203 177013 \n", + "6 826 2015 1060276 176320 \n", + "7 828 2015 1058288 176645 \n", + "8 829 2015 1246586 176202 \n", + "9 830 2015 0637371 177008 \n", + "10 834 2015 0802041 178135 \n", + "11 835 2015 0600783 177683 \n", + "12 836 2015 0421297 177640 \n", + "13 837 2015 0571554 177659 \n", + "14 838 2015 0508077 179205 \n", + "15 840 2015 1246503 178022 \n", + "16 841 2015 0421354 178833 \n", + "\n", + "0 Nombre de la IE DRE UGEL \\\n", + "1 CIRO ALEGRIA BAZAN DRE \\nHUANCAVELICA UGEL ACOBAMBA \n", + "2 SAN FRANCISCO DE ASIS DRE \\nHUANCAVELICA UGEL ACOBAMBA \n", + "3 JORGE CHAVEZ DRE \\nHUANCAVELICA UGEL ACOBAMBA \n", + "4 NUESTRA SEÑORA DE COCHARCAS DRE \\nHUANCAVELICA UGEL ACOBAMBA \n", + "5 DANIEL ALCIDES CARRION DRE \\nHUANCAVELICA UGEL ACOBAMBA \n", + "6 CORAS DRE \\nHUANCAVELICA UGEL ACOBAMBA \n", + "7 MIGUEL GRAU SEMINARIO DRE \\nHUANCAVELICA UGEL ACOBAMBA \n", + "8 JOSE ABELARDO QUIÑONES \\nGONZALES DRE \\nHUANCAVELICA UGEL ACOBAMBA \n", + "9 INCA GARCILAZO DE LA VEGA DRE \\nHUANCAVELICA UGEL ACOBAMBA \n", + "10 1 DE MAYO DRE \\nHUANCAVELICA UGEL ANGARAES \n", + "11 NUESTRA SEÑORA DEL CARMEN DRE \\nHUANCAVELICA UGEL ANGARAES \n", + "12 JOSE MARIA ARGUEDAS DRE \\nHUANCAVELICA UGEL ANGARAES \n", + "13 RICARDO PALMA DRE \\nHUANCAVELICA UGEL ANGARAES \n", + "14 ANDRES AVELINO CACERES DRE \\nHUANCAVELICA UGEL ANGARAES \n", + "15 JOSE GALVEZ BARRENECHEA DRE \\nHUANCAVELICA UGEL ANGARAES \n", + "16 JESUS NAZARENO DRE \\nHUANCAVELICA UGEL ANGARAES \n", + "\n", + "0 Ubigeo Departamento Provincia Distrito \\\n", + "1 090203 HUANCAVELICA ACOBAMBA ANTA \n", + "2 090201 HUANCAVELICA ACOBAMBA ACOBAMBA \n", + "3 090207 HUANCAVELICA ACOBAMBA POMACOCHA \n", + "4 090206 HUANCAVELICA ACOBAMBA PAUCARA \n", + "5 090208 HUANCAVELICA ACOBAMBA ROSARIO \n", + "6 090204 HUANCAVELICA ACOBAMBA CAJA \n", + "7 090206 HUANCAVELICA ACOBAMBA PAUCARA \n", + "8 090203 HUANCAVELICA ACOBAMBA ANTA \n", + "9 090208 HUANCAVELICA ACOBAMBA ROSARIO \n", + "10 090304 HUANCAVELICA ANGARAES CCOCHACCASA \n", + "11 090301 HUANCAVELICA ANGARAES LIRCAY \n", + "12 090301 HUANCAVELICA ANGARAES LIRCAY \n", + "13 090301 HUANCAVELICA ANGARAES LIRCAY \n", + "14 090312 HUANCAVELICA ANGARAES SECCLLA \n", + "15 090302 HUANCAVELICA ANGARAES ANCHONGA \n", + "16 090309 HUANCAVELICA ANGARAES JULCAMARCA \n", + "\n", + "0 Dirección Área Geográfica \n", + "1 AVENIDA ELVIRO CALDERON \\nS/N URBANA \n", + "2 AVENIDA MANUEL \\nCANDAMO S/N URBANA \n", + "3 AVENIDA PERU S/N URBANA \n", + "4 CALLE CUZCO S/N URBANA \n", + "5 CALLE LIMA S/N URBANA \n", + "6 MANZANAYOCC S/N RURAL \n", + "7 PLAZA PRINCIPAL S/N URBANA \n", + "8 PLAZA PRINCIPAL S/N RURAL \n", + "9 PROLONGACION \\nLIBERTADORES S/N URBANA \n", + "10 AVENIDA 30 DE OCTUBRE \\nS/N URBANA \n", + "11 AVENIDA ESMERALDA 0148 URBANA \n", + "12 AVENIDA JOSE MARIA \\nARGUEDAS 291 URBANA \n", + "13 AVENIDA RICARDO PALMA \\nS/N RURAL \n", + "14 JIRON LOS HEROES S/N URBANA \n", + "15 PARCO CHACAPUNCO RURAL \n", + "16 PLAZA PRINCIPAL URBANA " + ], + "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", + "
#Año JECCódigo \\nmodularCódigo \\nlocalNombre de la IEDREUGELUbigeoDepartamentoProvinciaDistritoDirecciónÁrea Geográfica
1120150579979176184CIRO ALEGRIA BAZANDRE \\nHUANCAVELICAUGEL ACOBAMBA090203HUANCAVELICAACOBAMBAANTAAVENIDA ELVIRO CALDERON \\nS/NURBANA
2220150421271175863SAN FRANCISCO DE ASISDRE \\nHUANCAVELICAUGEL ACOBAMBA090201HUANCAVELICAACOBAMBAACOBAMBAAVENIDA MANUEL \\nCANDAMO S/NURBANA
382320150579987176834JORGE CHAVEZDRE \\nHUANCAVELICAUGEL ACOBAMBA090207HUANCAVELICAACOBAMBAPOMACOCHAAVENIDA PERU S/NURBANA
482420150421321176626NUESTRA SEÑORA DE COCHARCASDRE \\nHUANCAVELICAUGEL ACOBAMBA090206HUANCAVELICAACOBAMBAPAUCARACALLE CUZCO S/NURBANA
582520151059203177013DANIEL ALCIDES CARRIONDRE \\nHUANCAVELICAUGEL ACOBAMBA090208HUANCAVELICAACOBAMBAROSARIOCALLE LIMA S/NURBANA
682620151060276176320CORASDRE \\nHUANCAVELICAUGEL ACOBAMBA090204HUANCAVELICAACOBAMBACAJAMANZANAYOCC S/NRURAL
782820151058288176645MIGUEL GRAU SEMINARIODRE \\nHUANCAVELICAUGEL ACOBAMBA090206HUANCAVELICAACOBAMBAPAUCARAPLAZA PRINCIPAL S/NURBANA
882920151246586176202JOSE ABELARDO QUIÑONES \\nGONZALESDRE \\nHUANCAVELICAUGEL ACOBAMBA090203HUANCAVELICAACOBAMBAANTAPLAZA PRINCIPAL S/NRURAL
983020150637371177008INCA GARCILAZO DE LA VEGADRE \\nHUANCAVELICAUGEL ACOBAMBA090208HUANCAVELICAACOBAMBAROSARIOPROLONGACION \\nLIBERTADORES S/NURBANA
10834201508020411781351 DE MAYODRE \\nHUANCAVELICAUGEL ANGARAES090304HUANCAVELICAANGARAESCCOCHACCASAAVENIDA 30 DE OCTUBRE \\nS/NURBANA
1183520150600783177683NUESTRA SEÑORA DEL CARMENDRE \\nHUANCAVELICAUGEL ANGARAES090301HUANCAVELICAANGARAESLIRCAYAVENIDA ESMERALDA 0148URBANA
1283620150421297177640JOSE MARIA ARGUEDASDRE \\nHUANCAVELICAUGEL ANGARAES090301HUANCAVELICAANGARAESLIRCAYAVENIDA JOSE MARIA \\nARGUEDAS 291URBANA
1383720150571554177659RICARDO PALMADRE \\nHUANCAVELICAUGEL ANGARAES090301HUANCAVELICAANGARAESLIRCAYAVENIDA RICARDO PALMA \\nS/NRURAL
1483820150508077179205ANDRES AVELINO CACERESDRE \\nHUANCAVELICAUGEL ANGARAES090312HUANCAVELICAANGARAESSECCLLAJIRON LOS HEROES S/NURBANA
1584020151246503178022JOSE GALVEZ BARRENECHEADRE \\nHUANCAVELICAUGEL ANGARAES090302HUANCAVELICAANGARAESANCHONGAPARCO CHACAPUNCORURAL
1684120150421354178833JESUS NAZARENODRE \\nHUANCAVELICAUGEL ANGARAES090309HUANCAVELICAANGARAESJULCAMARCAPLAZA PRINCIPALURBANA
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 36 + } + ] + }, + { + "cell_type": "code", + "source": [ + "tabla2 = tables[1].df\n", + "tabla2.columns = tabla2.iloc[0]\n", + "tabla2 = tabla2[1:]\n", + "tabla2" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 925 + }, + "id": "dMdWSw672HzU", + "outputId": "b71feb6c-775e-43df-abd7-6836e472eb4e" + }, + "execution_count": 38, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0 # Año JEC Código \\nmodular Código \\nlocal \\\n", + "1 842 2015 1059849 177758 \n", + "2 843 2015 0802033 177782 \n", + "3 845 2015 1403443 616442 \n", + "4 856 2015 0637611 182934 \n", + "5 857 2015 0499749 182175 \n", + "6 858 2015 0687897 182825 \n", + "7 861 2015 0770727 181840 \n", + "8 862 2015 0373217 181487 \n", + "9 864 2015 0373241 182689 \n", + "10 870 2015 0571737 174043 \n", + "11 871 2015 0421305 173958 \n", + "12 874 2015 1058312 171756 \n", + "13 877 2015 0571760 174463 \n", + "14 878 2015 0525626 173760 \n", + "15 879 2015 0421362 174712 \n", + "16 882 2015 0829754 175561 \n", + "\n", + "0 Nombre de la IE DRE \\\n", + "1 JOSE CARLOS MARIATEGUI DRE \\nHUANCAVELICA \n", + "2 SAN PABLO DRE \\nHUANCAVELICA \n", + "3 CHONTACANCHA DRE \\nHUANCAVELICA \n", + "4 JAVIER HERAUD DRE \\nHUANCAVELICA \n", + "5 JOSE CARLOS MARIATEGUI DRE \\nHUANCAVELICA \n", + "6 37510 JOSE ABELARDO QUIÑONES \\nGONZALES DRE \\nHUANCAVELICA \n", + "7 ANDRES AVELINO CACERES DRE \\nHUANCAVELICA \n", + "8 ANTONIO RAIMONDI DRE \\nHUANCAVELICA \n", + "9 SAN FRANCISCO DRE \\nHUANCAVELICA \n", + "10 DOS DE MAYO DRE \\nHUANCAVELICA \n", + "11 MANUEL ASCENCIO SEGURA DRE \\nHUANCAVELICA \n", + "12 AMERICA DRE \\nHUANCAVELICA \n", + "13 MANUEL GONZALES PRADA DRE \\nHUANCAVELICA \n", + "14 RICARDO PALMA DRE \\nHUANCAVELICA \n", + "15 TUPAC AMARU DRE \\nHUANCAVELICA \n", + "16 ANTONIO RAYMONDI DRE \\nHUANCAVELICA \n", + "\n", + "0 UGEL Ubigeo Departamento Provincia \\\n", + "1 UGEL ANGARAES 090301 HUANCAVELICA ANGARAES \n", + "2 UGEL ANGARAES 090302 HUANCAVELICA ANGARAES \n", + "3 UGEL ANGARAES 090302 HUANCAVELICA ANGARAES \n", + "4 UGEL CHURCAMPA 090509 HUANCAVELICA CHURCAMPA \n", + "5 UGEL CHURCAMPA 090504 HUANCAVELICA CHURCAMPA \n", + "6 UGEL CHURCAMPA 090509 HUANCAVELICA CHURCAMPA \n", + "7 UGEL CHURCAMPA 090511 HUANCAVELICA CHURCAMPA \n", + "8 UGEL CHURCAMPA 090501 HUANCAVELICA CHURCAMPA \n", + "9 UGEL CHURCAMPA 090507 HUANCAVELICA CHURCAMPA \n", + "10 UGEL \\nHUANCAVELICA 090109 HUANCAVELICA HUANCAVELICA \n", + "11 UGEL \\nHUANCAVELICA 090108 HUANCAVELICA HUANCAVELICA \n", + "12 UGEL \\nHUANCAVELICA 090118 HUANCAVELICA HUANCAVELICA \n", + "13 UGEL \\nHUANCAVELICA 090113 HUANCAVELICA HUANCAVELICA \n", + "14 UGEL \\nHUANCAVELICA 090106 HUANCAVELICA HUANCAVELICA \n", + "15 UGEL \\nHUANCAVELICA 090114 HUANCAVELICA HUANCAVELICA \n", + "16 UGEL \\nHUANCAVELICA 090117 HUANCAVELICA HUANCAVELICA \n", + "\n", + "0 Distrito Dirección \\\n", + "1 LIRCAY PLAZA PRINCIPAL \n", + "2 ANCHONGA PLAZA PRINCIPAL \n", + "3 ANCHONGA TOTORA PAMPA \n", + "4 SAN PEDRO DE \\nCORIS AVENIDA CAJAMARCA 701 \n", + "5 EL CARMEN AVENIDA EL CARMEN S/N \n", + "6 SAN PEDRO DE \\nCORIS AVENIDA GRAU S/N \n", + "7 COSME CARRETERA VILLENA-COSME-\\nLLACUA KM 16 \n", + "8 CHURCAMPA JIRON ANTONIO RAIMONDI \\n977 \n", + "9 PAUCARBAMBA JIRON SAN FRANCISCO S/N \n", + "10 LARIA AVENIDA 23 DE JUNIO S/N \n", + "11 IZCUCHACA AVENIDA ANDRES AVELINO \\nCACERES 485 \n", + "12 ASCENSION CALLE SANTOS VILLA S/N \n", + "13 NUEVO OCCORO JIRON DOS DE MAYO 336 \n", + "14 HUACHOCOLPA JIRON PORVENIR S/N \n", + "15 PALCA PASAJE INGENIO PAMPA S/N \n", + "16 YAULI PLAZA PRINCIPAL S/N \n", + "\n", + "0 Área Geográfica \n", + "1 RURAL \n", + "2 RURAL \n", + "3 RURAL \n", + "4 URBANA \n", + "5 URBANA \n", + "6 URBANA \n", + "7 URBANA \n", + "8 URBANA \n", + "9 URBANA \n", + "10 URBANA \n", + "11 URBANA \n", + "12 URBANA \n", + "13 URBANA \n", + "14 URBANA \n", + "15 URBANA \n", + "16 URBANA " + ], + "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", + "
#Año JECCódigo \\nmodularCódigo \\nlocalNombre de la IEDREUGELUbigeoDepartamentoProvinciaDistritoDirecciónÁrea Geográfica
184220151059849177758JOSE CARLOS MARIATEGUIDRE \\nHUANCAVELICAUGEL ANGARAES090301HUANCAVELICAANGARAESLIRCAYPLAZA PRINCIPALRURAL
284320150802033177782SAN PABLODRE \\nHUANCAVELICAUGEL ANGARAES090302HUANCAVELICAANGARAESANCHONGAPLAZA PRINCIPALRURAL
384520151403443616442CHONTACANCHADRE \\nHUANCAVELICAUGEL ANGARAES090302HUANCAVELICAANGARAESANCHONGATOTORA PAMPARURAL
485620150637611182934JAVIER HERAUDDRE \\nHUANCAVELICAUGEL CHURCAMPA090509HUANCAVELICACHURCAMPASAN PEDRO DE \\nCORISAVENIDA CAJAMARCA 701URBANA
585720150499749182175JOSE CARLOS MARIATEGUIDRE \\nHUANCAVELICAUGEL CHURCAMPA090504HUANCAVELICACHURCAMPAEL CARMENAVENIDA EL CARMEN S/NURBANA
68582015068789718282537510 JOSE ABELARDO QUIÑONES \\nGONZALESDRE \\nHUANCAVELICAUGEL CHURCAMPA090509HUANCAVELICACHURCAMPASAN PEDRO DE \\nCORISAVENIDA GRAU S/NURBANA
786120150770727181840ANDRES AVELINO CACERESDRE \\nHUANCAVELICAUGEL CHURCAMPA090511HUANCAVELICACHURCAMPACOSMECARRETERA VILLENA-COSME-\\nLLACUA KM 16URBANA
886220150373217181487ANTONIO RAIMONDIDRE \\nHUANCAVELICAUGEL CHURCAMPA090501HUANCAVELICACHURCAMPACHURCAMPAJIRON ANTONIO RAIMONDI \\n977URBANA
986420150373241182689SAN FRANCISCODRE \\nHUANCAVELICAUGEL CHURCAMPA090507HUANCAVELICACHURCAMPAPAUCARBAMBAJIRON SAN FRANCISCO S/NURBANA
1087020150571737174043DOS DE MAYODRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090109HUANCAVELICAHUANCAVELICALARIAAVENIDA 23 DE JUNIO S/NURBANA
1187120150421305173958MANUEL ASCENCIO SEGURADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090108HUANCAVELICAHUANCAVELICAIZCUCHACAAVENIDA ANDRES AVELINO \\nCACERES 485URBANA
1287420151058312171756AMERICADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090118HUANCAVELICAHUANCAVELICAASCENSIONCALLE SANTOS VILLA S/NURBANA
1387720150571760174463MANUEL GONZALES PRADADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090113HUANCAVELICAHUANCAVELICANUEVO OCCOROJIRON DOS DE MAYO 336URBANA
1487820150525626173760RICARDO PALMADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090106HUANCAVELICAHUANCAVELICAHUACHOCOLPAJIRON PORVENIR S/NURBANA
1587920150421362174712TUPAC AMARUDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090114HUANCAVELICAHUANCAVELICAPALCAPASAJE INGENIO PAMPA S/NURBANA
1688220150829754175561ANTONIO RAYMONDIDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090117HUANCAVELICAHUANCAVELICAYAULIPLAZA PRINCIPAL S/NURBANA
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 38 + } + ] + }, + { + "cell_type": "code", + "source": [ + "tabla3 = tables[2].df\n", + "tabla3.columns = tabla3.iloc[0]\n", + "tabla3 = tabla3[1:]\n", + "tabla3" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 925 + }, + "id": "qdFyT_Cb2REe", + "outputId": "3a11e14d-f9e8-4fbd-e51e-73af7098b6e6" + }, + "execution_count": 39, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0 # Año JEC Código \\nmodular Código \\nlocal \\\n", + "1 883 2015 0552232 175542 \n", + "2 886 2015 0421263 187823 \n", + "3 902 2015 0580415 187470 \n", + "4 903 2015 0489906 189474 \n", + "5 904 2015 1350792 519281 \n", + "6 913 2015 0373258 188455 \n", + "7 914 2015 0499269 188083 \n", + "8 915 2015 0687772 186244 \n", + "9 917 2015 1059419 186951 \n", + "10 918 2015 0687731 186833 \n", + "11 919 2015 0373266 186814 \n", + "12 920 2015 0373225 185819 \n", + "13 921 2015 0637314 186036 \n", + "14 922 2015 0580381 188097 \n", + "15 923 2015 1407592 620627 \n", + "16 924 2015 0217281 185541 \n", + "\n", + "0 Nombre de la IE DRE UGEL \\\n", + "1 SAN MARTIN DE PORRES DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA \n", + "2 MARISCAL AGUSTIN GAMARRA DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA \n", + "3 SANTA ROSA DRE \\nHUANCAVELICA UGEL SURCUBAMBA \n", + "4 SAN PEDRO DRE \\nHUANCAVELICA UGEL SURCUBAMBA \n", + "5 SAN MARTIN DE PORRES DRE \\nHUANCAVELICA UGEL SURCUBAMBA \n", + "6 RAUL PORRAS BARRENECHEA DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "7 AUGUSTO SALAZAR BONDY DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "8 SAN MIGUEL DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "9 ENRIQUETA SAMANEZ DE \\nHERMOZA DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "10 MICAELA BASTIDAS PUYUCAHUA DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "11 SANTIAGO ANTUNEZ DE MAYOLO DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "12 NUESTRA SEÑORA DE LA ASUNCION DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "13 JOSE MARIA ARGUEDAS \\nALTAMIRANO DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "14 SANTIAGO DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "15 MARISCAL CACERES DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "16 DANIEL HERNANDEZ DRE \\nHUANCAVELICA UGEL TAYACAJA \n", + "\n", + "0 Ubigeo Departamento Provincia Distrito \\\n", + "1 090117 HUANCAVELICA HUANCAVELICA YAULI \n", + "2 090119 HUANCAVELICA HUANCAVELICA HUANDO \n", + "3 090707 HUANCAVELICA TAYACAJA HUACHOCOLPA \n", + "4 090717 HUANCAVELICA TAYACAJA SURCUBAMBA \n", + "5 090717 HUANCAVELICA TAYACAJA SURCUBAMBA \n", + "6 090711 HUANCAVELICA TAYACAJA PAZOS \n", + "7 090709 HUANCAVELICA TAYACAJA HUARIBAMBA \n", + "8 090704 HUANCAVELICA TAYACAJA AHUAYCHA \n", + "9 090705 HUANCAVELICA TAYACAJA COLCABAMBA \n", + "10 090719 HUANCAVELICA TAYACAJA COLCABAMBA \n", + "11 090705 HUANCAVELICA TAYACAJA COLCABAMBA \n", + "12 090702 HUANCAVELICA TAYACAJA ACOSTAMBO \n", + "13 090703 HUANCAVELICA TAYACAJA ACRAQUIA \n", + "14 090722 HUANCAVELICA TAYACAJA HUARIBAMBA \n", + "15 090706 HUANCAVELICA TAYACAJA DANIEL \\nHERNANDEZ \n", + "16 090701 HUANCAVELICA TAYACAJA PAMPAS \n", + "\n", + "0 Dirección Área Geográfica \n", + "1 PLAZA PRINCIPAL S/N URBANA \n", + "2 PROLONGACION SUCRE S/N URBANA \n", + "3 AVENIDA AUGUSTO \\nHINOSTROZA ARROYO S/N URBANA \n", + "4 CALLE PRINCIPAL S/N URBANA \n", + "5 PLAZA PRINCIPAL RURAL \n", + "6 AVENIDA BOLIVAR 460 URBANA \n", + "7 AVENIDA HUANCAVELICA \\nS/N URBANA \n", + "8 AVENIDA MANUEL TORRES \\nS/N URBANA \n", + "9 AVENIDA SAN JULIAN RURAL \n", + "10 AVENIDA SANTIAGO \\nANTUNEZ MAYOLO URBANA \n", + "11 CALLE SAN JUAN XXIII URBANA \n", + "12 CARRETERA HUANCAYO - \\nHUANCAVELICA KM. 38 URBANA \n", + "13 JIRON ALFONSO UGARTE S/N URBANA \n", + "14 JIRON AREQUIPA S/N URBANA \n", + "15 JIRON JOSE OLAYA S/N URBANA \n", + "16 JIRON MANCO CAPAC 152 URBANA " + ], + "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", + "
#Año JECCódigo \\nmodularCódigo \\nlocalNombre de la IEDREUGELUbigeoDepartamentoProvinciaDistritoDirecciónÁrea Geográfica
188320150552232175542SAN MARTIN DE PORRESDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090117HUANCAVELICAHUANCAVELICAYAULIPLAZA PRINCIPAL S/NURBANA
288620150421263187823MARISCAL AGUSTIN GAMARRADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090119HUANCAVELICAHUANCAVELICAHUANDOPROLONGACION SUCRE S/NURBANA
390220150580415187470SANTA ROSADRE \\nHUANCAVELICAUGEL SURCUBAMBA090707HUANCAVELICATAYACAJAHUACHOCOLPAAVENIDA AUGUSTO \\nHINOSTROZA ARROYO S/NURBANA
490320150489906189474SAN PEDRODRE \\nHUANCAVELICAUGEL SURCUBAMBA090717HUANCAVELICATAYACAJASURCUBAMBACALLE PRINCIPAL S/NURBANA
590420151350792519281SAN MARTIN DE PORRESDRE \\nHUANCAVELICAUGEL SURCUBAMBA090717HUANCAVELICATAYACAJASURCUBAMBAPLAZA PRINCIPALRURAL
691320150373258188455RAUL PORRAS BARRENECHEADRE \\nHUANCAVELICAUGEL TAYACAJA090711HUANCAVELICATAYACAJAPAZOSAVENIDA BOLIVAR 460URBANA
791420150499269188083AUGUSTO SALAZAR BONDYDRE \\nHUANCAVELICAUGEL TAYACAJA090709HUANCAVELICATAYACAJAHUARIBAMBAAVENIDA HUANCAVELICA \\nS/NURBANA
891520150687772186244SAN MIGUELDRE \\nHUANCAVELICAUGEL TAYACAJA090704HUANCAVELICATAYACAJAAHUAYCHAAVENIDA MANUEL TORRES \\nS/NURBANA
991720151059419186951ENRIQUETA SAMANEZ DE \\nHERMOZADRE \\nHUANCAVELICAUGEL TAYACAJA090705HUANCAVELICATAYACAJACOLCABAMBAAVENIDA SAN JULIANRURAL
1091820150687731186833MICAELA BASTIDAS PUYUCAHUADRE \\nHUANCAVELICAUGEL TAYACAJA090719HUANCAVELICATAYACAJACOLCABAMBAAVENIDA SANTIAGO \\nANTUNEZ MAYOLOURBANA
1191920150373266186814SANTIAGO ANTUNEZ DE MAYOLODRE \\nHUANCAVELICAUGEL TAYACAJA090705HUANCAVELICATAYACAJACOLCABAMBACALLE SAN JUAN XXIIIURBANA
1292020150373225185819NUESTRA SEÑORA DE LA ASUNCIONDRE \\nHUANCAVELICAUGEL TAYACAJA090702HUANCAVELICATAYACAJAACOSTAMBOCARRETERA HUANCAYO - \\nHUANCAVELICA KM. 38URBANA
1392120150637314186036JOSE MARIA ARGUEDAS \\nALTAMIRANODRE \\nHUANCAVELICAUGEL TAYACAJA090703HUANCAVELICATAYACAJAACRAQUIAJIRON ALFONSO UGARTE S/NURBANA
1492220150580381188097SANTIAGODRE \\nHUANCAVELICAUGEL TAYACAJA090722HUANCAVELICATAYACAJAHUARIBAMBAJIRON AREQUIPA S/NURBANA
1592320151407592620627MARISCAL CACERESDRE \\nHUANCAVELICAUGEL TAYACAJA090706HUANCAVELICATAYACAJADANIEL \\nHERNANDEZJIRON JOSE OLAYA S/NURBANA
1692420150217281185541DANIEL HERNANDEZDRE \\nHUANCAVELICAUGEL TAYACAJA090701HUANCAVELICATAYACAJAPAMPASJIRON MANCO CAPAC 152URBANA
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 39 + } + ] + }, + { + "cell_type": "code", + "source": [ + "tabla4 = tables[3].df\n", + "tabla4.columns = tabla4.iloc[0]\n", + "tabla4 = tabla4[1:]\n", + "tabla4" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 257 + }, + "id": "pMw6XxCP2YoD", + "outputId": "6e8d719d-18ac-4047-ff22-e790a78bb951" + }, + "execution_count": 40, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0 # Año JEC Código \\nmodular Código \\nlocal Nombre de la IE \\\n", + "1 926 2015 0372805 185555 NUESTRA SEÑORA DE LOURDES \n", + "2 928 2015 0743302 187253 TUPAC AMARU II \n", + "3 929 2015 0697680 188728 JORGE BASADRE GROHMANN \n", + "\n", + "0 DRE UGEL Ubigeo Departamento Provincia \\\n", + "1 DRE \\nHUANCAVELICA UGEL TAYACAJA 090701 HUANCAVELICA TAYACAJA \n", + "2 DRE \\nHUANCAVELICA UGEL TAYACAJA 090706 HUANCAVELICA TAYACAJA \n", + "3 DRE \\nHUANCAVELICA UGEL TAYACAJA 090714 HUANCAVELICA TAYACAJA \n", + "\n", + "0 Distrito Dirección Área Geográfica \n", + "1 PAMPAS JIRON PROGRESO 551 URBANA \n", + "2 DANIEL \\nHERNANDEZ PASAJE TUPAC AMARU S/N RURAL \n", + "3 SALCABAMBA PLAZA PRINCIPAL RURAL " + ], + "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", + "
#Año JECCódigo \\nmodularCódigo \\nlocalNombre de la IEDREUGELUbigeoDepartamentoProvinciaDistritoDirecciónÁrea Geográfica
192620150372805185555NUESTRA SEÑORA DE LOURDESDRE \\nHUANCAVELICAUGEL TAYACAJA090701HUANCAVELICATAYACAJAPAMPASJIRON PROGRESO 551URBANA
292820150743302187253TUPAC AMARU IIDRE \\nHUANCAVELICAUGEL TAYACAJA090706HUANCAVELICATAYACAJADANIEL \\nHERNANDEZPASAJE TUPAC AMARU S/NRURAL
392920150697680188728JORGE BASADRE GROHMANNDRE \\nHUANCAVELICAUGEL TAYACAJA090714HUANCAVELICATAYACAJASALCABAMBAPLAZA PRINCIPALRURAL
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 40 + } + ] + }, + { + "cell_type": "code", + "source": [ + "tabla5 = tables[4].df\n", + "tabla5.columns = tabla5.iloc[0]\n", + "tabla5 = tabla5[1:]\n", + "tabla5" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 925 + }, + "id": "NnVrZJca2fRE", + "outputId": "44ddcf5c-cb5b-46e1-c967-d2ba068ce3f1" + }, + "execution_count": 41, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0 # Año JEC Código \\nmodular Código \\nlocal \\\n", + "1 822 2016 0600692 175882 \n", + "2 827 2016 1106707 176018 \n", + "3 839 2016 1104892 178017 \n", + "4 844 2016 0740472 178710 \n", + "5 853 2016 0275669 181232 \n", + "6 855 2016 0802272 181859 \n", + "7 859 2016 0770719 182694 \n", + "8 860 2016 1244664 182726 \n", + "9 863 2016 0802298 182180 \n", + "10 865 2016 1369214 531952 \n", + "11 866 2016 1059880 181864 \n", + "12 867 2016 0569251 182019 \n", + "13 872 2016 1058353 171803 \n", + "14 873 2016 0421289 173265 \n", + "15 875 2016 1106467 613349 \n", + "16 876 2016 0537803 173270 \n", + "\n", + "0 Nombre de la IE DRE \\\n", + "1 NUESTRA SEÑORA DE LA \\nCANDELARIA DRE \\nHUANCAVELICA \n", + "2 JOSE ANTONIO ENCINAS FRANCO DRE \\nHUANCAVELICA \n", + "3 JUAN VELASCO ALVARADO DRE \\nHUANCAVELICA \n", + "4 SEÑOR DE HUAYLLAY DRE \\nHUANCAVELICA \n", + "5 LOS LIBERTADORES DRE \\nHUANCAVELICA \n", + "6 LA ESMERALDA DRE \\nHUANCAVELICA \n", + "7 RICARDO PALMA DRE \\nHUANCAVELICA \n", + "8 RAUL JIMENEZ CHAVEZ DRE \\nHUANCAVELICA \n", + "9 JOSE SANTOS CHOCANO DRE \\nHUANCAVELICA \n", + "10 SEÑOR DE ATOCCASA DRE \\nHUANCAVELICA \n", + "11 AMAUTA DRE \\nHUANCAVELICA \n", + "12 INGENIO DRE \\nHUANCAVELICA \n", + "13 ISOLINA CLOTET DE FERNANDINI DRE \\nHUANCAVELICA \n", + "14 JOSE GALVEZ EGUSQUIZA DRE \\nHUANCAVELICA \n", + "15 LA UNION DRE \\nHUANCAVELICA \n", + "16 LEONCIO PRADO GUTIERREZ DRE \\nHUANCAVELICA \n", + "\n", + "0 UGEL Ubigeo Departamento Provincia \\\n", + "1 UGEL ACOBAMBA 090201 HUANCAVELICA ACOBAMBA \n", + "2 UGEL ACOBAMBA 090202 HUANCAVELICA ACOBAMBA \n", + "3 UGEL ANGARAES 090302 HUANCAVELICA ANGARAES \n", + "4 UGEL ANGARAES 090308 HUANCAVELICA ANGARAES \n", + "5 UGEL \\nCASTROVIRREYNA 090413 HUANCAVELICA CASTROVIRREYNA \n", + "6 UGEL CHURCAMPA 090502 HUANCAVELICA CHURCAMPA \n", + "7 UGEL CHURCAMPA 090507 HUANCAVELICA CHURCAMPA \n", + "8 UGEL CHURCAMPA 090507 HUANCAVELICA CHURCAMPA \n", + "9 UGEL CHURCAMPA 090504 HUANCAVELICA CHURCAMPA \n", + "10 UGEL CHURCAMPA 090501 HUANCAVELICA CHURCAMPA \n", + "11 UGEL CHURCAMPA 090502 HUANCAVELICA CHURCAMPA \n", + "12 UGEL CHURCAMPA 090503 HUANCAVELICA CHURCAMPA \n", + "13 UGEL \\nHUANCAVELICA 090101 HUANCAVELICA HUANCAVELICA \n", + "14 UGEL \\nHUANCAVELICA 090103 HUANCAVELICA HUANCAVELICA \n", + "15 UGEL \\nHUANCAVELICA 090119 HUANCAVELICA HUANCAVELICA \n", + "16 UGEL \\nHUANCAVELICA 090103 HUANCAVELICA HUANCAVELICA \n", + "\n", + "0 Distrito Dirección Área Geográfica \n", + "1 ACOBAMBA AVENIDA MANUEL \\nCANDAMO S/N URBANA \n", + "2 ANDABAMBA MAYUNMARCA S/N URBANA \n", + "3 ANCHONGA PARCO ALTO URBANA \n", + "4 HUAYLLAY \\nGRANDE PLAZA PRINCIPAL URBANA \n", + "5 TICRAPO CALLE SAN JOSE S/N URBANA \n", + "6 ANCO AVENIDA AYACUCHO S/N URBANA \n", + "7 PAUCARBAMBA CAMINO AL CEMENTERIO \\nS/N RURAL \n", + "8 PAUCARBAMBA CARRETERA COBRIZA-\\nHUANCAYO KM 40 URBANA \n", + "9 EL CARMEN JIRON JESUS SEDANO \\nBALDEON S/N RURAL \n", + "10 CHURCAMPA JIRON SANTOS CHOCANO \\nS/N URBANA \n", + "11 ANCO MANZANAYOCC S/N RURAL \n", + "12 CHINCHIHUASI PANAC S/N URBANA \n", + "13 HUANCAVELICA AVENIDA AUGUSTO B LEGUIA \\n335 URBANA \n", + "14 ACORIA BAYLON RURAL \n", + "15 HUANDO CARRETERA LLALLAS ALTA \\nS/N RURAL \n", + "16 ACORIA JIRON ANDRES AVELINO \\nCACERES S/N URBANA " + ], + "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", + "
#Año JECCódigo \\nmodularCódigo \\nlocalNombre de la IEDREUGELUbigeoDepartamentoProvinciaDistritoDirecciónÁrea Geográfica
182220160600692175882NUESTRA SEÑORA DE LA \\nCANDELARIADRE \\nHUANCAVELICAUGEL ACOBAMBA090201HUANCAVELICAACOBAMBAACOBAMBAAVENIDA MANUEL \\nCANDAMO S/NURBANA
282720161106707176018JOSE ANTONIO ENCINAS FRANCODRE \\nHUANCAVELICAUGEL ACOBAMBA090202HUANCAVELICAACOBAMBAANDABAMBAMAYUNMARCA S/NURBANA
383920161104892178017JUAN VELASCO ALVARADODRE \\nHUANCAVELICAUGEL ANGARAES090302HUANCAVELICAANGARAESANCHONGAPARCO ALTOURBANA
484420160740472178710SEÑOR DE HUAYLLAYDRE \\nHUANCAVELICAUGEL ANGARAES090308HUANCAVELICAANGARAESHUAYLLAY \\nGRANDEPLAZA PRINCIPALURBANA
585320160275669181232LOS LIBERTADORESDRE \\nHUANCAVELICAUGEL \\nCASTROVIRREYNA090413HUANCAVELICACASTROVIRREYNATICRAPOCALLE SAN JOSE S/NURBANA
685520160802272181859LA ESMERALDADRE \\nHUANCAVELICAUGEL CHURCAMPA090502HUANCAVELICACHURCAMPAANCOAVENIDA AYACUCHO S/NURBANA
785920160770719182694RICARDO PALMADRE \\nHUANCAVELICAUGEL CHURCAMPA090507HUANCAVELICACHURCAMPAPAUCARBAMBACAMINO AL CEMENTERIO \\nS/NRURAL
886020161244664182726RAUL JIMENEZ CHAVEZDRE \\nHUANCAVELICAUGEL CHURCAMPA090507HUANCAVELICACHURCAMPAPAUCARBAMBACARRETERA COBRIZA-\\nHUANCAYO KM 40URBANA
986320160802298182180JOSE SANTOS CHOCANODRE \\nHUANCAVELICAUGEL CHURCAMPA090504HUANCAVELICACHURCAMPAEL CARMENJIRON JESUS SEDANO \\nBALDEON S/NRURAL
1086520161369214531952SEÑOR DE ATOCCASADRE \\nHUANCAVELICAUGEL CHURCAMPA090501HUANCAVELICACHURCAMPACHURCAMPAJIRON SANTOS CHOCANO \\nS/NURBANA
1186620161059880181864AMAUTADRE \\nHUANCAVELICAUGEL CHURCAMPA090502HUANCAVELICACHURCAMPAANCOMANZANAYOCC S/NRURAL
1286720160569251182019INGENIODRE \\nHUANCAVELICAUGEL CHURCAMPA090503HUANCAVELICACHURCAMPACHINCHIHUASIPANAC S/NURBANA
1387220161058353171803ISOLINA CLOTET DE FERNANDINIDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090101HUANCAVELICAHUANCAVELICAHUANCAVELICAAVENIDA AUGUSTO B LEGUIA \\n335URBANA
1487320160421289173265JOSE GALVEZ EGUSQUIZADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090103HUANCAVELICAHUANCAVELICAACORIABAYLONRURAL
1587520161106467613349LA UNIONDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090119HUANCAVELICAHUANCAVELICAHUANDOCARRETERA LLALLAS ALTA \\nS/NRURAL
1687620160537803173270LEONCIO PRADO GUTIERREZDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090103HUANCAVELICAHUANCAVELICAACORIAJIRON ANDRES AVELINO \\nCACERES S/NURBANA
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 41 + } + ] + }, + { + "cell_type": "code", + "source": [ + "tabla6 = tables[5].df\n", + "tabla6.columns = tabla6.iloc[0]\n", + "tabla6 = tabla6[1:]\n", + "tabla6" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 793 + }, + "id": "XhF2vEG_2kiW", + "outputId": "a6976130-218b-45c0-c05d-ec340d840c93" + }, + "execution_count": 42, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0 # Año JEC Código \\nmodular Código \\nlocal Nombre de la IE \\\n", + "1 880 2016 1106145 175617 ANDRES BELLO \n", + "2 881 2016 1400092 613066 CCOLLPACCASA \n", + "3 884 2016 1058122 175599 MARIANO MELGAR VALDIVIESO \n", + "4 885 2016 1059906 175641 JAVIER HERAUD PEREZ \n", + "5 887 2016 0535013 174222 DANIEL ALCIDES CARRION \n", + "6 888 2016 0421339 174364 SAN MIGUEL \n", + "7 889 2016 0687855 173350 7 DE JUNIO \n", + "8 899 2016 0275636 183306 SAN JUAN BAUTISTA \n", + "9 900 2016 0511071 184061 JOSE CARLOS MARIATEGUI \n", + "10 901 2016 1105931 184481 MANUEL GONZALES PRADA \n", + "11 905 2016 0637520 189676 SAN JOSE \n", + "12 916 2016 1407436 620420 ALEJANDRO TOLEDO MANRIQUE \n", + "13 925 2016 1059658 188238 SAN JOSE \n", + "14 927 2016 1416437 252192 ALFONSO UGARTE Y VERNAL \n", + "\n", + "0 DRE UGEL Ubigeo Departamento \\\n", + "1 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090117 HUANCAVELICA \n", + "2 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090117 HUANCAVELICA \n", + "3 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090117 HUANCAVELICA \n", + "4 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090117 HUANCAVELICA \n", + "5 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090111 HUANCAVELICA \n", + "6 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090112 HUANCAVELICA \n", + "7 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090103 HUANCAVELICA \n", + "8 DRE \\nHUANCAVELICA UGEL HUAYTARA 090601 HUANCAVELICA \n", + "9 DRE \\nHUANCAVELICA UGEL HUAYTARA 090607 HUANCAVELICA \n", + "10 DRE \\nHUANCAVELICA UGEL HUAYTARA 090610 HUANCAVELICA \n", + "11 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090718 HUANCAVELICA \n", + "12 DRE \\nHUANCAVELICA UGEL TAYACAJA 090713 HUANCAVELICA \n", + "13 DRE \\nHUANCAVELICA UGEL TAYACAJA 090710 HUANCAVELICA \n", + "14 DRE \\nHUANCAVELICA UGEL TAYACAJA 090701 HUANCAVELICA \n", + "\n", + "0 Provincia Distrito Dirección \\\n", + "1 HUANCAVELICA YAULI PERU S/N \n", + "2 HUANCAVELICA YAULI PLAZA PRINCIPAL \n", + "3 HUANCAVELICA YAULI PLAZA PRINCIPAL S/N \n", + "4 HUANCAVELICA YAULI PLAZA PRINCIPAL S/N \n", + "5 HUANCAVELICA MARISCAL \\nCACERES QUINTA VILLENA S/N \n", + "6 HUANCAVELICA MOYA UMAS S/N \n", + "7 HUANCAVELICA ACORIA VISTA ALEGRE S/N \n", + "8 HUAYTARA HUAYTARA AVENIDA EL SOL 230 \n", + "9 HUAYTARA PILPICHACA AVENIDA LOS LIBERTADORES \\nS/N \n", + "10 HUAYTARA SAN ANTONIO DE \\nCUSICANCHA PARQUE PLAZA PRINCIPAL \\nS/N \n", + "11 TAYACAJA TINTAY PUNCU PLAZA PRINCIPAL \n", + "12 TAYACAJA QUISHUAR AVENIDA MARISCAL CACERES \\nS/N \n", + "13 TAYACAJA ÑAHUIMPUQUIO JIRON MARISCAL CASTILLA \\nS/N \n", + "14 TAYACAJA PAMPAS JIRON SAN CRISTOBAL S/N \n", + "\n", + "0 Área Geográfica \n", + "1 URBANA \n", + "2 URBANA \n", + "3 URBANA \n", + "4 URBANA \n", + "5 URBANA \n", + "6 URBANA \n", + "7 URBANA \n", + "8 URBANA \n", + "9 URBANA \n", + "10 RURAL \n", + "11 URBANA \n", + "12 URBANA \n", + "13 URBANA \n", + "14 URBANA " + ], + "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", + "
#Año JECCódigo \\nmodularCódigo \\nlocalNombre de la IEDREUGELUbigeoDepartamentoProvinciaDistritoDirecciónÁrea Geográfica
188020161106145175617ANDRES BELLODRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090117HUANCAVELICAHUANCAVELICAYAULIPERU S/NURBANA
288120161400092613066CCOLLPACCASADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090117HUANCAVELICAHUANCAVELICAYAULIPLAZA PRINCIPALURBANA
388420161058122175599MARIANO MELGAR VALDIVIESODRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090117HUANCAVELICAHUANCAVELICAYAULIPLAZA PRINCIPAL S/NURBANA
488520161059906175641JAVIER HERAUD PEREZDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090117HUANCAVELICAHUANCAVELICAYAULIPLAZA PRINCIPAL S/NURBANA
588720160535013174222DANIEL ALCIDES CARRIONDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090111HUANCAVELICAHUANCAVELICAMARISCAL \\nCACERESQUINTA VILLENA S/NURBANA
688820160421339174364SAN MIGUELDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090112HUANCAVELICAHUANCAVELICAMOYAUMAS S/NURBANA
7889201606878551733507 DE JUNIODRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090103HUANCAVELICAHUANCAVELICAACORIAVISTA ALEGRE S/NURBANA
889920160275636183306SAN JUAN BAUTISTADRE \\nHUANCAVELICAUGEL HUAYTARA090601HUANCAVELICAHUAYTARAHUAYTARAAVENIDA EL SOL 230URBANA
990020160511071184061JOSE CARLOS MARIATEGUIDRE \\nHUANCAVELICAUGEL HUAYTARA090607HUANCAVELICAHUAYTARAPILPICHACAAVENIDA LOS LIBERTADORES \\nS/NURBANA
1090120161105931184481MANUEL GONZALES PRADADRE \\nHUANCAVELICAUGEL HUAYTARA090610HUANCAVELICAHUAYTARASAN ANTONIO DE \\nCUSICANCHAPARQUE PLAZA PRINCIPAL \\nS/NRURAL
1190520160637520189676SAN JOSEDRE \\nHUANCAVELICAUGEL SURCUBAMBA090718HUANCAVELICATAYACAJATINTAY PUNCUPLAZA PRINCIPALURBANA
1291620161407436620420ALEJANDRO TOLEDO MANRIQUEDRE \\nHUANCAVELICAUGEL TAYACAJA090713HUANCAVELICATAYACAJAQUISHUARAVENIDA MARISCAL CACERES \\nS/NURBANA
1392520161059658188238SAN JOSEDRE \\nHUANCAVELICAUGEL TAYACAJA090710HUANCAVELICATAYACAJAÑAHUIMPUQUIOJIRON MARISCAL CASTILLA \\nS/NURBANA
1492720161416437252192ALFONSO UGARTE Y VERNALDRE \\nHUANCAVELICAUGEL TAYACAJA090701HUANCAVELICATAYACAJAPAMPASJIRON SAN CRISTOBAL S/NURBANA
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 42 + } + ] + }, + { + "cell_type": "code", + "source": [ + "tabla7 = tables[6].df\n", + "tabla7.columns = tabla7.iloc[0]\n", + "tabla7 = tabla7[1:]\n", + "tabla7" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 925 + }, + "id": "Bju-h68k2qKl", + "outputId": "2be5b565-c6c7-4d81-dc81-21b9d72690a6" + }, + "execution_count": 43, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0 # Año JEC Código \\nmodular Código \\nlocal \\\n", + "1 831 2017 1060078 175896 \n", + "2 832 2017 1402759 615739 \n", + "3 833 2017 0537704 176848 \n", + "4 846 2017 0571521 177942 \n", + "5 847 2017 0637496 178588 \n", + "6 848 2017 1403518 616545 \n", + "7 849 2017 1187871 178687 \n", + "8 850 2017 0687863 177678 \n", + "9 851 2017 1403526 616550 \n", + "10 852 2017 1380286 540273 \n", + "11 854 2017 0510073 179941 \n", + "12 868 2017 0499442 182378 \n", + "13 869 2017 1104611 183151 \n", + "14 890 2017 0600338 173289 \n", + "15 891 2017 0746974 173331 \n", + "16 892 2017 1106384 173661 \n", + "\n", + "0 Nombre de la IE DRE \\\n", + "1 SERGIO QUIJADA JARA DRE \\nHUANCAVELICA \n", + "2 FEDERICO VILLARREAL DRE \\nHUANCAVELICA \n", + "3 JOSE MARIA ARGUEDAS DRE \\nHUANCAVELICA \n", + "4 VICTOR RAUL HAYA DE LA TORRE DRE \\nHUANCAVELICA \n", + "5 MARIANO MELGAR DRE \\nHUANCAVELICA \n", + "6 FRANCISCO BOLOGNESI CERVANTES DRE \\nHUANCAVELICA \n", + "7 SAN ANTONIO DE PADUA DRE \\nHUANCAVELICA \n", + "8 TUPAC AMARU DRE \\nHUANCAVELICA \n", + "9 LOS LIBERTADORES DRE \\nHUANCAVELICA \n", + "10 ALBERTO BENAVIDES DE LA \\nQUINTANA DRE \\nHUANCAVELICA \n", + "11 CESAR ABRAHAM VALLEJO \\nMENDOZA DRE \\nHUANCAVELICA \n", + "12 CESAR VALLEJO DRE \\nHUANCAVELICA \n", + "13 DANIEL ALCIDES CARRION DRE \\nHUANCAVELICA \n", + "14 RICARDO PALMA DRE \\nHUANCAVELICA \n", + "15 TECNICO AGROPECUARIO SILVA DRE \\nHUANCAVELICA \n", + "16 JOSE CARLOS MARIATEGUI DRE \\nHUANCAVELICA \n", + "\n", + "0 UGEL Ubigeo Departamento Provincia \\\n", + "1 UGEL ACOBAMBA 090201 HUANCAVELICA ACOBAMBA \n", + "2 UGEL ACOBAMBA 090203 HUANCAVELICA ACOBAMBA \n", + "3 UGEL ACOBAMBA 090207 HUANCAVELICA ACOBAMBA \n", + "4 UGEL ANGARAES 090302 HUANCAVELICA ANGARAES \n", + "5 UGEL ANGARAES 090306 HUANCAVELICA ANGARAES \n", + "6 UGEL ANGARAES 090306 HUANCAVELICA ANGARAES \n", + "7 UGEL ANGARAES 090307 HUANCAVELICA ANGARAES \n", + "8 UGEL ANGARAES 090301 HUANCAVELICA ANGARAES \n", + "9 UGEL ANGARAES 090301 HUANCAVELICA ANGARAES \n", + "10 UGEL ANGARAES 090301 HUANCAVELICA ANGARAES \n", + "11 UGEL \\nCASTROVIRREYNA 090403 HUANCAVELICA CASTROVIRREYNA \n", + "12 UGEL CHURCAMPA 090506 HUANCAVELICA CHURCAMPA \n", + "13 UGEL CHURCAMPA 090510 HUANCAVELICA CHURCAMPA \n", + "14 UGEL \\nHUANCAVELICA 090103 HUANCAVELICA HUANCAVELICA \n", + "15 UGEL \\nHUANCAVELICA 090103 HUANCAVELICA HUANCAVELICA \n", + "16 UGEL \\nHUANCAVELICA 090105 HUANCAVELICA HUANCAVELICA \n", + "\n", + "0 Distrito Dirección Área Geográfica \n", + "1 ACOBAMBA PLAZA PRINCIPAL S/N RURAL \n", + "2 ANTA PLAZA PRINCIPAL S/N RURAL \n", + "3 POMACOCHA PLAZA PRINCIPAL S/N URBANA \n", + "4 ANCHONGA TUCO RURAL \n", + "5 CONGALLA PLAZA PRINCIPAL URBANA \n", + "6 CONGALLA PLAZA PRINCIPAL RURAL \n", + "7 HUANCA-HUANCA HUANCA HUANCA URBANA \n", + "8 LIRCAY PLAZA PRINCIPAL RURAL \n", + "9 LIRCAY CCOCHAPATA RURAL \n", + "10 LIRCAY PLAZA PRINCIPAL RURAL \n", + "11 AURAHUA AVENIDA MANCHEGO \\nMUÑOZ 485 URBANA \n", + "12 LOCROJA JIRON OLIVAS ESCUDERO S/N URBANA \n", + "13 PACHAMARCA WARI PATA S/N RURAL \n", + "14 ACORIA CHIRAUPAMPA S/N URBANA \n", + "15 ACORIA PLAZA PRINCIPAL S/N RURAL \n", + "16 CUENCA JIRON CAJAMARCA S/N RURAL " + ], + "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", + "
#Año JECCódigo \\nmodularCódigo \\nlocalNombre de la IEDREUGELUbigeoDepartamentoProvinciaDistritoDirecciónÁrea Geográfica
183120171060078175896SERGIO QUIJADA JARADRE \\nHUANCAVELICAUGEL ACOBAMBA090201HUANCAVELICAACOBAMBAACOBAMBAPLAZA PRINCIPAL S/NRURAL
283220171402759615739FEDERICO VILLARREALDRE \\nHUANCAVELICAUGEL ACOBAMBA090203HUANCAVELICAACOBAMBAANTAPLAZA PRINCIPAL S/NRURAL
383320170537704176848JOSE MARIA ARGUEDASDRE \\nHUANCAVELICAUGEL ACOBAMBA090207HUANCAVELICAACOBAMBAPOMACOCHAPLAZA PRINCIPAL S/NURBANA
484620170571521177942VICTOR RAUL HAYA DE LA TORREDRE \\nHUANCAVELICAUGEL ANGARAES090302HUANCAVELICAANGARAESANCHONGATUCORURAL
584720170637496178588MARIANO MELGARDRE \\nHUANCAVELICAUGEL ANGARAES090306HUANCAVELICAANGARAESCONGALLAPLAZA PRINCIPALURBANA
684820171403518616545FRANCISCO BOLOGNESI CERVANTESDRE \\nHUANCAVELICAUGEL ANGARAES090306HUANCAVELICAANGARAESCONGALLAPLAZA PRINCIPALRURAL
784920171187871178687SAN ANTONIO DE PADUADRE \\nHUANCAVELICAUGEL ANGARAES090307HUANCAVELICAANGARAESHUANCA-HUANCAHUANCA HUANCAURBANA
885020170687863177678TUPAC AMARUDRE \\nHUANCAVELICAUGEL ANGARAES090301HUANCAVELICAANGARAESLIRCAYPLAZA PRINCIPALRURAL
985120171403526616550LOS LIBERTADORESDRE \\nHUANCAVELICAUGEL ANGARAES090301HUANCAVELICAANGARAESLIRCAYCCOCHAPATARURAL
1085220171380286540273ALBERTO BENAVIDES DE LA \\nQUINTANADRE \\nHUANCAVELICAUGEL ANGARAES090301HUANCAVELICAANGARAESLIRCAYPLAZA PRINCIPALRURAL
1185420170510073179941CESAR ABRAHAM VALLEJO \\nMENDOZADRE \\nHUANCAVELICAUGEL \\nCASTROVIRREYNA090403HUANCAVELICACASTROVIRREYNAAURAHUAAVENIDA MANCHEGO \\nMUÑOZ 485URBANA
1286820170499442182378CESAR VALLEJODRE \\nHUANCAVELICAUGEL CHURCAMPA090506HUANCAVELICACHURCAMPALOCROJAJIRON OLIVAS ESCUDERO S/NURBANA
1386920171104611183151DANIEL ALCIDES CARRIONDRE \\nHUANCAVELICAUGEL CHURCAMPA090510HUANCAVELICACHURCAMPAPACHAMARCAWARI PATA S/NRURAL
1489020170600338173289RICARDO PALMADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090103HUANCAVELICAHUANCAVELICAACORIACHIRAUPAMPA S/NURBANA
1589120170746974173331TECNICO AGROPECUARIO SILVADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090103HUANCAVELICAHUANCAVELICAACORIAPLAZA PRINCIPAL S/NRURAL
1689220171106384173661JOSE CARLOS MARIATEGUIDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090105HUANCAVELICAHUANCAVELICACUENCAJIRON CAJAMARCA S/NRURAL
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 43 + } + ] + }, + { + "cell_type": "code", + "source": [ + "tabla8 = tables[7].df\n", + "tabla8.columns = tabla8.iloc[0]\n", + "tabla8 = tabla8[1:]\n", + "tabla8" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 764 + }, + "id": "p1va6JGT22Wu", + "outputId": "55a2a9a2-1902-4f5b-a872-3da5e11dc91b" + }, + "execution_count": 44, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0 # Año JEC Código \\nmodular Código \\nlocal Nombre de la IE \\\n", + "1 893 2017 0637132 171737 CESAR VALLEJO MENDOZA \n", + "2 894 2017 0421396 171799 RAMON CASTILLA Y MARQUESADO \n", + "3 895 2017 0697631 187818 FRANCISCO BOLOGNESI \n", + "4 896 2017 1059831 174707 JOSE MARIA ARGUEDAS \n", + "5 897 2017 1400001 534856 JORGE BASADRE GROHMANN \n", + "6 898 2017 1106269 175622 LOS ANGELES DE CCARAHUASA \n", + "7 906 2017 0580449 187489 SEBASTIAN LORENTE IBAÑEZ \n", + "8 907 2017 1525419 615367 NAVIO COMUN GAVILAN \n", + "9 908 2017 0580050 189011 JOSE SANTOS CHOCANO \n", + "10 909 2017 0580043 189006 DANIEL ALCIDES CARRION \n", + "11 910 2017 1059708 621882 JUAN VELAZCO ALVARADO \n", + "12 911 2017 0687814 189488 PNP (R) NAVIO COMUN GAVILAN \n", + "13 912 2017 0687806 189681 SIMON BOLIVAR \n", + "14 930 2017 1060052 186055 JOSE ANTONIO ENCINAS \n", + "15 931 2017 0687871 187267 MARISCAL CACERES \n", + "16 932 2017 1379593 185517 ABRAHAM VALDELOMAR PINTO \n", + "\n", + "0 DRE UGEL Ubigeo Departamento \\\n", + "1 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090101 HUANCAVELICA \n", + "2 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090101 HUANCAVELICA \n", + "3 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090119 HUANCAVELICA \n", + "4 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090114 HUANCAVELICA \n", + "5 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090117 HUANCAVELICA \n", + "6 DRE \\nHUANCAVELICA UGEL \\nHUANCAVELICA 090117 HUANCAVELICA \n", + "7 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090707 HUANCAVELICA \n", + "8 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090707 HUANCAVELICA \n", + "9 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090715 HUANCAVELICA \n", + "10 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090715 HUANCAVELICA \n", + "11 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090716 HUANCAVELICA \n", + "12 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090717 HUANCAVELICA \n", + "13 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090718 HUANCAVELICA \n", + "14 DRE \\nHUANCAVELICA UGEL TAYACAJA 090703 HUANCAVELICA \n", + "15 DRE \\nHUANCAVELICA UGEL TAYACAJA 090723 HUANCAVELICA \n", + "16 DRE \\nHUANCAVELICA UGEL TAYACAJA 090701 HUANCAVELICA \n", + "\n", + "0 Provincia Distrito \\\n", + "1 HUANCAVELICA HUANCAVELICA \n", + "2 HUANCAVELICA HUANCAVELICA \n", + "3 HUANCAVELICA HUANDO \n", + "4 HUANCAVELICA PALCA \n", + "5 HUANCAVELICA YAULI \n", + "6 HUANCAVELICA YAULI \n", + "7 TAYACAJA HUACHOCOLPA \n", + "8 TAYACAJA HUACHOCOLPA \n", + "9 TAYACAJA SALCAHUASI \n", + "10 TAYACAJA SALCAHUASI \n", + "11 TAYACAJA SAN MARCOS DE \\nROCCHAC \n", + "12 TAYACAJA SURCUBAMBA \n", + "13 TAYACAJA TINTAY PUNCU \n", + "14 TAYACAJA ACRAQUIA \n", + "15 TAYACAJA DANIEL \\nHERNANDEZ \n", + "16 TAYACAJA PAMPAS \n", + "\n", + "0 Dirección Área Geográfica \n", + "1 PLAZA PRINCIPAL S/N URBANA \n", + "2 PROLONGACION CELESTINO \\nMANCHEGO 1550 URBANA \n", + "3 JIRON SAN FRANCISCO S/N \\nS/N URBANA \n", + "4 AVENIDA HUANCAVELICA-\\nHUANCAYO KM 42 RURAL \n", + "5 PLAZA PRINCIPAL S/N RURAL \n", + "6 PLAZA PRINCIPAL S/N RURAL \n", + "7 AVENIDA 13 DE JUNIO S/N RURAL \n", + "8 CARRETERA TAURIBAMBA URBANA \n", + "9 CALLE PRINCIPAL S/N RURAL \n", + "10 CALLE PRINCIPAL S/N URBANA \n", + "11 PLAZA PRINCIPAL S/N RURAL \n", + "12 PLAZA PRINCIPAL RURAL \n", + "13 PLAZA PRINCIPAL URBANA \n", + "14 PLAZA PRINCIPAL S/N RURAL \n", + "15 BARRIO MOYOBAMBA URBANA \n", + "16 PLAZA PRINCIPAL RURAL " + ], + "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", + "
#Año JECCódigo \\nmodularCódigo \\nlocalNombre de la IEDREUGELUbigeoDepartamentoProvinciaDistritoDirecciónÁrea Geográfica
189320170637132171737CESAR VALLEJO MENDOZADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090101HUANCAVELICAHUANCAVELICAHUANCAVELICAPLAZA PRINCIPAL S/NURBANA
289420170421396171799RAMON CASTILLA Y MARQUESADODRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090101HUANCAVELICAHUANCAVELICAHUANCAVELICAPROLONGACION CELESTINO \\nMANCHEGO 1550URBANA
389520170697631187818FRANCISCO BOLOGNESIDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090119HUANCAVELICAHUANCAVELICAHUANDOJIRON SAN FRANCISCO S/N \\nS/NURBANA
489620171059831174707JOSE MARIA ARGUEDASDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090114HUANCAVELICAHUANCAVELICAPALCAAVENIDA HUANCAVELICA-\\nHUANCAYO KM 42RURAL
589720171400001534856JORGE BASADRE GROHMANNDRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090117HUANCAVELICAHUANCAVELICAYAULIPLAZA PRINCIPAL S/NRURAL
689820171106269175622LOS ANGELES DE CCARAHUASADRE \\nHUANCAVELICAUGEL \\nHUANCAVELICA090117HUANCAVELICAHUANCAVELICAYAULIPLAZA PRINCIPAL S/NRURAL
790620170580449187489SEBASTIAN LORENTE IBAÑEZDRE \\nHUANCAVELICAUGEL SURCUBAMBA090707HUANCAVELICATAYACAJAHUACHOCOLPAAVENIDA 13 DE JUNIO S/NRURAL
890720171525419615367NAVIO COMUN GAVILANDRE \\nHUANCAVELICAUGEL SURCUBAMBA090707HUANCAVELICATAYACAJAHUACHOCOLPACARRETERA TAURIBAMBAURBANA
990820170580050189011JOSE SANTOS CHOCANODRE \\nHUANCAVELICAUGEL SURCUBAMBA090715HUANCAVELICATAYACAJASALCAHUASICALLE PRINCIPAL S/NRURAL
1090920170580043189006DANIEL ALCIDES CARRIONDRE \\nHUANCAVELICAUGEL SURCUBAMBA090715HUANCAVELICATAYACAJASALCAHUASICALLE PRINCIPAL S/NURBANA
1191020171059708621882JUAN VELAZCO ALVARADODRE \\nHUANCAVELICAUGEL SURCUBAMBA090716HUANCAVELICATAYACAJASAN MARCOS DE \\nROCCHACPLAZA PRINCIPAL S/NRURAL
1291120170687814189488PNP (R) NAVIO COMUN GAVILANDRE \\nHUANCAVELICAUGEL SURCUBAMBA090717HUANCAVELICATAYACAJASURCUBAMBAPLAZA PRINCIPALRURAL
1391220170687806189681SIMON BOLIVARDRE \\nHUANCAVELICAUGEL SURCUBAMBA090718HUANCAVELICATAYACAJATINTAY PUNCUPLAZA PRINCIPALURBANA
1493020171060052186055JOSE ANTONIO ENCINASDRE \\nHUANCAVELICAUGEL TAYACAJA090703HUANCAVELICATAYACAJAACRAQUIAPLAZA PRINCIPAL S/NRURAL
1593120170687871187267MARISCAL CACERESDRE \\nHUANCAVELICAUGEL TAYACAJA090723HUANCAVELICATAYACAJADANIEL \\nHERNANDEZBARRIO MOYOBAMBAURBANA
1693220171379593185517ABRAHAM VALDELOMAR PINTODRE \\nHUANCAVELICAUGEL TAYACAJA090701HUANCAVELICATAYACAJAPAMPASPLAZA PRINCIPALRURAL
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 44 + } + ] + }, + { + "cell_type": "code", + "source": [ + "# Unimos las tablas y guardamos dichas tablas fusionadas como 'tablafinal'\n", + "tablafinal = pd.concat([tabla1, tabla2, tabla3, tabla4, tabla5, tabla6, tabla7, tabla8], axis=0)\n", + "tablafinal" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 659 + }, + "id": "XDJbmQRp3UoD", + "outputId": "dc49865d-a7d1-4337-d012-706a44a2265f" + }, + "execution_count": 50, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "0 # Año JEC Código \\nmodular Código \\nlocal Nombre de la IE \\\n", + "1 1 2015 0579979 176184 CIRO ALEGRIA BAZAN \n", + "2 2 2015 0421271 175863 SAN FRANCISCO DE ASIS \n", + "3 823 2015 0579987 176834 JORGE CHAVEZ \n", + "4 824 2015 0421321 176626 NUESTRA SEÑORA DE COCHARCAS \n", + "5 825 2015 1059203 177013 DANIEL ALCIDES CARRION \n", + ".. ... ... ... ... ... \n", + "12 911 2017 0687814 189488 PNP (R) NAVIO COMUN GAVILAN \n", + "13 912 2017 0687806 189681 SIMON BOLIVAR \n", + "14 930 2017 1060052 186055 JOSE ANTONIO ENCINAS \n", + "15 931 2017 0687871 187267 MARISCAL CACERES \n", + "16 932 2017 1379593 185517 ABRAHAM VALDELOMAR PINTO \n", + "\n", + "0 DRE UGEL Ubigeo Departamento Provincia \\\n", + "1 DRE \\nHUANCAVELICA UGEL ACOBAMBA 090203 HUANCAVELICA ACOBAMBA \n", + "2 DRE \\nHUANCAVELICA UGEL ACOBAMBA 090201 HUANCAVELICA ACOBAMBA \n", + "3 DRE \\nHUANCAVELICA UGEL ACOBAMBA 090207 HUANCAVELICA ACOBAMBA \n", + "4 DRE \\nHUANCAVELICA UGEL ACOBAMBA 090206 HUANCAVELICA ACOBAMBA \n", + "5 DRE \\nHUANCAVELICA UGEL ACOBAMBA 090208 HUANCAVELICA ACOBAMBA \n", + ".. ... ... ... ... ... \n", + "12 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090717 HUANCAVELICA TAYACAJA \n", + "13 DRE \\nHUANCAVELICA UGEL SURCUBAMBA 090718 HUANCAVELICA TAYACAJA \n", + "14 DRE \\nHUANCAVELICA UGEL TAYACAJA 090703 HUANCAVELICA TAYACAJA \n", + "15 DRE \\nHUANCAVELICA UGEL TAYACAJA 090723 HUANCAVELICA TAYACAJA \n", + "16 DRE \\nHUANCAVELICA UGEL TAYACAJA 090701 HUANCAVELICA TAYACAJA \n", + "\n", + "0 Distrito Dirección Área Geográfica \n", + "1 ANTA AVENIDA ELVIRO CALDERON \\nS/N URBANA \n", + "2 ACOBAMBA AVENIDA MANUEL \\nCANDAMO S/N URBANA \n", + "3 POMACOCHA AVENIDA PERU S/N URBANA \n", + "4 PAUCARA CALLE CUZCO S/N URBANA \n", + "5 ROSARIO CALLE LIMA S/N URBANA \n", + ".. ... ... ... \n", + "12 SURCUBAMBA PLAZA PRINCIPAL RURAL \n", + "13 TINTAY PUNCU PLAZA PRINCIPAL URBANA \n", + "14 ACRAQUIA PLAZA PRINCIPAL S/N RURAL \n", + "15 DANIEL \\nHERNANDEZ BARRIO MOYOBAMBA URBANA \n", + "16 PAMPAS PLAZA PRINCIPAL RURAL \n", + "\n", + "[113 rows x 13 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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
#Año JECCódigo \\nmodularCódigo \\nlocalNombre de la IEDREUGELUbigeoDepartamentoProvinciaDistritoDirecciónÁrea Geográfica
1120150579979176184CIRO ALEGRIA BAZANDRE \\nHUANCAVELICAUGEL ACOBAMBA090203HUANCAVELICAACOBAMBAANTAAVENIDA ELVIRO CALDERON \\nS/NURBANA
2220150421271175863SAN FRANCISCO DE ASISDRE \\nHUANCAVELICAUGEL ACOBAMBA090201HUANCAVELICAACOBAMBAACOBAMBAAVENIDA MANUEL \\nCANDAMO S/NURBANA
382320150579987176834JORGE CHAVEZDRE \\nHUANCAVELICAUGEL ACOBAMBA090207HUANCAVELICAACOBAMBAPOMACOCHAAVENIDA PERU S/NURBANA
482420150421321176626NUESTRA SEÑORA DE COCHARCASDRE \\nHUANCAVELICAUGEL ACOBAMBA090206HUANCAVELICAACOBAMBAPAUCARACALLE CUZCO S/NURBANA
582520151059203177013DANIEL ALCIDES CARRIONDRE \\nHUANCAVELICAUGEL ACOBAMBA090208HUANCAVELICAACOBAMBAROSARIOCALLE LIMA S/NURBANA
..........................................
1291120170687814189488PNP (R) NAVIO COMUN GAVILANDRE \\nHUANCAVELICAUGEL SURCUBAMBA090717HUANCAVELICATAYACAJASURCUBAMBAPLAZA PRINCIPALRURAL
1391220170687806189681SIMON BOLIVARDRE \\nHUANCAVELICAUGEL SURCUBAMBA090718HUANCAVELICATAYACAJATINTAY PUNCUPLAZA PRINCIPALURBANA
1493020171060052186055JOSE ANTONIO ENCINASDRE \\nHUANCAVELICAUGEL TAYACAJA090703HUANCAVELICATAYACAJAACRAQUIAPLAZA PRINCIPAL S/NRURAL
1593120170687871187267MARISCAL CACERESDRE \\nHUANCAVELICAUGEL TAYACAJA090723HUANCAVELICATAYACAJADANIEL \\nHERNANDEZBARRIO MOYOBAMBAURBANA
1693220171379593185517ABRAHAM VALDELOMAR PINTODRE \\nHUANCAVELICAUGEL TAYACAJA090701HUANCAVELICATAYACAJAPAMPASPLAZA PRINCIPALRURAL
\n", + "

113 rows × 13 columns

\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 50 + } + ] + }, + { + "cell_type": "code", + "source": [ + "# Exportamos la tabla en formato .dta\n", + "tablafinal.to_stata(' jec_data_Grupo8.dta') " + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "m-rfLd2s4Slo", + "outputId": "105fa092-8ca0-48da-d9ab-946bd39389d4" + }, + "execution_count": 51, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":1: InvalidColumnName: \n", + "Not all pandas column names were valid Stata variable names.\n", + "The following replacements have been made:\n", + "\n", + " # -> _\n", + " Año JEC -> A_o_JEC\n", + " Código \n", + "modular -> C_digo__modular\n", + " Código \n", + "local -> C_digo__local\n", + " Nombre de la IE -> Nombre_de_la_IE\n", + " Dirección -> Direcci_n\n", + " Área Geográfica -> _rea_Geogr_fica\n", + "\n", + "If this is not what you expect, please make sure you have Stata-compliant\n", + "column names in your DataFrame (strings only, max 32 characters, only\n", + "alphanumerics and underscores, no Stata reserved words)\n", + "\n", + " tablafinal.to_stata(' jec_data_Grupo8.dta')\n" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Labs/tarea6/_jec_data_Grupo8.dta b/Labs/tarea6/_jec_data_Grupo8.dta new file mode 100644 index 0000000000000000000000000000000000000000..75275bd5c12f7503a9b280f00845d66f20a03b13 GIT binary patch literal 25954 zcmeHPOOxB!b*5}*oOGNSrz)$guu&>r$ie%O-E9!VMh7Hlkm$Iz>5?_dR9DSNi9Al_ zZ|Vo7D&IK=0CDhWf!&tkg}P=$fV=?ichCEA@&0GeR$s6FYxN2K9M`)3(_726UC*-p zfA##;|Ni_Jzx?W-{{A1n`qkI}_?xfp-+uSze;#`7-9tapZ|3gZ-F24E4@>X9yZ`>( z-QADxzWdV;uilRbwgY~6_xjZj@~cy*U&<00#6;>-T9dXp9X z^U-nrhx_l}yc>Oe`eOa&KVQB7>D7;K-u^T_Z2$hozCvwzj<}HdGqf3_jmts|9bX8rwjDabI1Ly{k{I~!L#SyA0PaE z^y72?+zX;}F9^@Qz>Ckj;<(ab5yQ$m3 zrL-=tYO_ntO;+ToAs5mzX?bb3m!`SGPHflq`lIv!vpcp!2hYGwclp{_S#d+tNlmfN zs&Z#t9R5X5r>-u|&io9QyA2lKb==5tq96{vgV|Z%R+wadNK0#-S>})*29JVcxfqM{ z02U3s_mCFL*6eDm(M4)@YqKq_A(WM1`8h6)U9Y1{9Dy#e=U`*I6H;ZcK|BbsUGvd^k|44^k$u>1nw#IDa+Ko`#iUBb`}u@Hx2WvoN?p~MFW z!;h;{)2GgIEa3xKOr4r)jAXR}Qx$k{{SvG(qD2o%Lzll|ECFG0>>vSSJ5gji-rDSP zV*Mh`*VzHAT2*+EO z4T;;PGT_u~o9`xn7W1Zdi`xQS!2{%A(wDObSu8E{gmztBz(}R#;RmKSGxa#v*zw1|%O? zV#f;{Qe9iHDt@2;o56y|SEi-i3bxX-wY;bSDQn0S8d5LRNhfwgWr1BhUp}Er91k zA_giK`HtMWG{gA`g&ZxWi{mQ$qQD-qG%bp$1-phvxwDG$U|qqd97+6XHbR$g2#e2p zjCC^Eedqwu$s1F^9fO-(RoN~}ud?9-7h|y>zyb&MinP^fYVFY;dKBw;Wm2=Rcj>$y z61x1Fu{g|Q|_WA-M?u_W_!xvq=UKs3`4nt^?3A&x(VF3%W? z%eE5!SnMNyiQx6KxItuyz^np}*{05icUg|*QS!1Fi_nGQm)IAdpX`fAIys76ieL8T zvX~_a!&;8zaXhAdnBhvE&IJp{FTVK6zU}$G7doNuyTrmr@F{qCMEcV`J~5VKd8B}2 zZ?^jfCV}Y)7LH#6u`lppLdS7pH$g0BZt|=m{bB0$Y4U@kX)Nhg4d(Bj54#`ON?!B; zW`S&tAQ;B|0uFi?z_zxMJZTmv3*pFM3VbT^!tqNW_QglI4|$1Qgvn2l7d=(7FM;-9 z^Z>Zy6D|eKvBlDj7`R~_EWyI@OCa_ojH4KKACA8pcoAYVixEBGEq^AuNaXQAG$vR$ zehEbTgwUQ0>Q%ZOUOFehRYB30v11xkmxCQd1+N9-h1#AA-uV|^cBwL<8cPpjNk_ECbzT&`;nU4<^V{ugOLSsSbI>XF+q%*EFE8lH^g<@Rz zMU#jG3&$_9*cUir5ydY-5IQHNetWiknb2d7(#aajt*MJ?`!(?SCt>vH@{H&bH+lZR zMaG}7`0Vq8D93z9>JVg}h>+*v{r@j49KXb;JWS|0@XB1sKHOF45zB1q10mWFzYVqW zavoEDvZf22tp`#s?5uKqhdM=aY|^~+>My8UiR{Nn^##DZ)!V^IozEG4IJrm-C0 z^4BLj4qFLFuRs5zxkYHyX2kK!jO=&zrKSZfQG!Dr1*Mb{S!OJ3dE1&!kr#?zkXIDh zkCVhkfiLkRpB#rh1r?`>PaG}AqUA+n89?tnM(oSt+&INA2{ahx#=XFXMhl$8jUB@B zSa}&tj_C3@ECbo^p&T4aTuJduf^rz?Wb!Qoc>J*+1PCV!7I||xJEx?Vo%}Im+~;|0 zkL3F(^Tv~HdF-+*@*7iGerOLsG^fI26u%^n_{oSX-4JnQY{wod!px!vL-~Wsx`g9D z&iPLB*aQ~sTj~KoS>-43>dm&r(qD(Ev}G@TNt`A(9wPLdiNe3F2|y5 zrN&|~)!WGwNsFa%sF28@TI}N<0A;*G_L33{ zNM&rHL^@2%u>}3K)mY%Yq~<}oknkcSm`^tuU^XHz6u(fqg5(A9e&it*L&?J1!bwI^ z46*|2f+WASuWwQA#f&;2I9QCuQTF8#SdO{bKqcv8S3TkL|!OLxJj-QXN7_M_<1`TU>?Nb~#O=lQg=BUmVY0g?_2RB{YmmW*mi7KmgH z$WZqKjm31)xp7SwG%6g9=s6jivQzFtI25+=h3;8F`r@~i7Yi1OUlP=in8%=$9UpYD zy|7ol>8dvuroc0Ebe6P_U5-V?FGDPqL2*|xFJ^_mCU;SMTkZ~}Rikovoc3Y_3&k&q z+xakF40(y|Bx-q#?>YO=Vl1x8Cu=NN^BJAoV5u@do$>Z%YJ%k(#=^GJ@$Cqm7w|Jf zH|l)LnJSXpV=)#Ti)k!Piw7ym9lXq5|BYZ_7AXt(a5J7|n;)b2C29I$;O@hFfxIAy zX&x}Xzkq1|U5@2JyN?iS((nrwm;|aQ843? zE40R_TYVNR@ccKhk);&`lZkQ6NU%`+0$-A4Kk_|vEx_kTI=L4kTQiCfS1!k*;{ByO z*2KvDxlG3|r}|6cihT(aRQ7GiK3Glq$6zT9&399kS0MFH5#<~#I^Ne<;PTDb{WJY! z;xUB#pi4--3L*3}Dtxg!!DB`m>!?MhRiM*!(JhGNC*$^gA4U(*XZ__G_+uaI>*E;N zC4UTMBs)X^h~6I1MyeG}f}B#9JNPl&wAk7fdgyX2N+;{tLw8NPV=H(n^$r>}o!4Lj zUF3ypd>-)_Vew<43-~Nzrvb%%Bo(QL6ww2kYWi!&$1_+|`JU(kF;sL>13p$0hlL(L zSx-fv<*rDZPsNxSg>%7k9tOl$4K%im{}?&TkQ>Uxo&5Yhg_mPd@xG=@SMl!OnU5Ra zl3Q~QXki15E-tAN9^Feycup~L9J0J1$q$X}2cDAzZl}l05tWf~`=C5`ITmFrH5Pr= z2P9bZica#F(1mM!XcQ+Nquw6!VGxb^NLbW!TLw;#TaHE97d`uV*@xS7PJc4j_(Hb( zb^y8rR7bX*q^WtFragJI9E;Y;stTSWON{?vW)6dBevd}$k91kfw1h5F<70n}>y_Xz zRQPQ#KOk4QGgexZ$LvT(^IHj(@?GzN(^w{I7TO={`v9wzKI^Ypr<0q+>$ zgv&ABM4-p;naKV(IF2KcefXAsh*l-f^T}3HIep~i>l-b`qVr=K3!P2)dU(<)4+Ad> z|DpdA*^>$B7c5-kqpo+*1r0smE}~0h7tniD*Qfe%X>IBwI5W6}GPG?sa~ zh#mt{O1*;NxQ(@|?)S8^$P33W)X*nBKU6Z}7u1rQ8=#?IXZIdU7iB9omIvyUAKSyz z&PK3EjgRtUA@VS`jo9Du>@Y;Ny+DzA-n8&-7Sl!7UlwCo+M_5~IDU!Q=O;bpxD;0g zNkTa#va{Q)K#I+}fwj%i>37gx;OE7nZGB4<`V=f2zr-T@u$5Hf1CRNR>QO|sZ!9Zx zkH0J|9KRr0A+jG}cNKaS5dS}AkJW^I(RDG+V_jOYm1RmEAT+CyS)5$kE3IMPv*s=OhRN2Z4$1kW;5*CV)(VmP-k{!Z1m7>Qbd`!CK z2nT&JjRnhodpzwjL|lo?PM;QffIjO#r}beF6~LvkT(1jQ`lE0xbfNeqvDv;L{pwJ~ z7oDS_!#O3`-N*F64<^T0hW4cgcAppfe6ks?#WGAjj4Z!k;ToSU_Jy2&s`2@L?7-dT zeSFPUx3l`kCa^d*zU+1_>jA_96!cLm5*Yg;tq&+LQo}m-S)gWW4bm|qByGKtYkaok zF3>kl2XO+YjCl;nj{z|Ur_($()vKU#N;(INZX0}og6J+C^mh$F3?AM)6}oVZ&yiRR z^%tlx9K&=%;I7G!DXn8!WN^tqD6TB`?l31Wda9JWh;&X#4}j)9fKrvZGoQ3P)@kjw z(Q=r-5G+#T>ue=9SRyy>dht`}qNgfY6p!fvA5fjnxBD8Hv{%v8_vH5(56Jn^C#gUt2U5DtkpG|My>0UitWRh#-dZ-gax*w)ScKFs3QE4zEZA9o#QsYCq6DUkvM(CT{JRJiV-X&cJU{6%V8Q-M zdKW>I`0h=fqLl_)6VQ5fMI~Hlen=g+*PPg3hAt|NPdxU>n#Hl6%QT;+z(>Mk>?fmA zL0Dj4e6SdtvKT$^{rF{YX?MCDi>g=Znng+*5}}^DyLJZyx^&-<4ume8=l97^CV9c0 zYHWHB13x&uw*!r6n}}fHy*%g_CoCRv zOUU_?nej|PFEJ>sOYG9R;a8D}BD;{dbtfeM#8}Rx3+MUK^G-a5oqIOAuJ9%z-$^sP z=mamksLYkwQW^%nCaNE(EvXkaK)b&b(O+pZfZjnz1C*KkgKt_Fi+xkQK z^0bGi9V+r7d4ASoHu_*uQAVC0`AfmlU}!HHeNJQ1B?+=G=zkOembWhH0Y#ZsW!prq z9wGi1H}oD*K22+Sozj#iBUm`kk6H!s80!1H@6|)!^;7aNda8^?$6|T_GK!%6)IRZl zhmpfh5o%z4U~?tli@cDZ9JBKWTWMo!HGE4C+5V^0UMKP}n#cMyLbZ4{&yT7M9FO^J zFC7tuE}Z92SdSqRLw67SF%O%?k6F4S*V3S^XP;qXCY5jxIT|p!8{lA?$Np?s2C_d- z9ia>7`O%~(JQjK}VS!$LO73C`i|T{bbV+OU+o&aKmrLa3w6l7a(*(;iTo)(eC&M43 z7hR#d$BUHgBde^`SNp6p=%Q?;#-h)R{KB;)^jv$`8jD_QddJ=4dK9OyC_lMBx7F%_x|psdeN2yW z{E|rgg5(A5e?eB+<(?~qOvIxUQldV_j>cg7*m55G99VcS4=|9t1lapV?}&)d-gn4& zhXvB31>TW`0L;R6n-9a{>ok^$yyesOzBwP;CoVij@eA^bY+nKwP1cl$@xq9_V>CFI z+nTl`A{jHe_v8~}In~6Ea6qT`F0mF8Jtld6@hw3Yc!9_#+m6^u1ecHLQ<|WQqim(l z^>I%xL}=JS(!NJ=!9G5ri{$y)w67d1fE%6c*+459z|&AF&IDOBNM+yzn+C;+@5IU+5xve(^1-#z*^K5KCd&dK{|vD7eiIMQB?Z!_)K;sSzVQ==_GlW5UUrJbA|1cz0R}C-$RbR5 z$^*K5%vMtTg2G-$7tWHo;h%dikE?Ry8cU;QCie2sOWa@?w%9~Hxo5Fm(x(1G@e5pj wwl7|kP{ESx;=QcJIxFxd-OAdd7T0%@apiKlC_h Date: Sun, 11 Jun 2023 23:44:37 -0500 Subject: [PATCH 4/4] #141 --- .../{_jec_data_Grupo8.dta => jec_data_Grupo8.dta} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename Labs/tarea6/{_jec_data_Grupo8.dta => jec_data_Grupo8.dta} (100%) diff --git a/Labs/tarea6/_jec_data_Grupo8.dta b/Labs/tarea6/jec_data_Grupo8.dta similarity index 100% rename from Labs/tarea6/_jec_data_Grupo8.dta rename to Labs/tarea6/jec_data_Grupo8.dta