From 0ee71b6e265ddd2e764c9a62a101781bdd5877a7 Mon Sep 17 00:00:00 2001
From: Juan David Hernandez Ramirez <hernandezj@jupyterMiLAB>
Date: Thu, 18 Feb 2021 03:52:32 -0500
Subject: [PATCH] =?UTF-8?q?se=20a=C3=B1ade=20tabla=20con=20resumen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ejercicio1-clase05.ipynb | 38 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/ejercicio1-clase05.ipynb b/ejercicio1-clase05.ipynb
index aa62094..6d9337d 100644
--- a/ejercicio1-clase05.ipynb
+++ b/ejercicio1-clase05.ipynb
@@ -23,7 +23,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 1,
+   "execution_count": 64,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -33,7 +33,9 @@
     "import scipy\n",
     "from scipy.optimize import leastsq\n",
     "import statistics\n",
-    "import math"
+    "import math\n",
+    "from tabulate import tabulate\n",
+    "import pandas as pd"
    ]
   },
   {
@@ -1325,6 +1327,38 @@
     "FHWMB=2*math.sqrt(2*math.log(2))*sigmasnpB\n",
     "FHWMB.mean()"
    ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Resumiendo los valores de FHWM en las 4 matrices, obtenemos."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 63,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "+--------------------+---------+---------+---------+\n",
+      "|   Escala de Grises |       R |       G |       B |\n",
+      "|--------------------+---------+---------+---------|\n",
+      "|            2.09742 | 2.31156 | 2.32033 | 2.38171 |\n",
+      "+--------------------+---------+---------+---------+\n"
+     ]
+    }
+   ],
+   "source": [
+    "df = pd.DataFrame({'Escala de Grises' : [FHWM.mean()],\n",
+    "                   'R' : [FHWMR.mean()],\n",
+    "                  'G' : [FHWMG.mean()],\n",
+    "                 'B' : [FHWMB.mean()]})\n",
+    "print(tabulate(df, headers='keys', tablefmt='psql',showindex=\"never\"))"
+   ]
   }
  ],
  "metadata": {
-- 
GitLab