Python Forum
How to find difference between two timestamp index
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to find difference between two timestamp index
#2
You don't need apply Timedelta, the difference is already instance of Pandas TimeDelta class.

(df.index[-1] - df.index[0]).total_seconds()
Reply


Messages In This Thread
RE: How to find difference between two timestamp index - by scidam - Jul-25-2019, 12:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Getting Index Error - list index out of range krishna 2 2,679 Jan-09-2021, 08:29 AM
Last Post: buran
  Getting Index Error - list index out of range RahulSingh 2 6,217 Feb-03-2020, 07:17 AM
Last Post: RahulSingh
  How to find index of a particular value in a dataframe ankitawadhwa 0 2,416 Jan-21-2020, 09:45 PM
Last Post: ankitawadhwa
  How to find column index and its corresponding column name Raj 2 3,453 May-10-2018, 12:30 PM
Last Post: volcano63

Forum Jump:

User Panel Messages

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