Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

month from datetime pandas

#Exctract month and create a dedicated column df["Month"] from a 
#column in datetime format df["Date"]
df['Month'] = pd.DatetimeIndex(df['Date']).month

Source by www.interviewqs.com #
 
PREVIOUS NEXT
Tagged: #month #datetime #pandas
ADD COMMENT
Topic
Name
8+9 =