Top "Categorical-data" questions

Statistical data type whose value is one of a fixed number of nominal categories.

Any way to get mappings of a label encoder in Python pandas?

I am converting strings to categorical values in my dataset using the following piece of code. data['weekday'] = pd.Categorical.…

python pandas categorical-data
Get a list of categories of categorical variable (Python Pandas)

I have a pandas DataFrame with a column representing a categorical variable. How can I get a list of the …

python pandas categorical-data
Converting categorical values to binary using pandas

I am trying to convert categorical values into binary values using pandas. The idea is to consider every unique categorical …

python numpy pandas type-conversion categorical-data
Getting ValueError: y contains new labels when using scikit learn's LabelEncoder

I have a series like: df['ID'] = ['ABC123', 'IDF345', ...] I'm using scikit's LabelEncoder to convert it to numerical …

python machine-learning encoding scikit-learn categorical-data
Correlation among multiple categorical variables (Pandas)

I have a data set made of 22 categorical variables (non-ordered). I would like to visualize their correlation in a nice …

python pandas statistics heatmap categorical-data
Create dummies from column with multiple values in pandas

I am looking for for a pythonic way to handle the following problem. The pandas.get_dummies() method is great …

python pandas dummy-data categorical-data
Generating Multiple Plots in ggplot by Factor

I have a data set that I want to generate multiple plots for based on one of the columns. That …

r ggplot2 categorical-data
How (and why) do you use contrasts?

Under what cases do you create contrasts in your analysis? How is it done and what is it used for? …

r linear-regression categorical-data contrast
OneHotEncoder categorical_features deprecated, how to transform specific column

I need to transform the independent field from string to arithmetical notation. I am using OneHotEncoder for the transformation. My …

python machine-learning categorical-data one-hot-encoding
Crosstab with multiple items

In SPSS, it is (relatively) easy to create a cross tab with multiple variables using the factors (or values) as …

r crosstab categorical-data