pandas-selectable
pandas-selectable copied to clipboard
A `select` accessor for easier subsetting of pandas DataFrames and Series
I'm not sure if it's possible. But something like `dta.select.A.str.strip() == ''`. I think you could wrap the non-boolean methods so that they return a selectable column. Need to try...
Can't do `~dta.select.A.str.contains('foobar')`
Will need to think about how to do this. I think maybe the pandas API could use some improvements here too. There's no attribute selection on the MultiIndex. Something like...
Currently not preventing assigning to a selectable column. E.g., something like `dta.select.ColumnName = "I mistyped ==!"` won't fail and leads to a bad time.