Skip to content
Advertisement

Tag: slice

Slice pandas row of a specific column using numpy boolean

The objective is to slice multiple pandas row of a specific column using a Numpy boolean. The following code should do the task However, I wonder whether the above code can be shortened further, especially these lines Currently, Pandas throw an error if I am to directly using Numpy boolean without converting to list Is there something I miss, or

Advertisement