Skip to content

Check whether the data type contains categoricals

Source code

Description

Check whether the data type contains categoricals

Usage

DataType_contains_categoricals()

Value

A logical value

Examples

library("polars")

pl$List(pl$Categorical())$contains_categoricals()
#> [1] TRUE
pl$List(pl$Enum(c("a", "b")))$contains_categoricals()
#> [1] TRUE
pl$List(pl$Float32)$contains_categoricals()
#> [1] FALSE
pl$List(pl$List(pl$Categorical()))$contains_categoricals()
#> [1] TRUE