How To Extract Month And Year From Given Date In Python In Azure Ml
I was working in azure ml for the past few days. I came up with a dataset which consists of date in the below format mm/dd/yyyy hh:mm:ss I want to extract month and year from it
Solution 1:
Use .dt
to access the datetime methods.
Ex:
dates = pd.to_datetime(data['Order Date']).dt.strftime('%m-%d-%Y')
Post a Comment for "How To Extract Month And Year From Given Date In Python In Azure Ml"