Python Forum
is a pandas dataframe timeseries time index in a specified range (but ignoring date)?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is a pandas dataframe timeseries time index in a specified range (but ignoring date)?
#3
Thanks for your reply. 

It's possible using 

datesinseries = pd.Series(df.index).map(lambda t: t.date()).unique()
but a) it seems a roundabout way to do it, and b) I'm not sure how to combine a date extracted this way with a manually-defined time in a single timestamp as bounds for the range. Any advice on this would be helpful.

Do I just combine strings?

The .unique approach returns a datetime object that isn't obvious how to combine into a timestamp object
Reply


Messages In This Thread
RE: is a pandas dataframe timeseries time index in a specified range (but ignoring date)? - by m_lotinga - Dec-09-2016, 08:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Add NER output to pandas dataframe dg3000 0 184 Apr-22-2024, 08:14 PM
Last Post: dg3000
  [Numpy] Load date/time from .txt to 'datetime64' type. water 4 696 Mar-01-2024, 11:16 PM
Last Post: Gribouillis
  Parsing and summing time deltas (duration) onto bar + pie charts using pandas - - DRY Drone4four 2 629 Feb-10-2024, 06:04 PM
Last Post: Drone4four
  Grouping in pandas/multi-index data frame Aleqsie 3 725 Jan-06-2024, 03:55 PM
Last Post: deanhystad
  HTML Decoder pandas dataframe column mbrown009 3 1,098 Sep-29-2023, 05:56 PM
Last Post: deanhystad
  Index out of range error standenman 0 1,122 May-22-2023, 10:35 PM
Last Post: standenman
  Pandas read csv file in 'date/time' chunks MorganSamage 4 1,751 Feb-13-2023, 11:24 AM
Last Post: MorganSamage
  Use pandas to obtain cartesian product between a dataframe of int and equations? haihal 0 1,142 Jan-06-2023, 10:53 PM
Last Post: haihal
  Pandas Dataframe Filtering based on rows mvdlm 0 1,470 Apr-02-2022, 06:39 PM
Last Post: mvdlm
  Pandas dataframe: calculate metrics by year mcva 1 2,357 Mar-02-2022, 08:22 AM
Last Post: mcva

Forum Jump:

User Panel Messages

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