vaex icon indicating copy to clipboard operation
vaex copied to clipboard

add types to get_column_names

Open xdssio opened this issue 4 years ago • 1 comments

  1. Add a dtypes param to get_column_names
  2. 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']

xdssio avatar Jun 08 '20 10:06 xdssio

Can this PR be revisited given the new developements of dtype in vaex @maartenbreddels

JovanVeljanoski avatar Feb 27 '21 21:02 JovanVeljanoski