Skip to content

Commit 5d5173b

Browse files
committed
Fixup doc
1 parent 5ed4be7 commit 5d5173b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/source/advanced.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,11 @@ and allows efficient indexing and storage of an index with a large number of dup
638638

639639
.. ipython:: python
640640
641+
from pandas.api.types import CategoricalDtype
642+
641643
df = pd.DataFrame({'A': np.arange(6),
642644
'B': list('aabbca')})
643-
df['B'] = df['B'].astype(pd.api.types.CategoricalDtype(list('cab')))
645+
df['B'] = df['B'].astype(CategoricalDtype(list('cab')))
644646
df
645647
df.dtypes
646648
df.B.cat.categories

0 commit comments

Comments
 (0)