Created
September 5, 2020 15:13
-
-
Save ayoskovich/b95665161c7dffc120833751308e2687 to your computer and use it in GitHub Desktop.
Return df rows where any of multiple columns are above a certain number.
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
df[df.apply(lambda x: np.any(x > 100_000), axis=1, raw=True)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think
raw=True
is 100% necessary but it's probably faster...