paniz package

Submodules

paniz.paniz module

paniz.paniz.catbind(a, b)[source]

Concatenates two pandas categoricals.

Parameters
  • a (pandas.core.arrays.categorical.Categorical) – A pandas categorical.

  • b (pandas.core.arrays.categorical.Categorical) – A pandas categorical that you wish to concatenate to a.

Returns

The new concatenated pandas categorical.

Return type

pandas.core.arrays.categorical.Categorical

Examples

>>> from pypkgs import pypkgs
>>> import pandas as pd
>>> a = pd.Categorical(["character", "hits", "your", "eyeballs"])
>>> b = pd.Categorical(["but", "integer", "where it", "counts"])
>>> pypkgs.catbind(a, b)
[character, hits, your, eyeballs, but, integer, where it, counts]
Categories (8, object): [but, character, counts,
eyeballs, hits, integer, where it, your]

Module contents