Skip to content

Instantly share code, notes, and snippets.

@fnneves
Created January 9, 2020 16:13
Show Gist options
  • Save fnneves/d57830d38da9fb2f60cfd312cacc65a9 to your computer and use it in GitHub Desktop.
Save fnneves/d57830d38da9fb2f60cfd312cacc65a9 to your computer and use it in GitHub Desktop.
def days_diff(df):
df['CohortIndex_d'] = (df['last_active_date'] - df['signup_date']).dt.days
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment