Detail: IndexYearMonthGO: Constructor¶
Overview: IndexYearMonthGO: Constructor
- IndexYearMonthGO.__init__(labels, *, name=<object object>, loc_is_iloc=False)¶
Initializer.
- Parameters:
labels – Iterable of hashable values to be used as the index labels. If strings, NumPy datetime conversions will be applied.
name – A hashable object to label the container.
>>> sf.IndexYearMonthGO(('1517-04', '1517-12', '1517-06')) <IndexYearMonthGO> 1517-04 1517-12 1517-06 <datetime64[M]>
- classmethod IndexYearMonthGO.from_date_range(start, stop, step=1, *, name=None)¶
Get an IndexYearMonth instance over a range of dates, where start and stop is inclusive.
>>> sf.IndexYearMonthGO.from_date_range('2021-12-30', '2022-01-02') <IndexYearMonthGO> 2021-12 2022-01 <datetime64[M]>
- classmethod IndexYearMonthGO.from_labels(labels, *, name=None)¶
Construct an
Index
from an iterable of labels, where each label is a hashable. Provided for a compatible interface toIndexHierarchy
.>>> sf.IndexYearMonthGO.from_labels(('1517-04', '1517-12', '1517-06')) <IndexYearMonthGO> 1517-04 1517-12 1517-06 <datetime64[M]>
- classmethod IndexYearMonthGO.from_pandas(value)¶
Given a Pandas index, return the appropriate IndexBase derived class.
>>> ix = pd.Index(('1517-04', '1517-12', '1517-06')) >>> sf.IndexYearMonthGO.from_pandas(ix) <IndexGO> 1517-04 1517-12 1517-06 <object>
- classmethod IndexYearMonthGO.from_year_month_range(start, stop, step=1, *, name=None)¶
Get an IndexYearMonth instance over a range of months, where start and end are inclusive.
>>> sf.IndexYearMonthGO.from_year_month_range('2021-12', '2022-01') <IndexYearMonthGO> 2021-12 2022-01 <datetime64[M]>
- classmethod IndexYearMonthGO.from_year_range(start, stop, step=1, *, name=None)¶
Get an IndexYearMonth instance over a range of years, where start and end are inclusive.
>>> sf.IndexYearMonthGO.from_year_range('2021', '2022') <IndexYearMonthGO> 2021-01 2021-02 2021-03 2021-04 2021-05 2021-06 2021-07 2021-08 2021-09 2021-10 2021-11 2021-12 2022-01 2022-02 2022-03 2022-04 2022-05 2022-06 2022-07 2022-08 2022-09 2022-10 2022-11 2022-12 <datetime64[M]>
IndexYearMonthGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Regular Expression | Accessor Hashlib