Class: Polars::Categories

Inherits:
Object
  • Object
show all
Defined in:
lib/polars/data_types.rb

Overview

Note:

This functionality is currently considered unstable. It may be changed at any point without it being considered a breaking change.

A named collection of categories for Categorical.

Two categories are considered equal (and will use the same physical mapping of categories to strings) if they have the same name, namespace and physical backing type, even if they are created in separate calls to Categories.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCategories

Returns a new instance of Categories.

Raises:

  • (Todo)


320
321
322
323
324
325
326
327
328
329
# File 'lib/polars/data_types.rb', line 320

def initialize
  # TODO fix
  name = nil
  if name.nil? || name == ""
    @_categories = RbCategories.global_categories
    return
  end

  raise Todo
end

Instance Attribute Details

#_categoriesObject

Returns the value of attribute _categories.



318
319
320
# File 'lib/polars/data_types.rb', line 318

def _categories
  @_categories
end