Created
July 18, 2022 11:51
-
-
Save neelindresh/27c99ab80de09e0fb921822ce37bdffa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df=pd.read_csv("train.csv") | |
encoders=["area_code","state","international_plan","voice_mail_plan","churn"] | |
for i in encoders: | |
le=LabelEncoder() | |
df[i]=le.fit_transform(df[i]) | |
trainy=df["churn"] | |
trainx=df[['state', 'account_length', 'area_code', 'international_plan', | |
'voice_mail_plan', 'number_vmail_messages', 'total_day_minutes', | |
'total_day_calls', 'total_day_charge', 'total_eve_minutes', | |
'total_eve_calls', 'total_eve_charge', 'total_night_minutes', | |
'total_night_calls', 'total_night_charge', 'total_intl_minutes', | |
'total_intl_calls', 'total_intl_charge', | |
'number_customer_service_calls']] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment