I haven't been able to find an answer to this anywhere, so here it goes: I have a pandas dataframe df like this:
X Y name
0 3 1 foo
1 5 2 fa
2 1 3 hoo
3 2 4 ha
I can easily find information in df by making conditions (for example df['X' >=3]), which is great. However, I want to make a more generic solution, where I can create a long condition in string form (e.g. '(X >= 3) & (name == foo)'), which could be split into an actual condition, that can be used in a pandas dataframe. Can anyone suggest a smart solution (if something like this is possible) or redirect me to a similar discussion on the discussion board, where this topic has been debated?