Created
July 27, 2019 00:57
-
-
Save xiaowei1234/4d86d64c47c79145a66776a0ea1b9898 to your computer and use it in GitHub Desktop.
create binary column on null values
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
wrap1 = DataFrameMapper([ | |
('col_with_nulls', ExpressionTransformer("0 if pandas.isnull(X[0]) else 1") | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment