tidypolars.tidyselect

Module Contents

Functions

contains(match[, ignore_case])

Contains a literal string

ends_with(match[, ignore_case])

Ends with a suffix

everything()

Selects all columns

starts_with(match[, ignore_case])

Starts with a prefix

contains(match, ignore_case=True)[source]

Contains a literal string

Parameters:
  • match (str) – String to match columns

  • ignore_case (bool) – If TRUE, the default, ignores case when matching names.

Examples

>>> df = tp.Tibble({'a': range(3), 'b': range(3), 'c': ['a', 'a', 'b']})
>>> df.select(contains('c'))
ends_with(match, ignore_case=True)[source]

Ends with a suffix

Parameters:
  • match (str) – String to match columns

  • ignore_case (bool) – If TRUE, the default, ignores case when matching names.

Examples

>>> df = tp.Tibble({'a': range(3), 'b_code': range(3), 'c_code': ['a', 'a', 'b']})
>>> df.select(ends_with('code'))
everything()[source]

Selects all columns

Examples

>>> df = tp.Tibble({'a': range(3), 'b': range(3), 'c': ['a', 'a', 'b']})
>>> df.select(everything())
starts_with(match, ignore_case=True)[source]

Starts with a prefix

Parameters:
  • match (str) – String to match columns

  • ignore_case (bool) – If TRUE, the default, ignores case when matching names.

Examples

>>> df = tp.Tibble({'a': range(3), 'add': range(3), 'sub': ['a', 'a', 'b']})
>>> df.select(starts_with('a'))