Skip to content

Commit 12d9938

Browse files
committed
DOC: doc fixups
1 parent d6ceeba commit 12d9938

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/source/categorical.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -526,11 +526,13 @@ type:
526526

527527
.. ipython:: python
528528
529-
str_cat = pd.Series(list('aabb')).astype('category')
529+
str_s = pd.Series(list('aabb'))
530+
str_cat = str_s.astype('category')
530531
str_cat
531532
str_cat.str.contains("a")
532533
533-
date_cat = pd.Series(pd.date_range('1/1/2015', periods=5)).astype('category')
534+
date_s = pd.Series(pd.date_range('1/1/2015', periods=5))
535+
date_cat = date_s.astype('category')
534536
date_cat
535537
date_cat.dt.day
536538

0 commit comments

Comments
 (0)