pandas.Timestamp.month_name#

Timestamp.month_name(locale=None)#

使用指定的 locale 返回 Timestamp 的月份名称。

Parameters:
localestr,默认为 None(英语环境)

用于确定返回月份名称所用语言的环境。

Returns:
str

Examples

>>> ts = pd.Timestamp('2020-03-14T15:32:52.192548651')
>>> ts.month_name()
'March'

pd.NaT 的类似用法:

>>> pd.NaT.month_name()
nan