@@ -470,6 +470,7 @@ These can be accessed like ``Series.dt.<property>``.
470
470
Series.dt.microsecond
471
471
Series.dt.nanosecond
472
472
Series.dt.second
473
+ Series.dt.week
473
474
Series.dt.weekofyear
474
475
Series.dt.dayofweek
475
476
Series.dt.weekday
@@ -481,6 +482,10 @@ These can be accessed like ``Series.dt.<property>``.
481
482
Series.dt.is_quarter_end
482
483
Series.dt.is_year_start
483
484
Series.dt.is_year_end
485
+ Series.dt.daysinmonth
486
+ Series.dt.days_in_month
487
+ Series.dt.tz
488
+ Series.dt.freq
484
489
485
490
**Datetime Methods **
486
491
@@ -575,29 +580,49 @@ strings and apply several methods to it. These can be acccessed like
575
580
Series.str.isdecimal
576
581
Series.str.get_dummies
577
582
583
+ ..
584
+ The following is needed to ensure the generated pages are created with the
585
+ correct template (otherwise they would be created in the Series class page)
586
+
587
+ ..
588
+ .. autosummary::
589
+ :toctree: generated/
590
+ :template: autosummary/accessor.rst
591
+
592
+ Series.str
593
+ Series.cat
594
+ Series.dt
595
+
596
+
578
597
.. _api.categorical :
579
598
580
599
Categorical
581
600
~~~~~~~~~~~
582
601
583
602
If the Series is of dtype ``category ``, ``Series.cat `` can be used to change the the categorical
584
603
data. This accessor is similar to the ``Series.dt `` or ``Series.str `` and has the
585
- following usable methods and properties (all available as ``Series.cat.<method_or_property> ``).
604
+ following usable methods and properties:
605
+
606
+ .. autosummary ::
607
+ :toctree: generated/
608
+ :template: autosummary/accessor_attribute.rst
609
+
610
+ Series.cat.categories
611
+ Series.cat.ordered
612
+ Series.cat.codes
586
613
587
614
.. autosummary ::
588
615
:toctree: generated/
616
+ :template: autosummary/accessor_method.rst
589
617
590
- Categorical.categories
591
- Categorical.ordered
592
- Categorical.rename_categories
593
- Categorical.reorder_categories
594
- Categorical.add_categories
595
- Categorical.remove_categories
596
- Categorical.remove_unused_categories
597
- Categorical.set_categories
598
- Categorical.as_ordered
599
- Categorical.as_unordered
600
- Categorical.codes
618
+ Series.cat.rename_categories
619
+ Series.cat.reorder_categories
620
+ Series.cat.add_categories
621
+ Series.cat.remove_categories
622
+ Series.cat.remove_unused_categories
623
+ Series.cat.set_categories
624
+ Series.cat.as_ordered
625
+ Series.cat.as_unordered
601
626
602
627
To create a Series of dtype ``category ``, use ``cat = s.astype("category") ``.
603
628
@@ -606,8 +631,13 @@ adding ordering information or special categories is need at creation time of th
606
631
607
632
.. autosummary ::
608
633
:toctree: generated/
634
+ :template: autosummary/class_without_autosummary.rst
609
635
610
636
Categorical
637
+
638
+ .. autosummary ::
639
+ :toctree: generated/
640
+
611
641
Categorical.from_codes
612
642
613
643
``np.asarray(categorical) `` works by implementing the array interface. Be aware, that this converts
0 commit comments