vaex
vaex copied to clipboard
add types to get_column_names
- Add a dtypes param to get_column_names
- Add this type to the getitem method for a quick shortcut.
example:
>>> from vaex.ml.datasets import load_titanic
>>> df = load_titanic()
>>> df.get_column_names(dtypes=int)
['pclass', 'sibsp', 'parch']
>>> df.get_column_names(dtypes=[bool, int])
['pclass', 'survived', 'sibsp', 'parch']
>>> df[int].get_column_names()
['pclass', 'sibsp', 'parch']
>>>df[bool, int].get_column_names()
['pclass', 'survived', 'sibsp', 'parch']
Can this PR be revisited given the new developements of dtype in vaex @maartenbreddels