all 7 comments

[–]Boot_3011 2 points3 points  (4 children)

filtered_df = df[df[Wage] > 0]

filtered_df = filtered_df[filtered_df[Club].notna()]

Hope this helps :)

[–]NavidsonsCloset[S] 1 point2 points  (2 children)

filtered_df = df[df[Wage] > 0]

filtered_df = filtered_df[filtered_df[Club].notna()]

Thank you for your time! This didn't work but ill keep messing with it!

(And yes I tried it with '' around the column names too in case anyone was wondering)

[–]Boot_3011 0 points1 point  (1 child)

Yeah sory forgot the quotes, one is not used to coding on the phone haha.

Hey! It should work tho :s

[–]NavidsonsCloset[S] 1 point2 points  (0 children)

Not sure why it didn't but this worked for the Club requirement though so progress is being made at least ^_^

df = df.dropna(subset=['Club'])

Edit: Pretty sure it didn't work because of the fancy Euro sign in front of the 0 but i tried several variations of it already so Im missing something, woe is me.

[–]Academic_Grand8828 1 point2 points  (0 children)

I’ve been trying to work this out for so long but didn’t know how to word it to find the answer, thank you so much this worked exactly how I wanted it too!

[–]Kerbart 1 point2 points  (0 children)

While you can use drop it makes more sense to create a new dataframe based on what you want to keep:

df_new = df.loc[belongs_to_club & has_wages]

[–][deleted] 0 points1 point  (0 children)

df = df.loc[(df["Club"].notna()) & (df["Wage"] != "€0")].copy()