Detail: IndexMicrosecond: Accessor Datetime
Overview: IndexMicrosecond: Accessor Datetime
- IndexMicrosecond.via_dt.__call__(*, fill_value)
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.__call__(*, fill_value)[source]
- Parameters:
fill_value – If NAT are encountered, use this value.
>>> ix = sf.IndexMicrosecond(('1620-09-16', 'NaT', '1620-11-21')) >>> ix <IndexMicrosecond> 1620-09-16T00:00:00.000000 NaT 1620-11-21T00:00:00.000000 <datetime64[us]> >>> ix.via_dt(fill_value=-1).year [1620 -1 1620]
- IndexMicrosecond.via_dt.year
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.year
Return the year of each element.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.year [1517 1517 1517]
- IndexMicrosecond.via_dt.year_month
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.year_month
Return the year and month of each element as string formatted YYYY-MM.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.year_month ['1517-04' '1517-12' '1517-06']
- IndexMicrosecond.via_dt.year_quarter
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.year_quarter
Return the year and quarter of each element as a string formatted YYYY-QQ.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.year_quarter ['1517-Q2' '1517-Q4' '1517-Q2']
- IndexMicrosecond.via_dt.month
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.month
Return the month of each element, between 1 and 12 inclusive.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.month [ 4 12 6]
- IndexMicrosecond.via_dt.day
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.day
Return the day of each element, between 1 and the number of days in the given month of the given year.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.day [ 1 31 30]
- IndexMicrosecond.via_dt.hour
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.hour
Return the hour of each element, between 0 and 24.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.hour [0 0 0]
- IndexMicrosecond.via_dt.minute
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.minute
Return the minute of each element, between 0 and 60.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.minute [0 0 0]
- IndexMicrosecond.via_dt.second
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.second
Return the second of each element, between 0 and 60.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.second [0 0 0]
- IndexMicrosecond.via_dt.weekday
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.weekday()[source]
Return the day of the week as an integer, where Monday is 0 and Sunday is 6.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.weekday() [6 0 5]
- IndexMicrosecond.via_dt.quarter
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.quarter()[source]
Return the quarter of the year as an integer, where January through March is quarter 1.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.quarter() [2 4 2]
- IndexMicrosecond.via_dt.is_month_end
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.is_month_end()[source]
Return Boolean indicators if the day is the month end.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.is_month_end() [False True True]
- IndexMicrosecond.via_dt.is_month_start
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.is_month_start()[source]
Return Boolean indicators if the day is the month start.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.is_month_start() [ True False False]
- IndexMicrosecond.via_dt.is_year_end
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.is_year_end()[source]
Return Boolean indicators if the day is the year end.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.is_year_end() [False True False]
- IndexMicrosecond.via_dt.is_year_start
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.is_year_start()[source]
Return Boolean indicators if the day is the year start.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.is_year_start() [False False False]
- IndexMicrosecond.via_dt.is_quarter_end
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.is_quarter_end()[source]
Return Boolean indicators if the day is the quarter end.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.is_quarter_end() [False True True]
- IndexMicrosecond.via_dt.is_quarter_start
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.is_quarter_start()[source]
Return Boolean indicators if the day is the quarter start.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.is_quarter_start() [ True False False]
- IndexMicrosecond.via_dt.timetuple
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.timetuple()[source]
Return a
time.struct_time
such as returned by time.localtime().
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.timetuple() [time.struct_time(tm_year=1517, tm_mon=4, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=91, tm_isdst=-1) time.struct_time(tm_year=1517, tm_mon=12, tm_mday=31, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=365, tm_isdst=-1) time.struct_time(tm_year=1517, tm_mon=6, tm_mday=30, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=5, tm_yday=181, tm_isdst=-1)]
- IndexMicrosecond.via_dt.isoformat(sep, timespec)
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.isoformat(sep='T', timespec='auto')[source]
Return a string representing the date in ISO 8601 format, YYYY-MM-DD.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.isoformat() ['1517-04-01T00:00:00' '1517-12-31T00:00:00' '1517-06-30T00:00:00']
- IndexMicrosecond.via_dt.fromisoformat
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.fromisoformat()[source]
Return a
datetime.date
object from an ISO 8601 format.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.fromisoformat() RuntimeError('invalid dtype (datetime64[us]) for operation on string types')
- IndexMicrosecond.via_dt.strftime(format)
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.strftime(format)[source]
Return a string representing the date, controlled by an explicit
format
string.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.strftime("%A | %B") ['Sunday | April' 'Monday | December' 'Saturday | June']
- IndexMicrosecond.via_dt.strptime(format)
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.strptime(format)[source]
Return a Python datetime object from parsing a string defined with
format
.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.strptime("%m/%d/%Y") RuntimeError('invalid dtype (datetime64[us]) for operation on string types')
- IndexMicrosecond.via_dt.strpdate(format)
- IndexMicrosecond.via_dt
Interface for applying datetime properties and methods to elements in this container.
- InterfaceDatetime.strpdate(format)[source]
Return a Python date object from parsing a string defined with
format
.
>>> ix = sf.IndexMicrosecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMicrosecond> 1517-04-01T00:00:00.000000 1517-12-31T00:00:00.000000 1517-06-30T00:00:00.000000 <datetime64[us]> >>> ix.via_dt.strpdate("%m/%d/%Y") RuntimeError('invalid dtype (datetime64[us]) for operation on string types')
IndexMicrosecond: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic