Skip to content

Instantly share code, notes, and snippets.

View aaronremski's full-sized avatar
🎯
Focusing on school work

Aaron Remski aaronremski

🎯
Focusing on school work
View GitHub Profile
import pandas as pd
import perfplot
def numpy_where(df):
return df.assign(is_rich=np.where(df['salary'] >= 50, 'yes', 'no'))
def list_comp(df):
return df.assign(is_rich=['yes' if x >= 50 else 'no' for x in df['salary']])
def loc(df):