Created
July 26, 2019 20:45
-
-
Save atriptoparadise/ea009ef33ef226e62c93c60e8728af82 to your computer and use it in GitHub Desktop.
Data Preparation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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