Numpy Pandas

parent 512a5eb6
...@@ -868,7 +868,7 @@ ...@@ -868,7 +868,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 20, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -902,9 +902,19 @@ ...@@ -902,9 +902,19 @@
"#Tarea, generar el producto punto\n", "#Tarea, generar el producto punto\n",
"def prod_punto(v1,v2):\n", "def prod_punto(v1,v2):\n",
" '''\n", " '''\n",
" Soy un docstring\n", " Función que calcula el producto punto entre dos vectores de tamaño n\n",
" \n",
" Args:\n",
" v1 (vector): Lista vacia\n",
" v2 (vector): Lista vacia\n",
" \n",
" Yields:\n",
" \n",
" Examples:\n",
" >>> prod_punto([10,20],[2,4])\n",
" '100'\n",
" '''\n", " '''\n",
" v1,v2,v3=[],[],[]\n", " v3=[]\n",
" elementos=int(input(\"Cuantos elementos tienen tus vectores: \\n\"))\n", " elementos=int(input(\"Cuantos elementos tienen tus vectores: \\n\"))\n",
" \n", " \n",
" print(\"Ingresa los elementos uno a uno del vector 1 \\n\")\n", " print(\"Ingresa los elementos uno a uno del vector 1 \\n\")\n",
...@@ -922,29 +932,12 @@ ...@@ -922,29 +932,12 @@
" \n", " \n",
" print(\"\\nVector 1: \"+str(v1)+\"\\n\"+\"Vector 2: \"+str(v2)+\"\\n\"+\"Suma Producto: \"+str(sumap))\n", " print(\"\\nVector 1: \"+str(v1)+\"\\n\"+\"Vector 2: \"+str(v2)+\"\\n\"+\"Suma Producto: \"+str(sumap))\n",
" return sumap\n", " return sumap\n",
"\n",
" #return prod_punto\n", " #return prod_punto\n",
"x=prod_punto(3,4)" " \n",
] "vector1=[]\n",
}, "vector2=[]\n",
{ "x=prod_punto(vector1,vector2)"
"cell_type": "code",
"execution_count": 162,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"100"
]
},
"execution_count": 162,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Comprobacion con Numpy\n",
"np.matmul([10,20], [2,4])"
] ]
}, },
{ {
...@@ -1024,21 +1017,11 @@ ...@@ -1024,21 +1017,11 @@
"'''\n", "'''\n",
"\n", "\n",
"### Muy PRO\n", "### Muy PRO\n",
"m = np.array([[sum(row_a*col_b) for col_b in b.T] for row_a in a])\n", "### m = np.array([[sum(row_a*col_b) for col_b in b.T] for row_a in a])\n",
"print(m, type(m))\n", "### print(m, type(m))\n",
"###" "###"
] ]
}, },
{
"cell_type": "code",
"execution_count": 212,
"metadata": {},
"outputs": [],
"source": [
"a=np.array(mat1)\n",
"b=np.array(mat2)\n"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 118, "execution_count": 118,
...@@ -1162,28 +1145,6 @@ ...@@ -1162,28 +1145,6 @@
"mmult1(mat1,mat2)" "mmult1(mat1,mat2)"
] ]
}, },
{
"cell_type": "code",
"execution_count": 206,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[220, 280],\n",
" [490, 640]])"
]
},
"execution_count": 206,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Comprobacion con Numpy\n",
"np.matmul(mat1, mat2)"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
...@@ -1193,21 +1154,27 @@ ...@@ -1193,21 +1154,27 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 23, "execution_count": 206,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"[]" "array([[220, 280],\n",
" [490, 640]])"
] ]
}, },
"execution_count": 23, "execution_count": 206,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
], ],
"source": [] "source": [
"#Comprobacion con Numpy ejercicio 1\n",
"np.matmul([10,20], [2,4])\n",
"#Comprobacion con Numpy ejercicio 2\n",
"np.matmul(mat1, mat2)"
]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
...@@ -1225,11 +1192,12 @@ ...@@ -1225,11 +1192,12 @@
] ]
}, },
{ {
"cell_type": "code", "cell_type": "markdown",
"execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "source": [
"source": [] "((trans(A)*A)^-1)*trans(A)\n",
"Nota: Utilizar arreglos de Numpy\n"
]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
...@@ -1249,7 +1217,7 @@ ...@@ -1249,7 +1217,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 41, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -1259,21 +1227,21 @@ ...@@ -1259,21 +1227,21 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 51, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a 0.994272\n", "a -1.021430\n",
"b 0.530519\n", "b -0.479428\n",
"c 1.162452\n", "c -0.038148\n",
"d -0.981436\n", "d 0.998008\n",
"e -1.283798\n", "e 1.063352\n",
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 51, "execution_count": 7,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1285,21 +1253,21 @@ ...@@ -1285,21 +1253,21 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 46, "execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"0 2.042498\n", "0 1.071136\n",
"1 -0.964070\n", "1 1.001901\n",
"2 -0.687132\n", "2 0.094653\n",
"3 0.623300\n", "3 -0.492713\n",
"4 1.366322\n", "4 0.829835\n",
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 46, "execution_count": 8,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1310,7 +1278,7 @@ ...@@ -1310,7 +1278,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 47, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1322,7 +1290,7 @@ ...@@ -1322,7 +1290,7 @@
"dtype: int64" "dtype: int64"
] ]
}, },
"execution_count": 47, "execution_count": 9,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1334,7 +1302,7 @@ ...@@ -1334,7 +1302,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 48, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1347,7 +1315,7 @@ ...@@ -1347,7 +1315,7 @@
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 48, "execution_count": 10,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1366,16 +1334,16 @@ ...@@ -1366,16 +1334,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 53, "execution_count": 14,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"0.9942721192063438" "-1.0214304735714077"
] ]
}, },
"execution_count": 53, "execution_count": 14,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1386,19 +1354,19 @@ ...@@ -1386,19 +1354,19 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 54, "execution_count": 15,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a 0.994272\n", "a -1.021430\n",
"b 0.530519\n", "b -0.479428\n",
"c 1.162452\n", "c -0.038148\n",
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 54, "execution_count": 15,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1409,19 +1377,18 @@ ...@@ -1409,19 +1377,18 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 55, "execution_count": 16,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a 0.994272\n", "d 0.998008\n",
"b 0.530519\n", "e 1.063352\n",
"c 1.162452\n",
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 55, "execution_count": 16,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1432,21 +1399,26 @@ ...@@ -1432,21 +1399,26 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 56, "execution_count": 28,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a 1.988544\n", "0 0\n",
"b 1.061037\n", "1 2\n",
"c 2.324904\n", "2 4\n",
"d -1.962872\n", "3 6\n",
"e -2.567597\n", "4 8\n",
"dtype: float64" "5 10\n",
"6 12\n",
"7 14\n",
"8 16\n",
"9 18\n",
"dtype: int64"
] ]
}, },
"execution_count": 56, "execution_count": 28,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1457,21 +1429,26 @@ ...@@ -1457,21 +1429,26 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 57, "execution_count": 29,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a True\n", "0 False\n",
"b False\n", "1 False\n",
"c True\n", "2 False\n",
"d False\n", "3 False\n",
"e False\n", "4 False\n",
"5 True\n",
"6 True\n",
"7 True\n",
"8 True\n",
"9 True\n",
"dtype: bool" "dtype: bool"
] ]
}, },
"execution_count": 57, "execution_count": 29,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1482,16 +1459,16 @@ ...@@ -1482,16 +1459,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 58, "execution_count": 20,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"0.9942721192063438" "-1.0214304735714077"
] ]
}, },
"execution_count": 58, "execution_count": 20,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1509,7 +1486,7 @@ ...@@ -1509,7 +1486,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 59, "execution_count": 44,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -1519,7 +1496,7 @@ ...@@ -1519,7 +1496,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 60, "execution_count": 41,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1528,7 +1505,7 @@ ...@@ -1528,7 +1505,7 @@
"array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])" "array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])"
] ]
}, },
"execution_count": 60, "execution_count": 41,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1539,7 +1516,7 @@ ...@@ -1539,7 +1516,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 62, "execution_count": 42,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1558,7 +1535,7 @@ ...@@ -1558,7 +1535,7 @@
"dtype: int64" "dtype: int64"
] ]
}, },
"execution_count": 62, "execution_count": 42,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1614,15 +1591,9 @@ ...@@ -1614,15 +1591,9 @@
} }
], ],
"source": [ "source": [
"#En series la suma es elemento a elemento poer con respecto al índice de toda la variable\n",
"(s[:6]+s[4:])" "(s[:6]+s[4:])"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {
......
...@@ -868,7 +868,7 @@ ...@@ -868,7 +868,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 20, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -902,9 +902,19 @@ ...@@ -902,9 +902,19 @@
"#Tarea, generar el producto punto\n", "#Tarea, generar el producto punto\n",
"def prod_punto(v1,v2):\n", "def prod_punto(v1,v2):\n",
" '''\n", " '''\n",
" Soy un docstring\n", " Función que calcula el producto punto entre dos vectores de tamaño n\n",
" \n",
" Args:\n",
" v1 (vector): Lista vacia\n",
" v2 (vector): Lista vacia\n",
" \n",
" Yields:\n",
" \n",
" Examples:\n",
" >>> prod_punto([10,20],[2,4])\n",
" '100'\n",
" '''\n", " '''\n",
" v1,v2,v3=[],[],[]\n", " v3=[]\n",
" elementos=int(input(\"Cuantos elementos tienen tus vectores: \\n\"))\n", " elementos=int(input(\"Cuantos elementos tienen tus vectores: \\n\"))\n",
" \n", " \n",
" print(\"Ingresa los elementos uno a uno del vector 1 \\n\")\n", " print(\"Ingresa los elementos uno a uno del vector 1 \\n\")\n",
...@@ -922,29 +932,12 @@ ...@@ -922,29 +932,12 @@
" \n", " \n",
" print(\"\\nVector 1: \"+str(v1)+\"\\n\"+\"Vector 2: \"+str(v2)+\"\\n\"+\"Suma Producto: \"+str(sumap))\n", " print(\"\\nVector 1: \"+str(v1)+\"\\n\"+\"Vector 2: \"+str(v2)+\"\\n\"+\"Suma Producto: \"+str(sumap))\n",
" return sumap\n", " return sumap\n",
"\n",
" #return prod_punto\n", " #return prod_punto\n",
"x=prod_punto(3,4)" " \n",
] "vector1=[]\n",
}, "vector2=[]\n",
{ "x=prod_punto(vector1,vector2)"
"cell_type": "code",
"execution_count": 162,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"100"
]
},
"execution_count": 162,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Comprobacion con Numpy\n",
"np.matmul([10,20], [2,4])"
] ]
}, },
{ {
...@@ -1024,21 +1017,11 @@ ...@@ -1024,21 +1017,11 @@
"'''\n", "'''\n",
"\n", "\n",
"### Muy PRO\n", "### Muy PRO\n",
"m = np.array([[sum(row_a*col_b) for col_b in b.T] for row_a in a])\n", "### m = np.array([[sum(row_a*col_b) for col_b in b.T] for row_a in a])\n",
"print(m, type(m))\n", "### print(m, type(m))\n",
"###" "###"
] ]
}, },
{
"cell_type": "code",
"execution_count": 212,
"metadata": {},
"outputs": [],
"source": [
"a=np.array(mat1)\n",
"b=np.array(mat2)\n"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 118, "execution_count": 118,
...@@ -1162,28 +1145,6 @@ ...@@ -1162,28 +1145,6 @@
"mmult1(mat1,mat2)" "mmult1(mat1,mat2)"
] ]
}, },
{
"cell_type": "code",
"execution_count": 206,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[220, 280],\n",
" [490, 640]])"
]
},
"execution_count": 206,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Comprobacion con Numpy\n",
"np.matmul(mat1, mat2)"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
...@@ -1193,21 +1154,27 @@ ...@@ -1193,21 +1154,27 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 23, "execution_count": 206,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"[]" "array([[220, 280],\n",
" [490, 640]])"
] ]
}, },
"execution_count": 23, "execution_count": 206,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
], ],
"source": [] "source": [
"#Comprobacion con Numpy ejercicio 1\n",
"np.matmul([10,20], [2,4])\n",
"#Comprobacion con Numpy ejercicio 2\n",
"np.matmul(mat1, mat2)"
]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
...@@ -1225,11 +1192,12 @@ ...@@ -1225,11 +1192,12 @@
] ]
}, },
{ {
"cell_type": "code", "cell_type": "markdown",
"execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "source": [
"source": [] "((trans(A)*A)^-1)*trans(A)\n",
"Nota: Utilizar arreglos de Numpy\n"
]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
...@@ -1249,7 +1217,7 @@ ...@@ -1249,7 +1217,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 41, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -1259,21 +1227,21 @@ ...@@ -1259,21 +1227,21 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 51, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a 0.994272\n", "a -1.021430\n",
"b 0.530519\n", "b -0.479428\n",
"c 1.162452\n", "c -0.038148\n",
"d -0.981436\n", "d 0.998008\n",
"e -1.283798\n", "e 1.063352\n",
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 51, "execution_count": 7,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1285,21 +1253,21 @@ ...@@ -1285,21 +1253,21 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 46, "execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"0 2.042498\n", "0 1.071136\n",
"1 -0.964070\n", "1 1.001901\n",
"2 -0.687132\n", "2 0.094653\n",
"3 0.623300\n", "3 -0.492713\n",
"4 1.366322\n", "4 0.829835\n",
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 46, "execution_count": 8,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1310,7 +1278,7 @@ ...@@ -1310,7 +1278,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 47, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1322,7 +1290,7 @@ ...@@ -1322,7 +1290,7 @@
"dtype: int64" "dtype: int64"
] ]
}, },
"execution_count": 47, "execution_count": 9,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1334,7 +1302,7 @@ ...@@ -1334,7 +1302,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 48, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1347,7 +1315,7 @@ ...@@ -1347,7 +1315,7 @@
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 48, "execution_count": 10,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1366,16 +1334,16 @@ ...@@ -1366,16 +1334,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 53, "execution_count": 14,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"0.9942721192063438" "-1.0214304735714077"
] ]
}, },
"execution_count": 53, "execution_count": 14,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1386,19 +1354,19 @@ ...@@ -1386,19 +1354,19 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 54, "execution_count": 15,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a 0.994272\n", "a -1.021430\n",
"b 0.530519\n", "b -0.479428\n",
"c 1.162452\n", "c -0.038148\n",
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 54, "execution_count": 15,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1409,19 +1377,18 @@ ...@@ -1409,19 +1377,18 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 55, "execution_count": 16,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a 0.994272\n", "d 0.998008\n",
"b 0.530519\n", "e 1.063352\n",
"c 1.162452\n",
"dtype: float64" "dtype: float64"
] ]
}, },
"execution_count": 55, "execution_count": 16,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1432,21 +1399,26 @@ ...@@ -1432,21 +1399,26 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 56, "execution_count": 28,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a 1.988544\n", "0 0\n",
"b 1.061037\n", "1 2\n",
"c 2.324904\n", "2 4\n",
"d -1.962872\n", "3 6\n",
"e -2.567597\n", "4 8\n",
"dtype: float64" "5 10\n",
"6 12\n",
"7 14\n",
"8 16\n",
"9 18\n",
"dtype: int64"
] ]
}, },
"execution_count": 56, "execution_count": 28,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1457,21 +1429,26 @@ ...@@ -1457,21 +1429,26 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 57, "execution_count": 29,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"a True\n", "0 False\n",
"b False\n", "1 False\n",
"c True\n", "2 False\n",
"d False\n", "3 False\n",
"e False\n", "4 False\n",
"5 True\n",
"6 True\n",
"7 True\n",
"8 True\n",
"9 True\n",
"dtype: bool" "dtype: bool"
] ]
}, },
"execution_count": 57, "execution_count": 29,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1482,16 +1459,16 @@ ...@@ -1482,16 +1459,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 58, "execution_count": 20,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"0.9942721192063438" "-1.0214304735714077"
] ]
}, },
"execution_count": 58, "execution_count": 20,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1509,7 +1486,7 @@ ...@@ -1509,7 +1486,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 59, "execution_count": 44,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -1519,7 +1496,7 @@ ...@@ -1519,7 +1496,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 60, "execution_count": 41,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1528,7 +1505,7 @@ ...@@ -1528,7 +1505,7 @@
"array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])" "array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])"
] ]
}, },
"execution_count": 60, "execution_count": 41,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1539,7 +1516,7 @@ ...@@ -1539,7 +1516,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 62, "execution_count": 42,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1558,7 +1535,7 @@ ...@@ -1558,7 +1535,7 @@
"dtype: int64" "dtype: int64"
] ]
}, },
"execution_count": 62, "execution_count": 42,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1614,15 +1591,9 @@ ...@@ -1614,15 +1591,9 @@
} }
], ],
"source": [ "source": [
"#En series la suma es elemento a elemento poer con respecto al índice de toda la variable\n",
"(s[:6]+s[4:])" "(s[:6]+s[4:])"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment