In pandas datetimeindex, dayofweek and weekday seem to be the same. Are they just aliases of each other? I discovered these functions here
Based on the pandas
source code definition of DatetimeIndex
, weekday
is just an alias for dayofweek
, so there is no difference.
class DatetimeIndex:
...
dayofweek = _field_accessor('dayofweek', 'dow',
"The day of the week with Monday=0, Sunday=6")
weekday = dayofweek
Source: https://github.com/pandas-dev/pandas/blob/50930a9879b580ab4f30d8b741229391e41afa76/pandas/tseries/index.py#L1547
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With