Created
September 22, 2019 15:15
-
-
Save dipanjanS/b5a53423ac898463eaf2a7e74ee134bb to your computer and use it in GitHub Desktop.
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
from sklearn.preprocessing import Binarizer | |
bn = Binarizer(threshold=0.9) | |
pd_watched = bn.transform([popsong_df['listen_count']])[0] | |
popsong_df['pd_watched'] = pd_watched | |
popsong_df.head(11) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment