-1

I only want the Month from this Column and want to drop all the rest of the values how do I do that. Have checked all then StackOverFlow other questions nothing seems top work. Can someone please help me out :D

** **

Kavach Dheer
  • 149
  • 9

1 Answers1

0

This looks like a datetime object, but if not you'll want to convert it to one with:

df['created_at']= pd.to_datetime(df['created_at'])

Once it's a datetime object, you can create a month column with the following:

df['month'] = df['created_at'].dt.month