question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ENH: more functions like between_time()

See original GitHub issue

I have a time index for data frame in full date time format: eg,

2019-04-18 11:23:00 2020-06-03 11:00:00

Currently it is easy to slice with between_time("08:00","09:00") to get rows from 8am-9am across all the days I have in the data frame.

However, if I want to get all data in April across years, I wish I could do between_month(4,4). Similarly, between_day(1,15), or between_year(2019,2020)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
superkeyorcommented, Jun 4, 2020

oh no, please do not depreciate between_time. It is very useful to get specific time window across days/months/years.

0reactions
mroeschkecommented, Aug 7, 2021

Thanks for the suggestion but agreed that creating boolean indexing masks is pandas’ preferred method that overlaps with this enhancement request.

Since there hasn’t been much enthusiasm for this feature from the core devs, closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

LAG function constraints don't allow for some valid scenarios
I would like to submit an enhancement request for the LAG function to be used between time ranges that are not the same...
Read more >
Extending Modeltime (Developer Tools) - GitHub Pages
We need to use 2 functions to create the model: msts() - Tracks the multiple-seasonality as an object; stlm() - Creates a model...
Read more >
PEP 564 – Add new time functions with nanosecond resolution
time() function returns the current time as a floating-point number which is usually a 64-bit binary floating-point number (in the IEEE 754 ...
Read more >
Solved: How to find difference between time in seconds
So I used DateTimeToday() to add a date and converted them. See attached. Slightly more tools than you'd want but it works.
Read more >
Cluster-based permutation tests on event-related fields
This function takes as its input arguments a configuration structure(cfg) and two or more data structures. These data structures must be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found