Replies: 3 comments
-
Why not just do this:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Well there could be other filters. The idea is to do this incrementally. So in the end, I am retaining simply: if apply_filter1:
vdf = vdf[vdf['a'] >= 0]
if apply_filter2:
vdf = vdf[vdf['a'] <= 2] Thanks for your proposal! |
Beta Was this translation helpful? Give feedback.
0 replies
-
yeah, performance shouldn't matter, because we don't eagery compute the filter. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I would like to filter a dataframe, depending conditions defined elsewhere in the code.
It seems I can do so by using filters defined as a string.
I have however not found this documented. Please, is this acceptable or should this be avoided?
Working example:
Thanks for your feedback!
Bests
Beta Was this translation helpful? Give feedback.
All reactions