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
Asked
Active
Viewed 45 times
1 Answers
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

Jeremy Spradlin
- 43
- 1
- 7