I have a dataframe called 'vp' and in some of the rows, 'rev' is a positive float and in the others, 'rev' does not exist (NaN).
How to section this dataframe into its 2 components? I tried this
vpbook = vp[vp['rev'] > 0] # works
vpnonbook = vp[~vp['rev'] > 0] # does not work
The line that does not work yields:
TypeError: ufunc 'invert' not supported for the input types, and the inputs
could not be safely coerced to any supported types according to the casting
rule ''safe''
How to do this?