neulab/docprompting-conala huggingface dataset:
pandas.DatetimeIndex.indexer_between_time   DatetimeIndex.indexer_between_time(start_time, end_time, include_start=True, include_end=True)[source]
 
Return index locations of values between particular times of day (e.g., 9:00-9:30AM).  Parameters 
 
start_time, end_time:datetime.time, str


Time passed either as object (datetime.time) or as string in appropriate format (“%H:%M”, “%H%M”, “%I:%M%p”, “%I%M%p”, “%H:%M:%S”, “%H%M%S”, “%I:%M:%S%p”,”%I%M%S%p”).  
include_start:bool, default True


include_end:bool, default True

  Returns 
 np.ndarray[np.intp]
    See also  indexer_at_time

Get index locations of values at particular time of day.  DataFrame.between_time

Select values between particular times of day.
pandas.DatetimeIndex.inferred_freq   DatetimeIndex.inferred_freq
 
Tries to return a string representing a frequency guess, generated by infer_freq. Returns None if it can’t autodetect the frequency.
pandas.DatetimeIndex.is_leap_year   propertyDatetimeIndex.is_leap_year
 
Boolean indicator if the date belongs to a leap year. A leap year is a year, which has 366 days (instead of 365) including 29th of February as an intercalary day. Leap years are years which are multiples of four with the exception of years divisible by 100 but not by 400.  Returns 
 Series or ndarray

Booleans indicating if dates belong to a leap year.     Examples This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex. 
>>> idx = pd.date_range("2012-01-01", "2015-01-01", freq="Y")
>>> idx
DatetimeIndex(['2012-12-31', '2013-12-31', '2014-12-31'],
              dtype='datetime64[ns]', freq='A-DEC')
>>> idx.is_leap_year
array([ True, False, False])
  
>>> dates_series = pd.Series(idx)
>>> dates_series
0   2012-12-31
1   2013-12-31
2   2014-12-31
dtype: datetime64[ns]
>>> dates_series.dt.is_leap_year
0     True
1    False
2    False
dtype: bool
pandas.DatetimeIndex.is_month_end   propertyDatetimeIndex.is_month_end
 
Indicates whether the date is the last day of the month.  Returns 
 Series or array

For Series, returns a Series with boolean values. For DatetimeIndex, returns a boolean array.      See also  is_month_start

Return a boolean indicating whether the date is the first day of the month.  is_month_end

Return a boolean indicating whether the date is the last day of the month.    Examples This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex. 
>>> s = pd.Series(pd.date_range("2018-02-27", periods=3))
>>> s
0   2018-02-27
1   2018-02-28
2   2018-03-01
dtype: datetime64[ns]
>>> s.dt.is_month_start
0    False
1    False
2    True
dtype: bool
>>> s.dt.is_month_end
0    False
1    True
2    False
dtype: bool
  
>>> idx = pd.date_range("2018-02-27", periods=3)
>>> idx.is_month_start
array([False, False, True])
>>> idx.is_month_end
array([False, True, False])
pandas.DatetimeIndex.is_month_start   propertyDatetimeIndex.is_month_start
 
Indicates whether the date is the first day of the month.  Returns 
 Series or array

For Series, returns a Series with boolean values. For DatetimeIndex, returns a boolean array.      See also  is_month_start

Return a boolean indicating whether the date is the first day of the month.  is_month_end

Return a boolean indicating whether the date is the last day of the month.    Examples This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex. 
>>> s = pd.Series(pd.date_range("2018-02-27", periods=3))
>>> s
0   2018-02-27
1   2018-02-28
2   2018-03-01
dtype: datetime64[ns]
>>> s.dt.is_month_start
0    False
1    False
2    True
dtype: bool
>>> s.dt.is_month_end
0    False
1    True
2    False
dtype: bool
  
>>> idx = pd.date_range("2018-02-27", periods=3)
>>> idx.is_month_start
array([False, False, True])
>>> idx.is_month_end
array([False, True, False])
pandas.DatetimeIndex.is_quarter_end   propertyDatetimeIndex.is_quarter_end
 
Indicator for whether the date is the last day of a quarter.  Returns 
 
is_quarter_end:Series or DatetimeIndex


The same type as the original data with boolean values. Series will have the same name and index. DatetimeIndex will have the same name.      See also  quarter

Return the quarter of the date.  is_quarter_start

Similar property indicating the quarter start.    Examples This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex. 
>>> df = pd.DataFrame({'dates': pd.date_range("2017-03-30",
...                    periods=4)})
>>> df.assign(quarter=df.dates.dt.quarter,
...           is_quarter_end=df.dates.dt.is_quarter_end)
       dates  quarter    is_quarter_end
0 2017-03-30        1             False
1 2017-03-31        1              True
2 2017-04-01        2             False
3 2017-04-02        2             False
  
>>> idx = pd.date_range('2017-03-30', periods=4)
>>> idx
DatetimeIndex(['2017-03-30', '2017-03-31', '2017-04-01', '2017-04-02'],
              dtype='datetime64[ns]', freq='D')
  
>>> idx.is_quarter_end
array([False,  True, False, False])
pandas.DatetimeIndex.is_quarter_start   propertyDatetimeIndex.is_quarter_start
 
Indicator for whether the date is the first day of a quarter.  Returns 
 
is_quarter_start:Series or DatetimeIndex


The same type as the original data with boolean values. Series will have the same name and index. DatetimeIndex will have the same name.      See also  quarter

Return the quarter of the date.  is_quarter_end

Similar property for indicating the quarter start.    Examples This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex. 
>>> df = pd.DataFrame({'dates': pd.date_range("2017-03-30",
...                   periods=4)})
>>> df.assign(quarter=df.dates.dt.quarter,
...           is_quarter_start=df.dates.dt.is_quarter_start)
       dates  quarter  is_quarter_start
0 2017-03-30        1             False
1 2017-03-31        1             False
2 2017-04-01        2              True
3 2017-04-02        2             False
  
>>> idx = pd.date_range('2017-03-30', periods=4)
>>> idx
DatetimeIndex(['2017-03-30', '2017-03-31', '2017-04-01', '2017-04-02'],
              dtype='datetime64[ns]', freq='D')
  
>>> idx.is_quarter_start
array([False, False,  True, False])
pandas.DatetimeIndex.is_year_end   propertyDatetimeIndex.is_year_end
 
Indicate whether the date is the last day of the year.  Returns 
 Series or DatetimeIndex

The same type as the original data with boolean values. Series will have the same name and index. DatetimeIndex will have the same name.      See also  is_year_start

Similar property indicating the start of the year.    Examples This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex. 
>>> dates = pd.Series(pd.date_range("2017-12-30", periods=3))
>>> dates
0   2017-12-30
1   2017-12-31
2   2018-01-01
dtype: datetime64[ns]
  
>>> dates.dt.is_year_end
0    False
1     True
2    False
dtype: bool
  
>>> idx = pd.date_range("2017-12-30", periods=3)
>>> idx
DatetimeIndex(['2017-12-30', '2017-12-31', '2018-01-01'],
              dtype='datetime64[ns]', freq='D')
  
>>> idx.is_year_end
array([False,  True, False])
pandas.DatetimeIndex.is_year_start   propertyDatetimeIndex.is_year_start
 
Indicate whether the date is the first day of a year.  Returns 
 Series or DatetimeIndex

The same type as the original data with boolean values. Series will have the same name and index. DatetimeIndex will have the same name.      See also  is_year_end

Similar property indicating the last day of the year.    Examples This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex. 
>>> dates = pd.Series(pd.date_range("2017-12-30", periods=3))
>>> dates
0   2017-12-30
1   2017-12-31
2   2018-01-01
dtype: datetime64[ns]
  
>>> dates.dt.is_year_start
0    False
1    False
2    True
dtype: bool
  
>>> idx = pd.date_range("2017-12-30", periods=3)
>>> idx
DatetimeIndex(['2017-12-30', '2017-12-31', '2018-01-01'],
              dtype='datetime64[ns]', freq='D')
  
>>> idx.is_year_start
array([False, False,  True])
pandas.DatetimeIndex.mean   DatetimeIndex.mean(*args, **kwargs)[source]
 
Return the mean value of the Array.  New in version 0.25.0.   Parameters 
 
skipna:bool, default True


Whether to ignore any NaT elements.  
axis:int, optional, default 0

  Returns 
 scalar

Timestamp or Timedelta.      See also  numpy.ndarray.mean

Returns the average of array elements along a given axis.  Series.mean

Return the mean value in a Series.    Notes mean is only defined for Datetime and Timedelta dtypes, not for Period.
pandas.DatetimeIndex.microsecond   propertyDatetimeIndex.microsecond
 
The microseconds of the datetime. Examples 
>>> datetime_series = pd.Series(
...     pd.date_range("2000-01-01", periods=3, freq="us")
... )
>>> datetime_series
0   2000-01-01 00:00:00.000000
1   2000-01-01 00:00:00.000001
2   2000-01-01 00:00:00.000002
dtype: datetime64[ns]
>>> datetime_series.dt.microsecond
0       0
1       1
2       2
dtype: int64
pandas.DatetimeIndex.minute   propertyDatetimeIndex.minute
 
The minutes of the datetime. Examples 
>>> datetime_series = pd.Series(
...     pd.date_range("2000-01-01", periods=3, freq="T")
... )
>>> datetime_series
0   2000-01-01 00:00:00
1   2000-01-01 00:01:00
2   2000-01-01 00:02:00
dtype: datetime64[ns]
>>> datetime_series.dt.minute
0    0
1    1
2    2
dtype: int64
pandas.DatetimeIndex.month   propertyDatetimeIndex.month
 
The month as January=1, December=12. Examples 
>>> datetime_series = pd.Series(
...     pd.date_range("2000-01-01", periods=3, freq="M")
... )
>>> datetime_series
0   2000-01-31
1   2000-02-29
2   2000-03-31
dtype: datetime64[ns]
>>> datetime_series.dt.month
0    1
1    2
2    3
dtype: int64
pandas.DatetimeIndex.month_name   DatetimeIndex.month_name(*args, **kwargs)[source]
 
Return the month names of the DateTimeIndex with specified locale.  Parameters 
 
locale:str, optional


Locale determining the language in which to return the month name. Default is English locale.    Returns 
 Index

Index of month names.     Examples 
>>> idx = pd.date_range(start='2018-01', freq='M', periods=3)
>>> idx
DatetimeIndex(['2018-01-31', '2018-02-28', '2018-03-31'],
              dtype='datetime64[ns]', freq='M')
>>> idx.month_name()
Index(['January', 'February', 'March'], dtype='object')
pandas.DatetimeIndex.nanosecond   propertyDatetimeIndex.nanosecond
 
The nanoseconds of the datetime. Examples 
>>> datetime_series = pd.Series(
...     pd.date_range("2000-01-01", periods=3, freq="ns")
... )
>>> datetime_series
0   2000-01-01 00:00:00.000000000
1   2000-01-01 00:00:00.000000001
2   2000-01-01 00:00:00.000000002
dtype: datetime64[ns]
>>> datetime_series.dt.nanosecond
0       0
1       1
2       2
dtype: int64
pandas.DatetimeIndex.normalize   DatetimeIndex.normalize(*args, **kwargs)[source]
 
Convert times to midnight. The time component of the date-time is converted to midnight i.e. 00:00:00. This is useful in cases, when the time does not matter. Length is unaltered. The timezones are unaffected. This method is available on Series with datetime values under the .dt accessor, and directly on Datetime Array/Index.  Returns 
 DatetimeArray, DatetimeIndex or Series

The same type as the original data. Series will have the same name and index. DatetimeIndex will have the same name.      See also  floor

Floor the datetimes to the specified freq.  ceil

Ceil the datetimes to the specified freq.  round

Round the datetimes to the specified freq.    Examples 
>>> idx = pd.date_range(start='2014-08-01 10:00', freq='H',
...                     periods=3, tz='Asia/Calcutta')
>>> idx
DatetimeIndex(['2014-08-01 10:00:00+05:30',
               '2014-08-01 11:00:00+05:30',
               '2014-08-01 12:00:00+05:30'],
                dtype='datetime64[ns, Asia/Calcutta]', freq='H')
>>> idx.normalize()
DatetimeIndex(['2014-08-01 00:00:00+05:30',
               '2014-08-01 00:00:00+05:30',
               '2014-08-01 00:00:00+05:30'],
               dtype='datetime64[ns, Asia/Calcutta]', freq=None)
pandas.DatetimeIndex.quarter   propertyDatetimeIndex.quarter
 
The quarter of the date.
pandas.DatetimeIndex.round   DatetimeIndex.round(*args, **kwargs)[source]
 
Perform round operation on the data to the specified freq.  Parameters 
 
freq:str or Offset


The frequency level to round the index to. Must be a fixed frequency like ‘S’ (second) not ‘ME’ (month end). See frequency aliases for a list of possible freq values.  
ambiguous:‘infer’, bool-ndarray, ‘NaT’, default ‘raise’


Only relevant for DatetimeIndex:  ‘infer’ will attempt to infer fall dst-transition hours based on order bool-ndarray where True signifies a DST time, False designates a non-DST time (note that this flag is only applicable for ambiguous times) ‘NaT’ will return NaT where there are ambiguous times ‘raise’ will raise an AmbiguousTimeError if there are ambiguous times.   
nonexistent:‘shift_forward’, ‘shift_backward’, ‘NaT’, timedelta, default ‘raise’


A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST.  ‘shift_forward’ will shift the nonexistent time forward to the closest existing time ‘shift_backward’ will shift the nonexistent time backward to the closest existing time ‘NaT’ will return NaT where there are nonexistent times timedelta objects will shift nonexistent times by the timedelta ‘raise’ will raise an NonExistentTimeError if there are nonexistent times.     Returns 
 DatetimeIndex, TimedeltaIndex, or Series

Index of the same type for a DatetimeIndex or TimedeltaIndex, or a Series with the same index for a Series.    Raises 
 ValueError if the freq cannot be converted.
   Notes If the timestamps have a timezone, rounding will take place relative to the local (“wall”) time and re-localized to the same timezone. When rounding near daylight savings time, use nonexistent and ambiguous to control the re-localization behavior. Examples DatetimeIndex 
>>> rng = pd.date_range('1/1/2018 11:59:00', periods=3, freq='min')
>>> rng
DatetimeIndex(['2018-01-01 11:59:00', '2018-01-01 12:00:00',
               '2018-01-01 12:01:00'],
              dtype='datetime64[ns]', freq='T')
>>> rng.round('H')
DatetimeIndex(['2018-01-01 12:00:00', '2018-01-01 12:00:00',
               '2018-01-01 12:00:00'],
              dtype='datetime64[ns]', freq=None)
  Series 
>>> pd.Series(rng).dt.round("H")
0   2018-01-01 12:00:00
1   2018-01-01 12:00:00
2   2018-01-01 12:00:00
dtype: datetime64[ns]
  When rounding near a daylight savings time transition, use ambiguous or nonexistent to control how the timestamp should be re-localized. 
>>> rng_tz = pd.DatetimeIndex(["2021-10-31 03:30:00"], tz="Europe/Amsterdam")
  
>>> rng_tz.floor("2H", ambiguous=False)
DatetimeIndex(['2021-10-31 02:00:00+01:00'],
              dtype='datetime64[ns, Europe/Amsterdam]', freq=None)
  
>>> rng_tz.floor("2H", ambiguous=True)
DatetimeIndex(['2021-10-31 02:00:00+02:00'],
              dtype='datetime64[ns, Europe/Amsterdam]', freq=None)
pandas.DatetimeIndex.second   propertyDatetimeIndex.second
 
The seconds of the datetime. Examples 
>>> datetime_series = pd.Series(
...     pd.date_range("2000-01-01", periods=3, freq="s")
... )
>>> datetime_series
0   2000-01-01 00:00:00
1   2000-01-01 00:00:01
2   2000-01-01 00:00:02
dtype: datetime64[ns]
>>> datetime_series.dt.second
0    0
1    1
2    2
dtype: int64
pandas.DatetimeIndex.snap   DatetimeIndex.snap(freq='S')[source]
 
Snap time stamps to nearest occurring frequency.  Returns 
 DatetimeIndex
pandas.DatetimeIndex.std   DatetimeIndex.std(*args, **kwargs)[source]
 
Return sample standard deviation over requested axis. Normalized by N-1 by default. This can be changed using the ddof argument  Parameters 
 
axis:int optional, default None


Axis for the function to be applied on.  
ddof:int, default 1


Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements.  
skipna:bool, default True


Exclude NA/null values. If an entire row/column is NA, the result will be NA.    Returns 
 Timedelta
pandas.DatetimeIndex.strftime   DatetimeIndex.strftime(*args, **kwargs)[source]
 
Convert to Index using specified date_format. Return an Index of formatted strings specified by date_format, which supports the same string format as the python standard library. Details of the string format can be found in python string format doc.  Parameters 
 
date_format:str


Date format string (e.g. “%Y-%m-%d”).    Returns 
 ndarray[object]

NumPy ndarray of formatted strings.      See also  to_datetime

Convert the given argument to datetime.  DatetimeIndex.normalize

Return DatetimeIndex with times to midnight.  DatetimeIndex.round

Round the DatetimeIndex to the specified freq.  DatetimeIndex.floor

Floor the DatetimeIndex to the specified freq.    Examples 
>>> rng = pd.date_range(pd.Timestamp("2018-03-10 09:00"),
...                     periods=3, freq='s')
>>> rng.strftime('%B %d, %Y, %r')
Index(['March 10, 2018, 09:00:00 AM', 'March 10, 2018, 09:00:01 AM',
       'March 10, 2018, 09:00:02 AM'],
      dtype='object')
pandas.DatetimeIndex.time   propertyDatetimeIndex.time
 
Returns numpy array of datetime.time objects. The time part of the Timestamps.
pandas.DatetimeIndex.timetz   propertyDatetimeIndex.timetz
 
Returns numpy array of datetime.time objects with timezone information. The time part of the Timestamps.
pandas.DatetimeIndex.to_frame   DatetimeIndex.to_frame(index=True, name=NoDefault.no_default)[source]
 
Create a DataFrame with a column containing the Index.  Parameters 
 
index:bool, default True


Set the index of the returned DataFrame as the original Index.  
name:object, default None


The passed name should substitute for the index name (if it has one).    Returns 
 DataFrame

DataFrame containing the original Index data.      See also  Index.to_series

Convert an Index to a Series.  Series.to_frame

Convert Series to DataFrame.    Examples 
>>> idx = pd.Index(['Ant', 'Bear', 'Cow'], name='animal')
>>> idx.to_frame()
       animal
animal
Ant       Ant
Bear     Bear
Cow       Cow
  By default, the original Index is reused. To enforce a new Index: 
>>> idx.to_frame(index=False)
    animal
0   Ant
1  Bear
2   Cow
  To override the name of the resulting column, specify name: 
>>> idx.to_frame(index=False, name='zoo')
    zoo
0   Ant
1  Bear
2   Cow
pandas.DatetimeIndex.to_period   DatetimeIndex.to_period(*args, **kwargs)[source]
 
Cast to PeriodArray/Index at a particular frequency. Converts DatetimeArray/Index to PeriodArray/Index.  Parameters 
 
freq:str or Offset, optional


One of pandas’ offset strings or an Offset object. Will be inferred by default.    Returns 
 PeriodArray/Index
  Raises 
 ValueError

When converting a DatetimeArray/Index with non-regular values, so that a frequency cannot be inferred.      See also  PeriodIndex

Immutable ndarray holding ordinal values.  DatetimeIndex.to_pydatetime

Return DatetimeIndex as object.    Examples 
>>> df = pd.DataFrame({"y": [1, 2, 3]},
...                   index=pd.to_datetime(["2000-03-31 00:00:00",
...                                         "2000-05-31 00:00:00",
...                                         "2000-08-31 00:00:00"]))
>>> df.index.to_period("M")
PeriodIndex(['2000-03', '2000-05', '2000-08'],
            dtype='period[M]')
  Infer the daily frequency 
>>> idx = pd.date_range("2017-01-01", periods=2)
>>> idx.to_period()
PeriodIndex(['2017-01-01', '2017-01-02'],
            dtype='period[D]')
pandas.DatetimeIndex.to_perioddelta   DatetimeIndex.to_perioddelta(freq)[source]
 
Calculate TimedeltaArray of difference between index values and index converted to PeriodArray at specified freq. Used for vectorized offsets.  Parameters 
 
freq:Period frequency

  Returns 
 TimedeltaArray/Index
pandas.DatetimeIndex.to_pydatetime   DatetimeIndex.to_pydatetime(*args, **kwargs)[source]
 
Return Datetime Array/Index as object ndarray of datetime.datetime objects.  Returns 
 
datetimes:ndarray[object]
pandas.DatetimeIndex.to_series   DatetimeIndex.to_series(keep_tz=NoDefault.no_default, index=None, name=None)[source]
 
Create a Series with both index and values equal to the index keys useful with map for returning an indexer based on an index.  Parameters 
 
keep_tz:optional, defaults True


Return the data keeping the timezone. If keep_tz is True:  
If the timezone is not set, the resulting Series will have a datetime64[ns] dtype. Otherwise the Series will have an datetime64[ns, tz] dtype; the tz will be preserved. 
 If keep_tz is False:  
Series will have a datetime64[ns] dtype. TZ aware objects will have the tz removed. 
  Changed in version 1.0.0: The default value is now True. In a future version, this keyword will be removed entirely. Stop passing the argument to obtain the future behavior and silence the warning.   
index:Index, optional


Index of resulting Series. If None, defaults to original index.  
name:str, optional


Name of resulting Series. If None, defaults to name of original index.    Returns 
 Series
pandas.DatetimeIndex.tz   propertyDatetimeIndex.tz
 
Return the timezone.  Returns 
 datetime.tzinfo, pytz.tzinfo.BaseTZInfo, dateutil.tz.tz.tzfile, or None

Returns None when the array is tz-naive.
pandas.DatetimeIndex.tz_convert   DatetimeIndex.tz_convert(tz)[source]
 
Convert tz-aware Datetime Array/Index from one time zone to another.  Parameters 
 
tz:str, pytz.timezone, dateutil.tz.tzfile or None


Time zone for time. Corresponding timestamps would be converted to this time zone of the Datetime Array/Index. A tz of None will convert to UTC and remove the timezone information.    Returns 
 Array or Index
  Raises 
 TypeError

If Datetime Array/Index is tz-naive.      See also  DatetimeIndex.tz

A timezone that has a variable offset from UTC.  DatetimeIndex.tz_localize

Localize tz-naive DatetimeIndex to a given time zone, or remove timezone from a tz-aware DatetimeIndex.    Examples With the tz parameter, we can change the DatetimeIndex to other time zones: 
>>> dti = pd.date_range(start='2014-08-01 09:00',
...                     freq='H', periods=3, tz='Europe/Berlin')
  
>>> dti
DatetimeIndex(['2014-08-01 09:00:00+02:00',
               '2014-08-01 10:00:00+02:00',
               '2014-08-01 11:00:00+02:00'],
              dtype='datetime64[ns, Europe/Berlin]', freq='H')
  
>>> dti.tz_convert('US/Central')
DatetimeIndex(['2014-08-01 02:00:00-05:00',
               '2014-08-01 03:00:00-05:00',
               '2014-08-01 04:00:00-05:00'],
              dtype='datetime64[ns, US/Central]', freq='H')
  With the tz=None, we can remove the timezone (after converting to UTC if necessary): 
>>> dti = pd.date_range(start='2014-08-01 09:00', freq='H',
...                     periods=3, tz='Europe/Berlin')
  
>>> dti
DatetimeIndex(['2014-08-01 09:00:00+02:00',
               '2014-08-01 10:00:00+02:00',
               '2014-08-01 11:00:00+02:00'],
                dtype='datetime64[ns, Europe/Berlin]', freq='H')
  
>>> dti.tz_convert(None)
DatetimeIndex(['2014-08-01 07:00:00',
               '2014-08-01 08:00:00',
               '2014-08-01 09:00:00'],
                dtype='datetime64[ns]', freq='H')
pandas.DatetimeIndex.week   propertyDatetimeIndex.week
 
The week ordinal of the year.  Deprecated since version 1.1.0.  weekofyear and week have been deprecated. Please use DatetimeIndex.isocalendar().week instead.
pandas.DatetimeIndex.weekday   propertyDatetimeIndex.weekday
 
The day of the week with Monday=0, Sunday=6. Return the day of the week. It is assumed the week starts on Monday, which is denoted by 0 and ends on Sunday which is denoted by 6. This method is available on both Series with datetime values (using the dt accessor) or DatetimeIndex.  Returns 
 Series or Index

Containing integers indicating the day number.      See also  Series.dt.dayofweek

Alias.  Series.dt.weekday

Alias.  Series.dt.day_name

Returns the name of the day of the week.    Examples 
>>> s = pd.date_range('2016-12-31', '2017-01-08', freq='D').to_series()
>>> s.dt.dayofweek
2016-12-31    5
2017-01-01    6
2017-01-02    0
2017-01-03    1
2017-01-04    2
2017-01-05    3
2017-01-06    4
2017-01-07    5
2017-01-08    6
Freq: D, dtype: int64