Skip to content

[lab-revisiting-machine-learning] Izel - #11

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

[lab-revisiting-machine-learning] Izel#11
izelyekrek wants to merge 1 commit into
Ironhack-Data-0621-Remote:masterfrom
izelyekrek:master

Conversation

@izelyekrek

Copy link
Copy Markdown

No description provided.

@ArabellaCM

Copy link
Copy Markdown

Hey Izel, I'm just having a look at your machine learning revisited lab :)

You started strong with finding the nulls but then it didn't seem to continue. Let me have a go at helping out.

Firstly here you find the columns with more than 15% nulls but it should be more than 85% (could be a typo?)

columns_above_85 = null_percent_data[null_percent_data['null_percent'] > 15]

Next you would like to add the names of those columns into a list and you wrote a function but it gives you an error. Let's have a look at it:

for i in columns_above_85['column_name']:
    drop_list.append(i)

The problem is you are trying to append to drop_list which further up you have defined as a dataframe:

drop_list = new_data.drop(['ZIP', 'OSOURCE'], axis=1)

Here is the logic the the lab wants you to follow:

  1. Add the columns 'ZIP' and 'OSOURCE' to a list called drop_list
  2. Find which columns have more than 85% null values and add the names of those columns to drop_list
  3. Drop all the columns in drop_list (this just makes your code easier to follow because you keep the column dropping all in one place)
  4. Clean the "GENDER" column

My tip would be if it feels like you are going in circles and doing things that don't make sense - move away from your code and write a simple list like this in a text editor. This helps me when I have forgotten what I'm trying to achieve :)

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