Created
July 2, 2019 18:03
-
-
Save himat/2e5acd9747bbcefa13de1db4d089d289 to your computer and use it in GitHub Desktop.
[Filter a Pandas series] Use .where(.) chaining #pandas
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
test = { | |
383: 3.000000, | |
663: 1.000000, | |
726: 1.000000, | |
737: 9.000000, | |
833: 8.166667 | |
} | |
pd.Series(test).where(lambda x : x!=1).dropna() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment