Skip to content

Instantly share code, notes, and snippets.

View SubhadityaMukherjee's full-sized avatar

Subhaditya Mukherjee SubhadityaMukherjee

View GitHub Profile

How they felt about themselves -> Attractiveness

ret_cross_attr("attr5_1")

Go out

Several times a week=1
Twice a week=2
Once a week=3
Twice a month=4
Once a month=5
Several times a year=6
df_interests = pd.concat([matched.iloc[:, 47:63], matched["gender"]], axis=1)
df_interests.head(10)
sns.pairplot(df_interests, hue="gender")

Goal

cols2 = [
    "Seemed like a fun night out",
    "To meet new people",
    "To get a date",
    "Looking for a serious relationship",
    "To say I did it",
 "Other",
cols = [
    "Law  ",
    "Math",
    "Social Science, Psychologist ",
    "Medical Science, Pharmaceuticals, and Bio Tech ",
    "Engineering  ",
    "English/Creative Writing/ Journalism ",
 "History/Religion/Philosophy ",
age = pd.crosstab(index=matched["age_o"], columns="count").reset_index()
age.head(3)
sns.barplot(x=age["age_o"], y=age["count"]).set_xticklabels(
rotation=45, labels=age["age_o"]
)
;

ethnicity

pd.crosstab(index=matched["samerace"], columns="count")
col_0 count
match
to_remove = []
for a in df.columns:
if df[a].isna().sum() > 4000:
to_remove.append(a)
df = df.drop(to_remove, axis=1)
df.shape
df2['match'].shape
pd.crosstab(index=df2["match"], columns="count")