I am using pandas day_name() function but its giving attribute error as below:
s = pd.Series(pd.date_range(start='2018-01-01', freq='D', periods=3))
s
0 2018-01-01
1 2018-01-02
2 2018-01-03
dtype: datetime64[ns]
s.dt.day_name()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-37-75cff12ad412> in <module>()
----> 1 s.dt.day_name()
AttributeError: 'DatetimeProperties' object has no attribute 'day_name'
pandas documentation has the same example. Don't know why it's not working.