text_html_output_1.png
from sklearn.preprocessing import LabelEncoder

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df_sd = pd.read_csv('/kaggle/input/hacker-earth-love-in-the-screens/sample dataset.csv')
df_sd

df_sub = pd.read_csv('/kaggle/input/hacker-earth-love-in-the-screens/sample submission.csv')
df_sub

df_data = pd.read_csv('/kaggle/input/hacker-earth-love-in-the-screens/data.csv')
df_data

df_data.corr()

df_data.columns

df_data.other_interests.unique()

df = df_data
df_uid = df[['user_id']]

df.columns

from sklearn.preprocessing import LabelEncoder
le = LabelEncoder()
df['username'] = df['username'].astype(str)
df['username'] = le.fit_transform(df['username'])
df['status'] = df['status'].astype(str)
df['status'] = le.fit_transform(df['status'])
df['sex'] = df['sex'].astype(str)
df['sex'] = le.fit_transform(df['sex'])
df['orientation'] = df['orientation'].astype(str)
df['orientation'] = le.fit_transform(df['orientation'])
df['drinks'] = df['drinks'].astype(str)
df['drinks'] = le.fit_transform(df['drinks'])
df['drugs'] = df['drugs'].astype(str)
df['drugs'] = le.fit_transform(df['drugs'])
df['location'] = df['location'].astype(str)
df['location'] = le.fit_transform(df['location'])
df['pets'] = df['pets'].astype(str)
df['pets'] = le.fit_transform(df['pets'])
df['smokes'] = df['smokes'].astype(str)
df['smokes'] = le.fit_transform(df['smokes'])
df['language'] = df['language'].astype(str)
df['language'] = le.fit_transform(df['language'])
df['new_languages'] = df['new_languages'].astype(str)
df['new_languages'] = le.fit_transform(df['new_languages'])
df['body_profile'] = df['body_profile'].astype(str)
df['body_profile'] = le.fit_transform(df['body_profile'])
df['bio'] = df['bio'].astype(str)
df['bio'] = le.fit_transform(df['bio'])
df['interests'] = df['interests'].astype(str)
df['interests'] = le.fit_transform(df['interests'])
df['other_interests'] = df['other_interests'].astype(str)
df['other_interests'] = le.fit_transform(df['other_interests'])
df['location_preference'] = df['location_preference'].astype(str)
df['location_preference'] = le.fit_transform(df['location_preference'])
df['job'] = df['job'].astype(str)
df['job'] = le.fit_transform(df['job'])
df['dropped_out'] = df['dropped_out'].astype(str)
df['dropped_out'] = le.fit_transform(df['dropped_out'])
df