Skip to content

[lab-revisiting-machine-learning] Susumu - #8

Open
susumusakamoto wants to merge 1 commit into
Ironhack-Data-0621-Remote:masterfrom
susumusakamoto:master
Open

[lab-revisiting-machine-learning] Susumu#8
susumusakamoto wants to merge 1 commit into
Ironhack-Data-0621-Remote:masterfrom
susumusakamoto:master

Conversation

@susumusakamoto

Copy link
Copy Markdown

No description provided.

@ArabellaCM

Copy link
Copy Markdown

Hi Susumu, I'm taking a look at your Machine Learning Revisited lab where you find which columns have too many null values, drop some columns and clean up the gender column.

Overall everything works well but I think you could make a cleaner function to clean the gender column at the end. For example you can already see that there are no null values to fill and you can make an if statement that means you don't have to specify what the "other" values are.
Here's an example of a nice small function:

def clean(x):
    
    if x.upper().startswith('M') or x.upper().startswith('F'):
        return x.upper()[0]
    else:
        return 'Other'

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