Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
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))
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.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.