Skip to content

Leon - #1

Open
leonplaza wants to merge 1 commit into
Ironhack-data-bcn-oct-2023:mainfrom
leonplaza:main
Open

leonplaza wants to merge 1 commit into
Ironhack-data-bcn-oct-2023:mainfrom
leonplaza:main

Conversation

@leonplaza

Copy link
Copy Markdown

No description provided.

@bripollc

Copy link
Copy Markdown

León,

Buen laaaab. Poco a comentar! Sigue así 🚀 Te dejo algunas correcciones del lab:

  • "Turns out that GRE Score and CGPA also uniquely identify the data. Show this in the cell below."
temp_df = admissions[["GRE Score", "CGPA"]]
unique_indices = temp_df.duplicated()
unique_indices.sum()

Aquí te pedía que identificaras si las combinaciones de valores en las columnas "GRE Score" y "CGPA" son únicas. Te dejo una manera de hacerlo con duplicated(). Si el resultado de unique_indices.sum() es 0, significa que no hay filas duplicadas con la combinación de valores en esas dos columnas.

  • 3 - In this part of the lab, we would like to test complex conditions on the entire data set at once. Let's start by finding the number of rows where the CGPA is greater than 9 and the student has performed an investigation.
rslt_1 = admissions[(admissions['CGPA'] > 9) & (admissions['Research'] > 0)]
rslt_1

En tu código estas usando | entre ambas condiciones que representa una operación "o". Como te pide que ambas condiciones deben cumplirse se debería usar &, que representa una operación "y".

  • 4 - Now return all the rows where the CGPA is greater than 9 and the SOP score is less than 3.5. Find the mean chance of admit for these applicants.
admissions[(admissions["CGPA"] > 9) & (admissions["SOP"] < 3.5)]["Chance of Admit"].mean()

Idem que en el ejercicio anterior.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants