Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 iterate over index and define each range as a day
#7
My understanding has let me down. However, how should I interpret the problem:

Quote:I wanted to know if it's possible to iterate over a column set as index(DateTime /.../ so that during the iteration I can specify that the range from 00:03:00 to 23:59:00 is a day
(do something) and so on

I don't want to add a new column on time but what I'm trying to do, is to iterate on the index column of the df and do some operations in another column of that Dataframe (my Dataframe has 3 columns and I want to manipulate the df['x'] corresponding to that day range found and so on for others days that would be found!)

As I see it based on problem statement above:

Dataframe with DateTime as index. Check. Access to rows by time range. Check. Possibility to manipulate values. Check.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Quote

Top Page

Messages In This Thread
RE: iterate over index and define each range as a day - by perfringo - Nov-18-2019, 08:06 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Getting Index Error - list index out of range RahulSingh 2 319 Feb-03-2020, 07:17 AM
Last Post: RahulSingh
  pandas.read_sas with chunksize: IndexError list index out of range axelle 0 133 Jan-28-2020, 09:30 AM
Last Post: axelle
  IndexEroor : index out of range adithyakrish 7 2,957 May-19-2017, 07:34 PM
Last Post: buran
  is a pandas dataframe timeseries time index in a specified range (but ignoring date)? m_lotinga 4 14,225 Dec-12-2016, 10:51 PM
Last Post: m_lotinga
  Unable to understand reason for error IndexError: tuple index out of range rajat2504 4 42,918 Dec-09-2016, 11:04 AM
Last Post: Kebap

Forum Jump:


Users browsing this thread: 1 Guest(s)