Last active
March 8, 2020 21:34
-
-
Save dpoulopoulos/3e724aee5ca5f2da9deb39cccd071a8f to your computer and use it in GitHub Desktop.
Create the preference column.
This file contains hidden or 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
# more than 3 -> 1, less than 5 -> 0 | |
data_df['preference'] = np.where(data_df['rating'] > 3, 1, 0) | |
data_df.head() |
Hi! Thanks :)
You can find the example of the first post here: https://github.com/dpoulopoulos/cf_step/blob/master/nbs/index.ipynb
Just change the cells that are specified in the second post to get a working example.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you have full code from 0 to end example?
Great post , thanks