Skip to content
New: Star-import, signal unraveling, Python 3.12 support, and more

# col_mapper module

Class for mapping column arrays.

## ColumnMapper class

    ColumnMapper(
        wrapper,
        col_arr,
        **kwargs
    )

Used by Records and MappedArray classes to make use of column and group metadata.

Superclasses

- AttrResolverMixin
- Cacheable
- Chainable
- Comparable
- Configured
- ExtPandasIndexer
- HasSettings
- IndexingBase
- PandasIndexer
- Pickleable
- Prettified
- Wrapping

Inherited members

- AttrResolverMixin.deep_getattr()
- AttrResolverMixin.post_resolve_attr()
- AttrResolverMixin.pre_resolve_attr()
- AttrResolverMixin.resolve_attr()
- AttrResolverMixin.resolve_shortcut_attr()
- Cacheable.get_ca_setup()
- Chainable.pipe()
- Configured.copy()
- Configured.equals()
- Configured.get_writeable_attrs()
- Configured.prettify()
- Configured.replace()
- Configured.resolve_merge_kwargs()
- Configured.update_config()
- HasSettings.get_path_setting()
- HasSettings.get_path_settings()
- HasSettings.get_setting()
- HasSettings.get_settings()
- HasSettings.has_path_setting()
- HasSettings.has_path_settings()
- HasSettings.has_setting()
- HasSettings.has_settings()
- HasSettings.reset_settings()
- HasSettings.resolve_setting()
- HasSettings.resolve_settings_paths()
- HasSettings.set_settings()
- IndexingBase.indexing_setter_func()
- PandasIndexer.xs()
- Pickleable.decode_config()
- Pickleable.decode_config_node()
- Pickleable.dumps()
- Pickleable.encode_config()
- Pickleable.encode_config_node()
- Pickleable.file_exists()
- Pickleable.getsize()
- Pickleable.load()
- Pickleable.loads()
- Pickleable.modify_state()
- Pickleable.resolve_file_path()
- Pickleable.save()
- Wrapping.cls_dir
- Wrapping.column_only_select
- Wrapping.config
- Wrapping.group_select
- Wrapping.iloc
- Wrapping.indexing_kwargs
- Wrapping.loc
- Wrapping.range_only_select
- Wrapping.rec_state
- Wrapping.regroup()
- Wrapping.resample()
- Wrapping.resolve_column_stack_kwargs()
- Wrapping.resolve_row_stack_kwargs()
- Wrapping.resolve_self()
- Wrapping.resolve_stack_kwargs()
- Wrapping.select_col()
- Wrapping.select_col_from_obj()
- Wrapping.self_aliases
- Wrapping.split()
- Wrapping.wrapper
- Wrapping.xloc

### col_arr property

Column array.

### col_lens property

Column lengths.

Faster than ColumnMapper.col_map but only compatible with sorted columns.

### col_map property

Column map.

More flexible than ColumnMapper.col_lens. More suited for mapped arrays.

### column_stack class method

    ColumnMapper.column_stack(
        *objs,
        wrapper_kwargs=None,
        **kwargs
    )

Stack multiple ColumnMapper instances along columns.

Uses ArrayWrapper.column_stack() to stack the wrappers.

Note

Will produce a column-sorted array.

### get_col_arr method

    ColumnMapper.get_col_arr(
        group_by=None
    )

Get group-aware column array.

### get_col_lens method

    ColumnMapper.get_col_lens(
        group_by=None,
        jitted=None
    )

Get group-aware column lengths.

### get_col_map method

    ColumnMapper.get_col_map(
        group_by=None,
        jitted=None
    )

Get group-aware column map.

### get_new_id_arr method

    ColumnMapper.get_new_id_arr(
        group_by=None
    )

Generate a new group-aware id array.

### indexing_func method

    ColumnMapper.indexing_func(
        *args,
        col_mapper_meta=None,
        **kwargs
    )

Perform indexing on ColumnMapper.

### indexing_func_meta method

    ColumnMapper.indexing_func_meta(
        *args,
        wrapper_meta=None,
        **kwargs
    )

Perform indexing on ColumnMapper and return metadata.

### is_sorted method

    ColumnMapper.is_sorted(
        jitted=None
    )

Check whether column array is sorted.

### new_id_arr property

Generate a new id array.

### row_stack class method

    ColumnMapper.row_stack(
        *objs,
        wrapper_kwargs=None,
        **kwargs
    )

Stack multiple ColumnMapper instances along rows.

Uses ArrayWrapper.row_stack() to stack the wrappers.

Note

Will produce a column-sorted array.

### select_cols method

    ColumnMapper.select_cols(
        col_idxs,
        jitted=None
    )

Select columns.

Returns indices and new column array. Automatically decides whether to use column lengths or column map.

#### Cookie consent

We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.

- Google Analytics
- GitHub

Manage settings