Python Forum
Information how pandas works
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Information how pandas works
#11
If you want to take into account dates only, you can do it via .dt attribute, e.g.

df_filtered = df.loc[df['rdate'].dt.date > datetime.datetime.now().date() - pd.to_timedelta("14day")]
or specify the date directly, e.g.

df_filtered = df.loc[df['rdate'].dt.date > datetime.date(year=2019, month=2, day=9)] 
Reply
#12
Nice.
Thank you for all your help.
Gary
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I convert my data so it works with Pandas? Oliver 0 2,409 Dec-11-2017, 04:09 PM
Last Post: Oliver

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020