Skip to content

Conversation

@edwardrodgermartinez
Copy link

No description provided.

@sh-ih
Copy link

sh-ih commented Oct 23, 2023

On the exercises with the admissions dataframe, question 2 asked to “Keep the column in the dataframe in addition to making it an index”, you did the set_index, but since you didn’t use drop=False as a parameter, you didn’t keep Serial No. in the dataframe.

If you overwrite the dataframe, as your comment says you did here, you can just run from the initial cell:

# Run this code:
admissions = pd.read_csv('../Admission_Predict.csv')
#to remove trailing spaces at the end of the column names
admissions.columns = admissions.columns.str.rstrip()

To restore admissions to the original values

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