Skip to contents

Convert an R factor to a Pandas Categorical

Usage

to_pandas_categorical(Values, pd)

Arguments

Values

R factor vector to be converted

pd

Reference to the Python pandas module

Value

A Python pandas.Categorical object