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: support Period.__contains__

See original GitHub issue

supporting in for a Timestamp in a Period is straightforward and useful. Note that we current consider both endpoints inclusive.

In [28]: p = Period('2016',freq='M')

In [29]: p
Out[29]: Period('2016-01', 'M')

In [30]: p.start_time
Out[30]: Timestamp('2016-01-01 00:00:00')

In [31]: p.end_time
Out[31]: Timestamp('2016-01-31 23:59:59.999999999')

In [32]: p.start_time in p
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-32-b4a9c4196274> in <module>()
----> 1 p.start_time in p

TypeError: argument of type 'Period' is not iterable

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
holymonsoncommented, Dec 3, 2020

@jreback I’d like to submit a PR, the implement is quite simple, but first someone should decide which method name to be used.

0reactions
simonjayhawkinscommented, Jun 16, 2021

Why not decide prior to doing stuff? Discussing and settling that here seems appropriate.

That would be ideal, but PRs tend to get more review/discussion/scrutiny than issues, so opening a PR has more chance of getting things moving than bumping an issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Long Term Service Pack Support - SUSE
Most SUSE server products have a 10-year lifecycle. If you need more than that, Long Term Service Pack Support provides up to 3...
Read more >
Red Hat Ansible Automation Platform Life Cycle
As part of a Red Hat Ansible Automation Platform subscription, customers have access to supported versions of on-premise packages, as well as hosted...
Read more >
Oracle Software Technical Support Policies
Assistance with service requests 24 hours per day, 7 days a week. Access to the customer support systems specified in the Web-Based Customer...
Read more >
Software lifecycle policy and on-premises updates - Business ...
This article outlines the lifecycle and support policies for ... This policy requires the customer to maintain an Enhancement Plan and ...
Read more >
Support - Audio Enhancement
Thank you for visiting our Support/ Warranty page. We're here to help! Have you visited our FAQ page? It has a number of...
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