Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save atriptoparadise/ea009ef33ef226e62c93c60e8728af82 to your computer and use it in GitHub Desktop.
Save atriptoparadise/ea009ef33ef226e62c93c60e8728af82 to your computer and use it in GitHub Desktop.
Data Preparation
# A function read data from my database and dropped some rows by some simple requirements
df = loadData('***')
# There're some accounts stopping selling products after 2019, so I dropped as we don't need to predict these accounts
df = dropAccByRatio2019(df, 0.06)
# Dropped account and product less than 6 records
df = dropAccPrdLessRecord(df, 6)
df.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment