Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab | Customer Analysis Round 1 #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joaomatoslopes
Copy link

This repository contain a jupyter file with my answers regarding the Lab (Customer Analysis Round 1)

@pt-data-ta-lis
Copy link

Good Job!

Comments:

  • Rearrange the columns in the dataframe as needed
    data_file2 = data_file2[data_file1.columns]
    data_file3 = data_file3[data_file1.columns]

  • Which columns are numerical?
    data_concatenated.select_dtypes('float')

  • Which columns are categorial?
    data_concatenated.select_dtypes('object')

  • Correct the values in the column customer_lifetime_value. They are given as percent, so multiply them by 100 and change dtype to numerical type
    data_concat['customer_lifetime_value'] = data_concat['customer_lifetime_value'].str.replace('%','')
    data_concat['customer_lifetime_value'] = pd.to_numeric(data_concat['customer_lifetime_value'], errors='coerce')*100

  • Filter out the data for customers who have an income of 0 or less
    Intendend to take out who has an income of 0 or less so that the final data frame shows only who has a positive income.
    data_concat = data_concat[data_concat['income']>0]

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