Skip to content

Commit 19e7ccf

Browse files
committed
XLSX Fix carga + Contar nr filas correccion
joanby#1 El fichero titanic3.XLSX en realidad nunca se cargaba porque se habia heredado el mismo filename del titanic3.xls joanby#2 En nro de filas que se carga a traves del loop FOR, es en realidad Counter-1
1 parent 952a4a8 commit 19e7ccf

2 files changed

Lines changed: 1561 additions & 1559 deletions

File tree

notebooks/T1 - 1 - Data Cleaning - Carga de datos-Colab.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@
640640
" main_dict[cols[i]].append(values[i])\n",
641641
" counter += 1\n",
642642
"\n",
643-
"print(\"El data set tiene %d filas y %d columnas\"%(counter, n_cols))"
643+
"print(\"El data set tiene %d filas y %d columnas\"%(counter-1, n_cols))"
644644
]
645645
},
646646
{
@@ -1314,7 +1314,7 @@
13141314
" main_dict[col_names[i]].append(values[i])\n",
13151315
" counter += 1\n",
13161316
"\n",
1317-
" print(\"El data set tiene %d filas y %d columnas\"%(counter, n_cols))\n",
1317+
" print(\"El data set tiene %d filas y %d columnas\"%(counter-1, n_cols))\n",
13181318
"\n",
13191319
" #Convertimos el diccionario procesado a Data Frame y comprobamos que los datos son correctos\n",
13201320
" df = pd.DataFrame(main_dict)\n",
@@ -1523,6 +1523,7 @@
15231523
},
15241524
"outputs": [],
15251525
"source": [
1526+
"filename = \"titanic/titanic3.xlsx\"\n",
15261527
"titanic3 = pd.read_excel(mainpath + \"/\" + filename, \"titanic3\")"
15271528
]
15281529
},
@@ -1588,7 +1589,7 @@
15881589
"name": "python",
15891590
"nbconvert_exporter": "python",
15901591
"pygments_lexer": "ipython3",
1591-
"version": "3.8.5"
1592+
"version": "3.5.5"
15921593
}
15931594
},
15941595
"nbformat": 4,

0 commit comments

Comments
 (0)