Loading tutorials
int64 and object, and have used groupby and value_counts. Later chapters cover the details of creating and managing categoricals. This one explains why3 min readint64 and object, and have used groupby and value_counts. It covers the ways to create a categorical column and what happens to values that don't fit the categories.2 min readint64 and object, and have used value_counts. You will learn what a categorical Series holds internally and how to inspect it through the .cat accessor.2 min readastype("category"), and that you know what object and int64 dtypes are. Here you will measure what a categorical saves, find the point where it stops helping, and time an operation yourself.2 min readastype("category") and know that a categorical holds a fixed set of categories plus integer codes. If not, review the earlier chapters on creating categoricals and on categories and codes.2 min read.cat.categories and .cat.codes, as covered earlier. The .cat accessor also lets you change the category set. Categories are a fixed list, so changes fall into two kinds. Some only edit the list. Others change what the rows m2 min read.cat, isna, and fillna on ordinary Series.3 min readvalue_counts. It also assumes you know that a categorical stores categories plus integer codes. Here you will turn a numeric column into a categorical column. This is called binning.3 min readgroupby, and that you know a categorical column has a fixed list of categories that can include values the data never uses. The question here is what groupby does with a category that has no rows.2 min read.cat accessor works, and how pd.concat stacks Series. The problem here is that two categoricals can hold the same kind of data but carry different category sets. That happens often when data comes from s2 min readastype("category") and CategoricalDtype, and that you know the .cat accessor. It covers what happens to a categorical column when it is saved to a file and loaded again.2 min read.cat accessor, ordered categoricals, and groupby with observed. It collects the mistakes that come up most often and the habits that prevent them.2 min read