pandas.Timestamp.month_name#

Timestamp.month_name(locale=None)#

Return the month name of the Timestamp with specified locale.

This method returns the full name of the month corresponding to the Timestamp, such as ‘January’, ‘February’, etc. The month name can be returned in a specified locale if provided; otherwise, it defaults to the English locale.

Parameters:
localestr, default None (English locale)

Locale determining the language in which to return the month name.

Returns:
str

The full month name as a string.

See also

Timestamp.day_name

Returns the name of the day of the week.

Timestamp.strftime

Returns a formatted string of the Timestamp.

datetime.datetime.strftime

Returns a string representing the date and time.

Examples

Get the month name in English (default):

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

Analogous for pd.NaT:

>>> pd.NaT.month_name()
nan