pandasのupdate後weekday_nameが使えんの巻

weekday_nameでDatetimeIndexから曜日名を取り出してたのに、pandasをupdateした後で『weekday_name』で以下のエラーが出る場合は。。。
AttributeError: 'DatetimeIndex' object has no attribute 'weekday_name'
weekday_nameとしていたところを
day_name()
に書き換えれば良いと。
Using
https://stackoverflow.com/questions/30222533/create-a-day-of-week-column-in-a-pandas-dataframe-using-pythondt.weekday_name
is deprecated sincepandas 0.23.0
, instead, usedt.day_name()
:
解決。めでたしめでたし。
pandasのバージョンは1.0.5で確認しました。
このブログはエックスサーバー


WordPressを使うならロリポップ!
簡単インストール完備で楽々スタート!

世界にたった一つ、あなただけのドメインを登録しよう!
格安ドメイン取得サービス─ムームードメイン─

Author:bu 投稿一覧
いろいろあって現在ほぼ主夫。そんなワタシがVUCAな日々を奮闘する中で気付いたり感じたりしたことの記録です。ニッチなところでうっかり誰かのお役にたてればうれしい。
*Amazonのアソシエイトとして、buは適格販売により収入を得ています。