
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
BUG: resample on TimedeltaIndex with `closed=right` takes no effect Β· Issue #45414 Β· pandas-dev/pandas
Description:
Pandas version checks I have checked that this issue has not already been reported. I have confirmed this bug exists on the latest version of pandas. I have confirmed this bug exists on the main branch of pandas. Reproducible Example In ...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Technology & Computing
- Video & Online Content
- Social Networks
Content Management System {π}
What CMS is github.com built with?
Github.com utilizes WORDPRESS.
Traffic Estimate {π}
What is the average monthly size of github.com audience?
ππ Tremendous Traffic: 10M - 20M visitors per month
Based on our best estimate, this website will receive around 10,000,019 visitors per month in the current month.
However, some sources were not loaded, we suggest to reload the page to get complete results.
check SE Ranking
check Ahrefs
check Similarweb
check Ubersuggest
check Semrush
How Does Github.com Make Money? {πΈ}
Subscription Packages {π³}
We've located a dedicated page on github.com that might include details about subscription plans or recurring payments. We identified it based on the word pricing in one of its internal links. Below, you'll find additional estimates for its monthly recurring revenues.How Much Does Github.com Make? {π°}
Subscription Packages {π³}
Prices on github.com are in US Dollars ($).
They range from $4.00/month to $21.00/month.
We estimate that the site has approximately 4,989,889 paying customers.
The estimated monthly recurring revenue (MRR) is $20,957,532.
The estimated annual recurring revenues (ARR) are $251,490,385.
Wordpress Themes and Plugins {π¨}
What WordPress theme does this site use?
It is strange but we were not able to detect any theme on the page.
What WordPress plugins does this website use?
It is strange but we were not able to detect any plugins on the page.
Keywords {π}
days, pandas, bug, resample, issue, closedright, dtype, int, sign, index, series, seriesresamplet, freq, projects, timedeltaindex, takes, effect, closed, closedleft, added, navigation, pull, requests, actions, security, description, tfiasco, version, confirmed, exists, pdseriespdtimedeltaseconds, range, pdseriesrange, indexindex, labelleftsum, labelrightsum, expected, behavior, triage, reviewed, team, member, attack, jreback, milestone, method, github, type, footer, skip,
Topics {βοΈ}
personal information bug comment metadata assignees resample ignoring closed= type projects projects milestone 1 latest version import pandas bug exists triage issue pandas closed='left' closed=left index=index bug issue main branch index = pd expected behavior 100% complete relationships label='left' github argument takes resample series = pd closed= closed=' 5 closed `closed= int64 effect pd [pd timedeltaindex label=' takes ` takes sign series skip jump checked reported confirmed reproducible timedelta seconds=120 + range 0 days 00 't' sum
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:BUG: resample on TimedeltaIndex with `closed=right` takes no effect
articleBody:### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have confirmed this bug exists on the main branch of pandas.
### Reproducible Example
```python
In [1]: import pandas as pd
In [2]: index = pd.Series([pd.Timedelta(seconds=120 + i * 30) for i in range(10)])
In [3]: series = pd.Series(range(10), index=index)
In [4]: series
Out[4]:
0 days 00:02:00 0
0 days 00:02:30 1
0 days 00:03:00 2
0 days 00:03:30 3
0 days 00:04:00 4
0 days 00:04:30 5
0 days 00:05:00 6
0 days 00:05:30 7
0 days 00:06:00 8
0 days 00:06:30 9
dtype: int64
In [5]: series.resample('T', closed='left', label='left').sum()
Out[5]:
0 days 00:02:00 1
0 days 00:03:00 5
0 days 00:04:00 9
0 days 00:05:00 13
0 days 00:06:00 17
Freq: T, dtype: int64
In [6]: series.resample('T', closed='right', label='right').sum() # WRONG!
Out[6]:
0 days 00:02:00 1
0 days 00:03:00 5
0 days 00:04:00 9
0 days 00:05:00 13
0 days 00:06:00 17
Freq: T, dtype: int64
```
### Issue Description
`closed=right` argument takes no effect, the output is same as `closed=left`.
### Expected Behavior
The same computation on a `DatetimeIndex`, which is the expected behavior:
```python
In [7]: index = pd.Series([pd.Timedelta(seconds=120 + i * 30) for i in range(10)])
In [8]: index = index + pd.to_datetime('2000-01-01')
In [9]: series = pd.Series(range(10), index=index)
In [10]: series
Out[10]:
2000-01-01 00:02:00 0
2000-01-01 00:02:30 1
2000-01-01 00:03:00 2
2000-01-01 00:03:30 3
2000-01-01 00:04:00 4
2000-01-01 00:04:30 5
2000-01-01 00:05:00 6
2000-01-01 00:05:30 7
2000-01-01 00:06:00 8
2000-01-01 00:06:30 9
dtype: int64
In [11]: series.resample('T', closed='left', label='left').sum()
Out[11]:
2000-01-01 00:02:00 1
2000-01-01 00:03:00 5
2000-01-01 00:04:00 9
2000-01-01 00:05:00 13
2000-01-01 00:06:00 17
Freq: T, dtype: int64
In [12]: series.resample('T', closed='right', label='right').sum() # RIGHT
Out[12]:
2000-01-01 00:02:00 0
2000-01-01 00:03:00 3
2000-01-01 00:04:00 7
2000-01-01 00:05:00 11
2000-01-01 00:06:00 15
2000-01-01 00:07:00 9
Freq: T, dtype: int64
```
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 66e3805b8cabe977f40c05259cc3fcf7ead5687d
python : 3.8.8.final.0
python-bits : 64
OS : Linux
OS-release : 4.9.130-0409130-generic
Version : #201809291131 SMP Sat Sep 29 11:33:40 UTC 2018
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : None
LOCALE : en_US.UTF-8
pandas : 1.3.5
numpy : 1.19.5
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 52.0.0.post20210125
Cython : None
pytest : 6.2.3
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : 1.0.2
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.22.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 0.9.0
fastparquet : 0.7.1
gcsfs : None
matplotlib : 3.3.4
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 6.0.1
pyxlsb : None
s3fs : None
scipy : 1.6.2
sqlalchemy : 1.4.23
tables : None
tabulate : 0.8.9
xarray : 0.19.0
xlrd : 2.0.1
xlwt : None
numba : 0.53.1
</details>
author:
url:https://github.com/tfiasco
type:Person
name:tfiasco
datePublished:2022-01-17T09:31:31.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:1
url:https://github.com/45414/pandas/issues/45414
context:https://schema.org
headline:BUG: resample on TimedeltaIndex with `closed=right` takes no effect
articleBody:### Pandas version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [ ] I have confirmed this bug exists on the main branch of pandas.
### Reproducible Example
```python
In [1]: import pandas as pd
In [2]: index = pd.Series([pd.Timedelta(seconds=120 + i * 30) for i in range(10)])
In [3]: series = pd.Series(range(10), index=index)
In [4]: series
Out[4]:
0 days 00:02:00 0
0 days 00:02:30 1
0 days 00:03:00 2
0 days 00:03:30 3
0 days 00:04:00 4
0 days 00:04:30 5
0 days 00:05:00 6
0 days 00:05:30 7
0 days 00:06:00 8
0 days 00:06:30 9
dtype: int64
In [5]: series.resample('T', closed='left', label='left').sum()
Out[5]:
0 days 00:02:00 1
0 days 00:03:00 5
0 days 00:04:00 9
0 days 00:05:00 13
0 days 00:06:00 17
Freq: T, dtype: int64
In [6]: series.resample('T', closed='right', label='right').sum() # WRONG!
Out[6]:
0 days 00:02:00 1
0 days 00:03:00 5
0 days 00:04:00 9
0 days 00:05:00 13
0 days 00:06:00 17
Freq: T, dtype: int64
```
### Issue Description
`closed=right` argument takes no effect, the output is same as `closed=left`.
### Expected Behavior
The same computation on a `DatetimeIndex`, which is the expected behavior:
```python
In [7]: index = pd.Series([pd.Timedelta(seconds=120 + i * 30) for i in range(10)])
In [8]: index = index + pd.to_datetime('2000-01-01')
In [9]: series = pd.Series(range(10), index=index)
In [10]: series
Out[10]:
2000-01-01 00:02:00 0
2000-01-01 00:02:30 1
2000-01-01 00:03:00 2
2000-01-01 00:03:30 3
2000-01-01 00:04:00 4
2000-01-01 00:04:30 5
2000-01-01 00:05:00 6
2000-01-01 00:05:30 7
2000-01-01 00:06:00 8
2000-01-01 00:06:30 9
dtype: int64
In [11]: series.resample('T', closed='left', label='left').sum()
Out[11]:
2000-01-01 00:02:00 1
2000-01-01 00:03:00 5
2000-01-01 00:04:00 9
2000-01-01 00:05:00 13
2000-01-01 00:06:00 17
Freq: T, dtype: int64
In [12]: series.resample('T', closed='right', label='right').sum() # RIGHT
Out[12]:
2000-01-01 00:02:00 0
2000-01-01 00:03:00 3
2000-01-01 00:04:00 7
2000-01-01 00:05:00 11
2000-01-01 00:06:00 15
2000-01-01 00:07:00 9
Freq: T, dtype: int64
```
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 66e3805b8cabe977f40c05259cc3fcf7ead5687d
python : 3.8.8.final.0
python-bits : 64
OS : Linux
OS-release : 4.9.130-0409130-generic
Version : #201809291131 SMP Sat Sep 29 11:33:40 UTC 2018
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : None
LOCALE : en_US.UTF-8
pandas : 1.3.5
numpy : 1.19.5
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 52.0.0.post20210125
Cython : None
pytest : 6.2.3
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : 1.0.2
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.22.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 0.9.0
fastparquet : 0.7.1
gcsfs : None
matplotlib : 3.3.4
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 6.0.1
pyxlsb : None
s3fs : None
scipy : 1.6.2
sqlalchemy : 1.4.23
tables : None
tabulate : 0.8.9
xarray : 0.19.0
xlrd : 2.0.1
xlwt : None
numba : 0.53.1
</details>
author:
url:https://github.com/tfiasco
type:Person
name:tfiasco
datePublished:2022-01-17T09:31:31.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:1
url:https://github.com/45414/pandas/issues/45414
Person:
url:https://github.com/tfiasco
name:tfiasco
url:https://github.com/tfiasco
name:tfiasco
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:1
interactionType:https://schema.org/CommentAction
userInteractionCount:1
External Links {π}(3)
Analytics and Tracking {π}
- Site Verification - Google
Libraries {π}
- Clipboard.js
- D3.js
- Lodash
Emails and Hosting {βοΈ}
Mail Servers:
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- alt2.aspmx.l.google.com
- alt3.aspmx.l.google.com
- alt4.aspmx.l.google.com
Name Servers:
- dns1.p08.nsone.net
- dns2.p08.nsone.net
- dns3.p08.nsone.net
- dns4.p08.nsone.net
- ns-1283.awsdns-32.org
- ns-1707.awsdns-21.co.uk
- ns-421.awsdns-52.com
- ns-520.awsdns-01.net