Skip to content

Instantly share code, notes, and snippets.

@sachag678
Created October 24, 2022 17:21
Show Gist options
  • Save sachag678/5c8e4b87c7107f3f0eb7a137ea96e176 to your computer and use it in GitHub Desktop.
Save sachag678/5c8e4b87c7107f3f0eb7a137ea96e176 to your computer and use it in GitHub Desktop.
df_last_week = df[df['date'] > (datetime.datetime.today() - datetime.timedelta(days=7))]
df_last_week.drop(columns=['date'], inplace=True)
df_last_week.drop_duplicates(inplace=True)
generate_score(df_last_week, *scores)
df_nlargest = df_last_week.nlargest(5, 'score')[['type', 'price', 'bat_health', 'sentiment', 'gb', 'link']]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment