I'm trying to filter a Polars dataframe by using a boolean mask for the rows, which is generated from conditions on an specific column using:
df = df[df['col'] == cond]
And it's giving me an error because that filter is meant for column filter:
expected xx values when selecting columns by boolean mask, got yy
Where xx is the total columns and yy is the count of True's in the mask result.
According to the Polars API, that syntax should apply to filter to the rows (the same as how Pandas work), but it's instead trying to apply it to the columns.
Is there any way to change this behaviour?
PS: Please don't advice to use .filter or .sql instead, that's not what I'm asking here.