We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d40b54e commit be98d10Copy full SHA for be98d10
patsy/util.py
@@ -598,9 +598,9 @@ def test_pandas_Categorical_from_codes():
598
599
# Needed to support pandas < 0.15
600
def pandas_Categorical_categories(cat):
601
- # In 0.15+, a categorical Series has a .cat attribute which is a
602
- # Categorical object, and Categorical objects are what have .categories /
603
- # .codes attributes.
+ # In 0.15+, a categorical Series has a .cat attribute which is similar to
+ # a Categorical object, and Categorical objects are what have .categories
+ # and .codes attributes.
604
if hasattr(cat, "cat"):
605
cat = cat.cat
606
if hasattr(cat, "categories"):
0 commit comments