url
stringlengths 55
59
| repository_url
stringclasses 1
value | labels_url
stringlengths 69
73
| comments_url
stringlengths 64
68
| events_url
stringlengths 62
66
| html_url
stringlengths 44
49
| id
int64 338k
1.06B
| node_id
stringlengths 18
32
| number
int64 1
44.6k
| title
stringlengths 1
590
| user
dict | labels
listlengths 0
9
| state
stringclasses 2
values | locked
bool 2
classes | assignee
dict | assignees
listlengths 0
5
| milestone
dict | comments
int64 0
477
| created_at
unknown | updated_at
unknown | closed_at
unknown | author_association
stringclasses 3
values | active_lock_reason
stringclasses 4
values | body
stringlengths 0
251k
⌀ | reactions
dict | timeline_url
stringlengths 64
68
| performed_via_github_app
float64 | draft
float64 0
1
⌀ | pull_request
dict |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/pandas-dev/pandas/issues/44323 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44323/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44323/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44323/events | https://github.com/pandas-dev/pandas/issues/44323 | 1,045,852,456 | I_kwDOAA0YD84-VnEo | 44,323 | to_csv() enconding option "utf-8-BOM" | {
"avatar_url": "https://avatars.githubusercontent.com/u/53435298?v=4",
"events_url": "https://api.github.com/users/martino-vic/events{/privacy}",
"followers_url": "https://api.github.com/users/martino-vic/followers",
"following_url": "https://api.github.com/users/martino-vic/following{/other_user}",
"gists_url": "https://api.github.com/users/martino-vic/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/martino-vic",
"id": 53435298,
"login": "martino-vic",
"node_id": "MDQ6VXNlcjUzNDM1Mjk4",
"organizations_url": "https://api.github.com/users/martino-vic/orgs",
"received_events_url": "https://api.github.com/users/martino-vic/received_events",
"repos_url": "https://api.github.com/users/martino-vic/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/martino-vic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/martino-vic/subscriptions",
"type": "User",
"url": "https://api.github.com/users/martino-vic"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "be21f2",
"default": false,
"description": "May be closeable, needs more eyeballs",
"id": 2365504893,
"name": "Closing Candidate",
"node_id": "MDU6TGFiZWwyMzY1NTA0ODkz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Closing%20Candidate"
}
] | closed | false | null | [] | null | 3 | "2021-11-05T13:32:28Z" | "2021-11-06T23:24:21Z" | "2021-11-06T23:24:21Z" | NONE | null | Hey, could there be a way to save csvs as "utf-8-BOM" encoded? Because Excel needs the BOM to open csvs correctly. Everytime I save a csv with Pandas I have to open it with Notepad++ and change the encoding from utf-8 to uf8-BOM so that I can open it with Excel. Thanks in advance. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44323/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44323/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44324 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44324/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44324/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44324/events | https://github.com/pandas-dev/pandas/issues/44324 | 1,045,906,857 | I_kwDOAA0YD84-V0Wp | 44,324 | BUG: SeriesGroupBy.value_counts - index name missing when applied on categorical column | {
"avatar_url": "https://avatars.githubusercontent.com/u/48928957?v=4",
"events_url": "https://api.github.com/users/donok1/events{/privacy}",
"followers_url": "https://api.github.com/users/donok1/followers",
"following_url": "https://api.github.com/users/donok1/following{/other_user}",
"gists_url": "https://api.github.com/users/donok1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/donok1",
"id": 48928957,
"login": "donok1",
"node_id": "MDQ6VXNlcjQ4OTI4OTU3",
"organizations_url": "https://api.github.com/users/donok1/orgs",
"received_events_url": "https://api.github.com/users/donok1/received_events",
"repos_url": "https://api.github.com/users/donok1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/donok1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/donok1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/donok1"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
},
{
"color": "e99695",
"default": false,
"description": "Related to the Index class or subclasses",
"id": 1218227310,
"name": "Index",
"node_id": "MDU6TGFiZWwxMjE4MjI3MzEw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Index"
}
] | open | false | null | [] | null | 0 | "2021-11-05T14:24:46Z" | "2021-11-06T00:32:45Z" | null | NONE | null | ###
- [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 master branch of pandas.
### Reproducible Example
```python
import pandas as pd
df = pd.DataFrame({'gender': ['female', 'male', 'female', 'male', 'female', 'male'],
'education': ['low', 'medium', 'high', 'low', 'high', 'low'],
'country': ['US', 'FR', 'US', 'FR', 'FR', 'US']})
df.dtypes
gender object
education object
country object
dtype: object
df.groupby('country')['gender'].value_counts()
country gender
FR male 2
female 1
US female 2
male 1
Name: gender, dtype: int64
df.groupby('country')['gender'].value_counts().index.names
FrozenList(['country', 'gender'])
```
Now, if using a categorical type on the genre column, the column name is not saved in the index:
```python
df['gender'] = df['gender'].astype('category')
df.dtypes
gender category
education object
country object
dtype: object
df.groupby('country')['gender'].value_counts()
country
FR male 2
female 1
US female 2
male 1
Name: gender, dtype: int64
df.groupby('country')['gender'].value_counts().index.names
FrozenList(['country', None])
```
### Issue Description
The column name (here **gender**) is dropped when applying `value_counts()` on a column of type `category`.
It might be link with other problems in handling categorical types: #44001
This was working as of pandas v 1.2.3, and I could reproduce the bug starting with v 1.3.0, still present in v 1.3.4
### Expected Behavior
Column name should be added in the index for uniformity with other types, as in the first example above with object type column.
### Installed Versions
<details>
pd.show_versions()
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.9.6.final.0
python-bits : 64
OS : Darwin
OS-release : 21.1.0
Version : Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 1.3.4
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.3.1
setuptools : 57.0.0
Cython : None
pytest : 6.2.4
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.26.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : None
tables : None
tabulate : 0.8.9
xarray : 0.19.0
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44324/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44324/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44325 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44325/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44325/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44325/events | https://github.com/pandas-dev/pandas/pull/44325 | 1,045,921,236 | PR_kwDOAA0YD84uJwRo | 44,325 | BUG: closes #44312: fixes unwanted TypeError with nullable nested metadata in json_normalize | {
"avatar_url": "https://avatars.githubusercontent.com/u/8152233?v=4",
"events_url": "https://api.github.com/users/qdbp/events{/privacy}",
"followers_url": "https://api.github.com/users/qdbp/followers",
"following_url": "https://api.github.com/users/qdbp/following{/other_user}",
"gists_url": "https://api.github.com/users/qdbp/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/qdbp",
"id": 8152233,
"login": "qdbp",
"node_id": "MDQ6VXNlcjgxNTIyMzM=",
"organizations_url": "https://api.github.com/users/qdbp/orgs",
"received_events_url": "https://api.github.com/users/qdbp/received_events",
"repos_url": "https://api.github.com/users/qdbp/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/qdbp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qdbp/subscriptions",
"type": "User",
"url": "https://api.github.com/users/qdbp"
} | [
{
"color": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-05T14:40:05Z" | "2021-11-14T02:34:49Z" | "2021-11-14T02:34:45Z" | CONTRIBUTOR | null | - [x] closes #44312
Fixes TypeError crash in json_normalize when using errors="ignore" and extracting nullable nested metadata. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44325/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44325/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44325.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44325",
"merged_at": "2021-11-14T02:34:45Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44325.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44325"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44326 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44326/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44326/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44326/events | https://github.com/pandas-dev/pandas/issues/44326 | 1,046,008,892 | I_kwDOAA0YD84-WNQ8 | 44,326 | BUG: Unable to resample period range with dates above 2262-04-11 | {
"avatar_url": "https://avatars.githubusercontent.com/u/93783692?v=4",
"events_url": "https://api.github.com/users/jmcinto/events{/privacy}",
"followers_url": "https://api.github.com/users/jmcinto/followers",
"following_url": "https://api.github.com/users/jmcinto/following{/other_user}",
"gists_url": "https://api.github.com/users/jmcinto/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jmcinto",
"id": 93783692,
"login": "jmcinto",
"node_id": "U_kgDOBZcGjA",
"organizations_url": "https://api.github.com/users/jmcinto/orgs",
"received_events_url": "https://api.github.com/users/jmcinto/received_events",
"repos_url": "https://api.github.com/users/jmcinto/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jmcinto/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jmcinto/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jmcinto"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "eb6420",
"default": false,
"description": "Period data type",
"id": 60635328,
"name": "Period",
"node_id": "MDU6TGFiZWw2MDYzNTMyOA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Period"
},
{
"color": "207de5",
"default": false,
"description": "resample method",
"id": 74975453,
"name": "Resample",
"node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 1 | "2021-11-05T16:04:49Z" | "2021-11-14T04:09:25Z" | "2021-11-14T04:09:25Z" | NONE | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
import pandas as pd
from datetime import datetime
print(pd.__version__)
rng = pd.period_range(datetime(2000, 1, 1, 0, 0), datetime(2300, 1, 1, 0, 0), freq="1D")
df = pd.DataFrame(index = rng, data = [i+1 for i in range(0,len(rng))])
resample_df = df.resample("6H").interpolate()
print(resample_df.head(5))
```
### Issue Description
We are working with datasets that extend out past the maximum timestamp date of 2262-04-11, so we generally use period ranges rather than datetime ranges. However, starting with release 1.1.0, the resample functionality no longer works with period ranges that extend past 2262-04-11. The error that occurs in these later releases is pandas._libs.tslibs.np_datetime.OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 2300-01-01 22:59:59.
### Expected Behavior
In releases prior to 1.1.0, period ranges that extend past 2262-04-11 are resampled successfully without an out of bounds datetime error.
### Installed Versions
<details>
1.1.1
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44326/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44326/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44327 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44327/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44327/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44327/events | https://github.com/pandas-dev/pandas/pull/44327 | 1,046,052,925 | PR_kwDOAA0YD84uKMB1 | 44,327 | BUG: is_dtype_equal(dtype, "string[pyarrow]") raises if pyarrow not installedimport error resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/63910248?v=4",
"events_url": "https://api.github.com/users/shubham11941140/events{/privacy}",
"followers_url": "https://api.github.com/users/shubham11941140/followers",
"following_url": "https://api.github.com/users/shubham11941140/following{/other_user}",
"gists_url": "https://api.github.com/users/shubham11941140/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shubham11941140",
"id": 63910248,
"login": "shubham11941140",
"node_id": "MDQ6VXNlcjYzOTEwMjQ4",
"organizations_url": "https://api.github.com/users/shubham11941140/orgs",
"received_events_url": "https://api.github.com/users/shubham11941140/received_events",
"repos_url": "https://api.github.com/users/shubham11941140/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shubham11941140/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shubham11941140/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shubham11941140"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | open | false | null | [] | null | 4 | "2021-11-05T16:56:31Z" | "2021-11-16T16:56:05Z" | null | CONTRIBUTOR | null | - [x] closes #44276
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
Added instance to check string preventing import error
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44327/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44327/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44327.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44327",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44327.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44327"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44328 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44328/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44328/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44328/events | https://github.com/pandas-dev/pandas/pull/44328 | 1,046,145,781 | PR_kwDOAA0YD84uKffQ | 44,328 | REF: remove putmask_preserve, putmask_without_repeat | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-11-05T18:51:14Z" | "2021-11-06T21:10:02Z" | "2021-11-06T19:42:42Z" | MEMBER | null | No longer needed following #44275 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44328/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44328/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44328.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44328",
"merged_at": "2021-11-06T19:42:42Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44328.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44328"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44329 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44329/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44329/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44329/events | https://github.com/pandas-dev/pandas/issues/44329 | 1,046,178,154 | I_kwDOAA0YD84-W2lq | 44,329 | ENH: errors='ignore' should work for record_path for pandas.json_normalize function | {
"avatar_url": "https://avatars.githubusercontent.com/u/9373840?v=4",
"events_url": "https://api.github.com/users/averhagen/events{/privacy}",
"followers_url": "https://api.github.com/users/averhagen/followers",
"following_url": "https://api.github.com/users/averhagen/following{/other_user}",
"gists_url": "https://api.github.com/users/averhagen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/averhagen",
"id": 9373840,
"login": "averhagen",
"node_id": "MDQ6VXNlcjkzNzM4NDA=",
"organizations_url": "https://api.github.com/users/averhagen/orgs",
"received_events_url": "https://api.github.com/users/averhagen/received_events",
"repos_url": "https://api.github.com/users/averhagen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/averhagen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/averhagen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/averhagen"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
}
] | open | false | null | [] | null | 3 | "2021-11-05T19:29:47Z" | "2021-11-13T22:15:59Z" | null | NONE | null | When trying to normalize the example JSON data with pandas.json_normalize I get a KeyError exception even when I set errors='ignore'.
pandas-version=1.3.4
python-version=3.7.5
python code used:
```
import json
import pandas as pd
from pathlib import Path
file_path = Path('path/to/example/json-data.json')
json_data = json.loads(file_path.read_text())
pd.json_normalize(json_data, record_path='Sales', errors='ignore')
```
`[
{
"TransactionDate": "2019-12-01T19:58:13",
"PurchaseLocation": "Web",
"ReceiptNo": 1,
"PostalState": "KY"
},
{
"TransactionDate": "2019-12-01T12:51:47",
"PurchaseLocation": "POS",
"ReceiptNo": 2,
"PostalState": "KY",
"Sales": [
{
"ProductID": 101024,
"Quantity": 1
}
]
}
]`
I expected that this should not throw a KeyError and should return a dataframe just without the first JSON object. Having re-looked at the documentation, it looks like the "errors" parameter only applys to the "meta" values. I would find it very useful if we could specify the function to ignore KeyErrors related to the record path | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44329/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44329/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44330 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44330/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44330/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44330/events | https://github.com/pandas-dev/pandas/pull/44330 | 1,046,358,355 | PR_kwDOAA0YD84uLJmD | 44,330 | CLN: remove _AXIS_REVERSED | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-06T02:03:17Z" | "2021-11-06T19:41:52Z" | "2021-11-06T19:41:13Z" | MEMBER | null | Motivated by the FIXME in ArrayManager.as_array | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44330/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44330/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44330.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44330",
"merged_at": "2021-11-06T19:41:13Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44330.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44330"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44331 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44331/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44331/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44331/events | https://github.com/pandas-dev/pandas/pull/44331 | 1,046,385,657 | PR_kwDOAA0YD84uLPQB | 44,331 | DOC: df.to_html documentation incorrectly contains min_rows optional param | {
"avatar_url": "https://avatars.githubusercontent.com/u/52484416?v=4",
"events_url": "https://api.github.com/users/loicdiridollou/events{/privacy}",
"followers_url": "https://api.github.com/users/loicdiridollou/followers",
"following_url": "https://api.github.com/users/loicdiridollou/following{/other_user}",
"gists_url": "https://api.github.com/users/loicdiridollou/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/loicdiridollou",
"id": 52484416,
"login": "loicdiridollou",
"node_id": "MDQ6VXNlcjUyNDg0NDE2",
"organizations_url": "https://api.github.com/users/loicdiridollou/orgs",
"received_events_url": "https://api.github.com/users/loicdiridollou/received_events",
"repos_url": "https://api.github.com/users/loicdiridollou/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/loicdiridollou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/loicdiridollou/subscriptions",
"type": "User",
"url": "https://api.github.com/users/loicdiridollou"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-11-06T03:41:55Z" | "2021-11-15T10:50:07Z" | "2021-11-14T02:40:08Z" | CONTRIBUTOR | null | - [x] closes #44304
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [NA] whatsnew entry
Moved min_rows parameter out of the common docstring that is used by both DataFrame.to_html and DataFrame.to_string and reintroduced the parameter in DataFrame.to_string only | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44331/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44331/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44331.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44331",
"merged_at": "2021-11-14T02:40:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44331.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44331"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44332 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44332/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44332/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44332/events | https://github.com/pandas-dev/pandas/pull/44332 | 1,046,477,649 | PR_kwDOAA0YD84uLhlW | 44,332 | TST: use custom parametrization for consistency in base extension array tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 3 | "2021-11-06T10:16:12Z" | "2021-11-11T20:10:27Z" | "2021-11-11T20:10:23Z" | MEMBER | null | Follow-up on https://github.com/pandas-dev/pandas/pull/44242, as that broke geopandas CI. This adds back the custom parametrization, which also makes it consistent with the other occurrence of this test (for a different op) which is still using this:
https://github.com/pandas-dev/pandas/blob/057c6f81b464c6bbb667d326e203ad0dbd17cbde/pandas/tests/extension/base/ops.py#L116-L127
Since this is the only occurrence of `frame_or_series` in the base extension tests, I think it's not warranted to make it a fixture. If we would rather want this, we should add it to `tests/extension/conftest.py` instead (can always be done in a follow-up). | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44332/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44332/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44332.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44332",
"merged_at": "2021-11-11T20:10:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44332.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44332"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44333 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44333/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44333/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44333/events | https://github.com/pandas-dev/pandas/issues/44333 | 1,046,496,434 | I_kwDOAA0YD84-YESy | 44,333 | DOC: Clarify docs for groupby when passed a list with length equal to length of axis | {
"avatar_url": "https://avatars.githubusercontent.com/u/1978117?v=4",
"events_url": "https://api.github.com/users/asishm/events{/privacy}",
"followers_url": "https://api.github.com/users/asishm/followers",
"following_url": "https://api.github.com/users/asishm/following{/other_user}",
"gists_url": "https://api.github.com/users/asishm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/asishm",
"id": 1978117,
"login": "asishm",
"node_id": "MDQ6VXNlcjE5NzgxMTc=",
"organizations_url": "https://api.github.com/users/asishm/orgs",
"received_events_url": "https://api.github.com/users/asishm/received_events",
"repos_url": "https://api.github.com/users/asishm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/asishm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/asishm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/asishm"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 6 | "2021-11-06T12:11:55Z" | "2021-11-08T02:07:33Z" | null | CONTRIBUTOR | null | ### Documentation location
https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.groupby.html
### Reproducible Example
```python
import pandas as pd
df = pd.DataFrame([['a', 'b'], ['b', 'c']], columns=['foo', 'bar'])
df.groupby(['y', 'z']).first()
>>>
foo bar
y a b
z b c
```
While it is mentioned in the user-guide, I think it would be clearer to include lists (along with the existing mention of the ndarray) to reflect that the values will be used as-is to determine the groups if the lengths match that of the selected axis.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44333/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44333/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44334 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44334/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44334/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44334/events | https://github.com/pandas-dev/pandas/issues/44334 | 1,046,509,468 | I_kwDOAA0YD84-YHec | 44,334 | BUG: | {
"avatar_url": "https://avatars.githubusercontent.com/u/22727090?v=4",
"events_url": "https://api.github.com/users/blenq/events{/privacy}",
"followers_url": "https://api.github.com/users/blenq/followers",
"following_url": "https://api.github.com/users/blenq/following{/other_user}",
"gists_url": "https://api.github.com/users/blenq/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/blenq",
"id": 22727090,
"login": "blenq",
"node_id": "MDQ6VXNlcjIyNzI3MDkw",
"organizations_url": "https://api.github.com/users/blenq/orgs",
"received_events_url": "https://api.github.com/users/blenq/received_events",
"repos_url": "https://api.github.com/users/blenq/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/blenq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/blenq/subscriptions",
"type": "User",
"url": "https://api.github.com/users/blenq"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "009800",
"default": false,
"description": "Duplicate issue or pull request",
"id": 40153326,
"name": "Duplicate Report",
"node_id": "MDU6TGFiZWw0MDE1MzMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Duplicate%20Report"
},
{
"color": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 2 | "2021-11-06T13:27:51Z" | "2021-11-06T15:30:41Z" | "2021-11-06T13:41:23Z" | NONE | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
import pandas as pd
# regular integer works
s = pd.Series([1, 3, "45345"])
s.astype("int64")
# nullable integer fails with exception
s = pd.Series([1, 3, "45345"])
s.astype("Int64")
```
### Issue Description
Conversion of strings with valid integer numeric content to nullable integer fails with "TypeError: cannot safely cast non-equivalent object to int64".
Exception raised pandas/core/arrays/integer.py", line 136, in safe_cast
### Expected Behavior
IMHO conversion of valid strings to nullable integer should succeed, to be consistent with regular integers.
### Installed Versions
Besides the versions used below (python3.9 from Ubuntu repo and pandas master branch from Github), it also fails with python3.7 (self compiled), python3.8 and 3.9 (from Ubuntu repo) and python3.10 (self compiled) with pandas installed from pypi (version 1.3.4).
<details>
INSTALLED VERSIONS
------------------
commit : 057c6f81b464c6bbb667d326e203ad0dbd17cbde
python : 3.9.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.11.0-38-generic
Version : #42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0.dev0+1053.g057c6f81b4
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 20.0.2
setuptools : 44.0.0
Cython : 0.29.24
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44334/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44334/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44335 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44335/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44335/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44335/events | https://github.com/pandas-dev/pandas/pull/44335 | 1,046,547,249 | PR_kwDOAA0YD84uLuCt | 44,335 | ENH: option to change the number in `_dir_additions_for_owner` | {
"avatar_url": "https://avatars.githubusercontent.com/u/60755099?v=4",
"events_url": "https://api.github.com/users/TheDerivator/events{/privacy}",
"followers_url": "https://api.github.com/users/TheDerivator/followers",
"following_url": "https://api.github.com/users/TheDerivator/following{/other_user}",
"gists_url": "https://api.github.com/users/TheDerivator/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TheDerivator",
"id": 60755099,
"login": "TheDerivator",
"node_id": "MDQ6VXNlcjYwNzU1MDk5",
"organizations_url": "https://api.github.com/users/TheDerivator/orgs",
"received_events_url": "https://api.github.com/users/TheDerivator/received_events",
"repos_url": "https://api.github.com/users/TheDerivator/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TheDerivator/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TheDerivator/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TheDerivator"
} | [
{
"color": "ededed",
"default": false,
"description": "__repr__ of pandas objects, to_string",
"id": 13101118,
"name": "Output-Formatting",
"node_id": "MDU6TGFiZWwxMzEwMTExOA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Output-Formatting"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 6 | "2021-11-06T16:39:28Z" | "2021-11-20T23:27:41Z" | null | NONE | null | - [x] closes #37996
- [x] tests added / passed
- [x] Allows to optionally change the number of columns from a dataframe that are added to `dir`, which is frequently also the number of columns suggested by tab completion, by using the option `pandas.set_option('display.max_dir_additions', 100)` to a higher number than 100 or None for an unlimited number of columns. Changing the value of `display.max_dir_additions` will only take effect for existing dataframes after a column is added or deleted, as the result of `dir` is cached. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44335/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44335/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44335.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44335",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44335.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44335"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44336 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44336/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44336/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44336/events | https://github.com/pandas-dev/pandas/issues/44336 | 1,046,585,925 | I_kwDOAA0YD84-YaJF | 44,336 | BUG: inconsistency when transposing empty datetime column | {
"avatar_url": "https://avatars.githubusercontent.com/u/31857876?v=4",
"events_url": "https://api.github.com/users/CloseChoice/events{/privacy}",
"followers_url": "https://api.github.com/users/CloseChoice/followers",
"following_url": "https://api.github.com/users/CloseChoice/following{/other_user}",
"gists_url": "https://api.github.com/users/CloseChoice/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CloseChoice",
"id": 31857876,
"login": "CloseChoice",
"node_id": "MDQ6VXNlcjMxODU3ODc2",
"organizations_url": "https://api.github.com/users/CloseChoice/orgs",
"received_events_url": "https://api.github.com/users/CloseChoice/received_events",
"repos_url": "https://api.github.com/users/CloseChoice/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CloseChoice/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CloseChoice/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CloseChoice"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | open | false | null | [] | null | 0 | "2021-11-06T20:01:26Z" | "2021-11-14T04:15:45Z" | null | MEMBER | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
>>> import pandas as pd
>>> srs = pd.Series(pd.to_datetime([]))
>>> srs
Series([], dtype: datetime64[ns])
>>> srs.T.T
Series([], dtype: datetime64[ns]) # this works as expected
>>> srs.T
Series([], dtype: datetime64[ns])
>>> df = pd.DataFrame({"x": pd.to_datetime([])})
>>> df
Empty DataFrame
Columns: [x]
Index: []
>>> df.dtypes
x datetime64[ns]
dtype: object
>>> df.T.dtypes
Series([], dtype: object)
>>> df.T.T.dtypes # this might be unexpected behaviour, datetime64[ns] is expected
x float64
dtype: object
```
### Issue Description
When transposing an empty dataframe with one `datetime` column, we get an `object` dtype for the columns. When transposing this once more we should end up with the original dataframe, but we get a `float64` dtype instead. This works fine for `pd.Series`
### Expected Behavior
I would expect
```python
>>> df.T.T.dtypes
x datetime64[ns]
dtype: object
```
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 969b07c82a00bc2ee6c9028d2f2ea797632057c8
python : 3.8.11.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-77-generic
Version : #86~18.04.1-Ubuntu SMP Fri Jun 18 01:23:22 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0.dev0+1057.g969b07c82a
numpy : 1.21.1
pytz : 2021.1
dateutil : 2.8.2
pip : 21.0.1
setuptools : 58.0.4
Cython : 0.29.24
pytest : 6.2.5
hypothesis : 5.37.4
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.4.26
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44336/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44336/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44337 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44337/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44337/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44337/events | https://github.com/pandas-dev/pandas/pull/44337 | 1,046,592,558 | PR_kwDOAA0YD84uL2EH | 44,337 | Remove aiobotocore pin | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [] | closed | false | null | [] | null | 0 | "2021-11-06T20:39:42Z" | "2021-11-13T19:32:31Z" | "2021-11-06T21:38:04Z" | MEMBER | null | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44337/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44337/timeline | null | 1 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44337.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44337",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44337.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44337"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44338 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44338/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44338/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44338/events | https://github.com/pandas-dev/pandas/pull/44338 | 1,046,600,423 | PR_kwDOAA0YD84uL3eD | 44,338 | Revert "REF: remove putmask_preserve, putmask_without_repeat" | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-06T21:26:42Z" | "2021-11-06T22:28:11Z" | "2021-11-06T22:28:05Z" | MEMBER | null | Reverts pandas-dev/pandas#44328
cc @jbrockmendel | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44338/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44338/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44338.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44338",
"merged_at": "2021-11-06T22:28:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44338.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44338"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44339 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44339/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44339/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44339/events | https://github.com/pandas-dev/pandas/pull/44339 | 1,046,622,729 | PR_kwDOAA0YD84uL7T9 | 44,339 | TYP: timestamps.pyi | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | open | false | null | [] | null | 0 | "2021-11-06T23:59:15Z" | "2021-11-08T15:56:38Z" | null | CONTRIBUTOR | null | Should type annotations from a pyi files also be added to the pyx file (if possible)? | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44339/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44339/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44339.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44339",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44339.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44339"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44340 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44340/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44340/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44340/events | https://github.com/pandas-dev/pandas/issues/44340 | 1,046,623,491 | I_kwDOAA0YD84-YjUD | 44,340 | DOC: pandas.json_normalize documentation appears to be missing | {
"avatar_url": "https://avatars.githubusercontent.com/u/12875240?v=4",
"events_url": "https://api.github.com/users/trenton3983/events{/privacy}",
"followers_url": "https://api.github.com/users/trenton3983/followers",
"following_url": "https://api.github.com/users/trenton3983/following{/other_user}",
"gists_url": "https://api.github.com/users/trenton3983/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/trenton3983",
"id": 12875240,
"login": "trenton3983",
"node_id": "MDQ6VXNlcjEyODc1MjQw",
"organizations_url": "https://api.github.com/users/trenton3983/orgs",
"received_events_url": "https://api.github.com/users/trenton3983/received_events",
"repos_url": "https://api.github.com/users/trenton3983/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/trenton3983/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/trenton3983/subscriptions",
"type": "User",
"url": "https://api.github.com/users/trenton3983"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 2 | "2021-11-07T00:03:54Z" | "2021-11-07T02:41:09Z" | "2021-11-07T02:41:09Z" | NONE | null | ###
- [X] I have checked that the issue still exists on the latest versions of the docs on `master` [here](https://pandas.pydata.org/docs/dev/)
### Location of the documentation
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.json_normalize.html
https://pandas.pydata.org/docs/reference/api/pandas.json_normalize.html
https://pandas.pydata.org/docs/dev/reference/api/pandas.json_normalize.html
### Documentation problem
dead links
### Suggested fix for documentation
make the link work | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44340/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44340/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44341 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44341/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44341/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44341/events | https://github.com/pandas-dev/pandas/issues/44341 | 1,046,705,428 | I_kwDOAA0YD84-Y3UU | 44,341 | CI: Add CI check to exclude datetime/Timestamp.now in tests to prevent time dependent behaviors (e.g. DST change) | {
"avatar_url": "https://avatars.githubusercontent.com/u/8927258?v=4",
"events_url": "https://api.github.com/users/johnzangwill/events{/privacy}",
"followers_url": "https://api.github.com/users/johnzangwill/followers",
"following_url": "https://api.github.com/users/johnzangwill/following{/other_user}",
"gists_url": "https://api.github.com/users/johnzangwill/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/johnzangwill",
"id": 8927258,
"login": "johnzangwill",
"node_id": "MDQ6VXNlcjg5MjcyNTg=",
"organizations_url": "https://api.github.com/users/johnzangwill/orgs",
"received_events_url": "https://api.github.com/users/johnzangwill/received_events",
"repos_url": "https://api.github.com/users/johnzangwill/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/johnzangwill/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/johnzangwill/subscriptions",
"type": "User",
"url": "https://api.github.com/users/johnzangwill"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] | open | false | null | [] | null | 2 | "2021-11-07T09:59:05Z" | "2021-11-20T20:11:50Z" | null | CONTRIBUTOR | null | ### Most CI test runs failed at 2021-11-07T02:05:19. when the clocks went back in the US
70 tests failed with `pytz.AmbiguousTimeError` at `Timestamp.now().tz_localize(dti.tz)` and `pd.Series([fill_value], dtype=fill_dtype)`:
[ambiguous_time_error_log.txt](https://github.com/pandas-dev/pandas/files/7492034/ambiguous_time_error_log.txt)
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44341/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44341/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44342 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44342/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44342/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44342/events | https://github.com/pandas-dev/pandas/issues/44342 | 1,046,762,615 | I_kwDOAA0YD84-ZFR3 | 44,342 | ENH: Raw `pd.Rolling.apply` with index | {
"avatar_url": "https://avatars.githubusercontent.com/u/4324329?v=4",
"events_url": "https://api.github.com/users/erezinman/events{/privacy}",
"followers_url": "https://api.github.com/users/erezinman/followers",
"following_url": "https://api.github.com/users/erezinman/following{/other_user}",
"gists_url": "https://api.github.com/users/erezinman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erezinman",
"id": 4324329,
"login": "erezinman",
"node_id": "MDQ6VXNlcjQzMjQzMjk=",
"organizations_url": "https://api.github.com/users/erezinman/orgs",
"received_events_url": "https://api.github.com/users/erezinman/received_events",
"repos_url": "https://api.github.com/users/erezinman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erezinman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erezinman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erezinman"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "207de5",
"default": false,
"description": "Requires discussion from core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
},
{
"color": "d4c5f9",
"default": false,
"description": "rolling, ewma, expanding",
"id": 1045950827,
"name": "Window",
"node_id": "MDU6TGFiZWwxMDQ1OTUwODI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Window"
}
] | open | false | null | [] | null | 2 | "2021-11-07T14:34:12Z" | "2021-11-20T05:25:39Z" | null | NONE | null | In many cases (especially in non-uniform indexed time-series), one needs to know the index of the series during a `rolling` operation. While it is possible to obtain the index & values in the non-`raw` mode, it isn't possible to use the optimizations of the "numba" engine with that.
I propose a new `raw`-argument mode (say `df.rolling('1min').apply(..., raw='with_index', engine="numba")`), that assumes a second argument for the index. For example:
```python
def normalized_ptp(values, index_values):
return values.ptp() / index_values.view('int64').ptp()
time_series.rolling('1min').apply(normalized_ptp,
raw='with_index',
engine='numba',
engine_kwargs=dict(nopython=True)
)
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44342/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44342/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44343 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44343/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44343/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44343/events | https://github.com/pandas-dev/pandas/issues/44343 | 1,046,779,113 | I_kwDOAA0YD84-ZJTp | 44,343 | CI: New Numpydev version broke ci | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
},
{
"color": "d93f0b",
"default": false,
"description": "Required and optional dependencies",
"id": 527603109,
"name": "Dependencies",
"node_id": "MDU6TGFiZWw1Mjc2MDMxMDk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dependencies"
}
] | closed | false | null | [] | null | 8 | "2021-11-07T15:42:10Z" | "2021-11-15T12:12:19Z" | "2021-11-15T12:12:19Z" | MEMBER | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
Two tests are affected
```
### Issue Description
```
@pytest.mark.parametrize("quantile", [0.0, 0.1, 0.45, 0.5, 1])
@pytest.mark.parametrize(
"interpolation", ["linear", "lower", "higher", "nearest", "midpoint"]
)
@pytest.mark.parametrize(
"data",
[
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0],
[8.0, 1.0, 3.0, 4.0, 5.0, 2.0, 6.0, 7.0],
[0.0, np.nan, 0.2, np.nan, 0.4],
[np.nan, np.nan, np.nan, np.nan],
[np.nan, 0.1, np.nan, 0.3, 0.4, 0.5],
[0.5],
[np.nan, 0.7, 0.6],
],
)
def test_rolling_quantile_interpolation_options(quantile, interpolation, data):
# Tests that rolling window's quantile behavior is analogous to
# Series' quantile for each interpolation option
s = Series(data)
q1 = s.quantile(quantile, interpolation)
q2 = s.expanding(min_periods=1).quantile(quantile, interpolation).iloc[-1]
if np.isnan(q1):
assert np.isnan(q2)
else:
> assert q1 == q2
E assert 0.040000000000000036 == 0.04000000000000001
pandas/tests/window/test_rolling.py:1664: AssertionError
________ test_rolling_quantile_interpolation_options[data2-linear-0.45] ________
[gw0] linux -- Python 3.9.7 /usr/share/miniconda/envs/pandas-dev/bin/python
quantile = 0.45, interpolation = 'linear', data = [0.0, nan, 0.2, nan, 0.4]
@pytest.mark.parametrize("quantile", [0.0, 0.1, 0.45, 0.5, 1])
@pytest.mark.parametrize(
"interpolation", ["linear", "lower", "higher", "nearest", "midpoint"]
)
@pytest.mark.parametrize(
"data",
[
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0],
[8.0, 1.0, 3.0, 4.0, 5.0, 2.0, 6.0, 7.0],
[0.0, np.nan, 0.2, np.nan, 0.4],
[np.nan, np.nan, np.nan, np.nan],
[np.nan, 0.1, np.nan, 0.3, 0.4, 0.5],
[0.5],
[np.nan, 0.7, 0.6],
],
)
def test_rolling_quantile_interpolation_options(quantile, interpolation, data):
# Tests that rolling window's quantile behavior is analogous to
# Series' quantile for each interpolation option
s = Series(data)
q1 = s.quantile(quantile, interpolation)
q2 = s.expanding(min_periods=1).quantile(quantile, interpolation).iloc[-1]
if np.isnan(q1):
assert np.isnan(q2)
else:
> assert q1 == q2
E assert 0.18000000000000005 == 0.18000000000000002
```
### Expected Behavior
Passing
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 0861da680b50accb312d9dc8f422aa65bcdaa2b8
python : 3.8.12.final.0
python-bits : 64
OS : Linux
OS-release : 5.11.0-38-generic
Version : #42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0.dev0+1056.g0861da680b
numpy : 1.22.0.dev0+1693.gf52acb53a
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 58.0.4
Cython : 0.29.24
pytest : 6.2.5
hypothesis : 6.23.1
sphinx : 4.2.0
blosc : None
feather : None
xlsxwriter : 3.0.1
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.28.0
pandas_datareader: None
bs4 : 4.10.0
bottleneck : 1.3.2
fsspec : 2021.11.0
fastparquet : 0.7.1
gcsfs : 2021.05.0
matplotlib : 3.4.3
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : 2021.11.0
scipy : 1.7.1
sqlalchemy : 1.4.25
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1
None
Process finished with exit code 0
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44343/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44343/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44344 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44344/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44344/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44344/events | https://github.com/pandas-dev/pandas/pull/44344 | 1,046,781,000 | PR_kwDOAA0YD84uMYcs | 44,344 | CI: Fix import of coo_matrix after scipy dev upgrade | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
},
{
"color": "d93f0b",
"default": false,
"description": "Required and optional dependencies",
"id": 527603109,
"name": "Dependencies",
"node_id": "MDU6TGFiZWw1Mjc2MDMxMDk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dependencies"
}
] | closed | false | null | [] | null | 5 | "2021-11-07T15:49:57Z" | "2021-11-13T19:32:29Z" | "2021-11-09T20:08:21Z" | MEMBER | null | New scipy_dev renamed ``coo`` to ``_coo`` to make it private | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44344/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44344/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44344.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44344",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44344.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44344"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44345 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44345/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44345/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44345/events | https://github.com/pandas-dev/pandas/pull/44345 | 1,046,824,902 | PR_kwDOAA0YD84uMggW | 44,345 | BUG: frame.loc[2:, 'z'] not setting inplace when multi-block | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 4 | "2021-11-07T19:04:39Z" | "2021-11-13T00:32:18Z" | "2021-11-13T00:28:44Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44345/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44345/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44345.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44345",
"merged_at": "2021-11-13T00:28:44Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44345.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44345"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44346 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44346/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44346/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44346/events | https://github.com/pandas-dev/pandas/pull/44346 | 1,046,831,415 | PR_kwDOAA0YD84uMhs5 | 44,346 | REF: re-remove _putmask_preserve | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "FCE94F",
"default": false,
"description": "Internal refactoring of code",
"id": 127681,
"name": "Refactor",
"node_id": "MDU6TGFiZWwxMjc2ODE=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Refactor"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-07T19:36:21Z" | "2021-11-10T02:14:07Z" | "2021-11-10T01:45:18Z" | MEMBER | null | Un-revert half of #44338 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44346/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44346/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44346.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44346",
"merged_at": "2021-11-10T01:45:18Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44346.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44346"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44347 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44347/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44347/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44347/events | https://github.com/pandas-dev/pandas/issues/44347 | 1,046,869,420 | I_kwDOAA0YD84-ZfWs | 44,347 | ENH: Use find_stack_level universally | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "f2f074",
"default": false,
"description": "Warnings that appear or should be added to pandas",
"id": 1628184320,
"name": "Warnings",
"node_id": "MDU6TGFiZWwxNjI4MTg0MzIw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Warnings"
}
] | open | false | null | [] | null | 1 | "2021-11-07T22:42:32Z" | "2021-11-11T15:08:08Z" | null | MEMBER | null | It can be difficult to determine where warnings are coming from in user code when the stacklevel used points to pandas internals. There were recent improvements (~6 months ago) to find_stack_level. Doing some time tests, I get the following results on my machine:
- Depth of 3: 0.149ms
- Depth of 100: 1.48ms
<details>
<summary>Timing code</summary>
```
# Added as a method of DataFrame
def foo(self, depth, runs):
if depth > 0:
self.foo(depth-1, runs)
else:
import time
from pandas.util._exceptions import find_stack_level
timer = time.time()
for _ in range(runs):
find_stack_level()
print(f'Average runtime: {(time.time() - timer) / runs : 0.10f}')
pd.DataFrame().foo(depth=100, runs=1000)
```
</details>
Is this reliable/performant enough to use universally in all warnings so that the stacklevel is always correct? | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44347/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44347/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44348 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44348/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44348/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44348/events | https://github.com/pandas-dev/pandas/pull/44348 | 1,046,873,472 | PR_kwDOAA0YD84uMphQ | 44,348 | CLN: address TODOs/FIXMEs | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-07T23:01:47Z" | "2021-11-08T14:57:32Z" | "2021-11-08T13:13:09Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44348/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44348/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44348.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44348",
"merged_at": "2021-11-08T13:13:09Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44348.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44348"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44349 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44349/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44349/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44349/events | https://github.com/pandas-dev/pandas/pull/44349 | 1,046,949,444 | PR_kwDOAA0YD84uM4uK | 44,349 | TYP: misc typing in _libs | {
"avatar_url": "https://avatars.githubusercontent.com/u/6618166?v=4",
"events_url": "https://api.github.com/users/twoertwein/events{/privacy}",
"followers_url": "https://api.github.com/users/twoertwein/followers",
"following_url": "https://api.github.com/users/twoertwein/following{/other_user}",
"gists_url": "https://api.github.com/users/twoertwein/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/twoertwein",
"id": 6618166,
"login": "twoertwein",
"node_id": "MDQ6VXNlcjY2MTgxNjY=",
"organizations_url": "https://api.github.com/users/twoertwein/orgs",
"received_events_url": "https://api.github.com/users/twoertwein/received_events",
"repos_url": "https://api.github.com/users/twoertwein/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/twoertwein/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/twoertwein/subscriptions",
"type": "User",
"url": "https://api.github.com/users/twoertwein"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-08T02:29:57Z" | "2021-11-16T01:35:17Z" | null | CONTRIBUTOR | null | Reduced the list of partially typed functions in _libs a bit. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44349/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44349/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44349.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44349",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44349.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44349"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44350 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44350/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44350/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44350/events | https://github.com/pandas-dev/pandas/issues/44350 | 1,047,125,937 | I_kwDOAA0YD84-ad-x | 44,350 | BUG: GROUPING UNPOPULATED DATAFRAME raises exception - index name clashes with duplicate column name | {
"avatar_url": "https://avatars.githubusercontent.com/u/9049037?v=4",
"events_url": "https://api.github.com/users/sjvdm/events{/privacy}",
"followers_url": "https://api.github.com/users/sjvdm/followers",
"following_url": "https://api.github.com/users/sjvdm/following{/other_user}",
"gists_url": "https://api.github.com/users/sjvdm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sjvdm",
"id": 9049037,
"login": "sjvdm",
"node_id": "MDQ6VXNlcjkwNDkwMzc=",
"organizations_url": "https://api.github.com/users/sjvdm/orgs",
"received_events_url": "https://api.github.com/users/sjvdm/received_events",
"repos_url": "https://api.github.com/users/sjvdm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sjvdm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sjvdm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sjvdm"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
}
] | open | false | null | [] | null | 0 | "2021-11-08T07:54:21Z" | "2021-11-14T04:20:26Z" | null | NONE | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
## GROUPING POPULATED DATAFRAME WORKS - index name does not clash with column name
df = pd.DataFrame(data={'f1':[1,2],'f2':[3,4],'f3':[5,6]})
df.groupby('f1').apply(lambda x: x.loc[:,'f2'].nunique()).reset_index()
#=======================================================================
## GROUPING UNPOPULATED DATAFRAME raises exception - index name clashes with duplicate column name
df = pd.DataFrame(columns=['f1','f2','f3'])
df = df.groupby('f1').apply(lambda x: x.loc[:,'f2'].nunique()).reset_index()
'''
ValueError: cannot insert f1, already exists
'''
```
### Issue Description
There is inconsistent behaviour when grouping a populated dataframe and an empty dataframe in terms of index naming. When the index is reset, an empty dataframe will raise an exception on duplicate key.
### Expected Behavior
Even when the dataframe is empty, it should not have the groupby key as a column (as with a populated dataframe)
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.8.3.final.0
python-bits : 64
OS : Linux
OS-release : 4.18.0-240.22.1.el8_3.x86_64
Version : #1 SMP Thu Apr 8 19:01:30 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.4
numpy : 1.20.3
pytz : 2021.1
dateutil : 2.8.1
pip : 21.3.1
setuptools : 46.4.0
Cython : 0.29.23
pytest : 6.2.4
hypothesis : None
sphinx : None
blosc : None
feather : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44350/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44350/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44351 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44351/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44351/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44351/events | https://github.com/pandas-dev/pandas/issues/44351 | 1,047,629,790 | I_kwDOAA0YD84-cY_e | 44,351 | REGR: Series.duplicated with category dtype and nulls raises ValueError | {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 47,
"created_at": "2021-10-16T17:29:59Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-11-28T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/91",
"id": 7259169,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91/labels",
"node_id": "MI_kwDOAA0YD84AbsQh",
"number": 91,
"open_issues": 23,
"state": "open",
"title": "1.3.5",
"updated_at": "2021-11-21T13:42:45Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91"
} | 0 | "2021-11-08T16:06:29Z" | "2021-11-12T03:09:35Z" | "2021-11-12T03:09:35Z" | MEMBER | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
import pandas as pd
print(pd.__version__)
tc = pd.Series(
pd.Categorical(
[True, False, True, False, pd.NA], categories=[True, False], ordered=True
)
)
print(tc.duplicated())
```
### Issue Description
xref https://github.com/pandas-dev/pandas/pull/44292#discussion_r741962868
code sample based on `test_drop_duplicates_categorical_bool`
on 1.3.4 (and master) code sample gives
```
1.3.4
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/tmp/ipykernel_47357/1277064552.py in <module>
7 )
8 )
----> 9 print(tc.duplicated())
~/miniconda3/envs/pandas-1.3.4/lib/python3.9/site-packages/pandas/core/series.py in duplicated(self, keep)
2215 dtype: bool
2216 """
-> 2217 res = self._duplicated(keep=keep)
2218 result = self._constructor(res, index=self.index)
2219 return result.__finalize__(self, method="duplicated")
~/miniconda3/envs/pandas-1.3.4/lib/python3.9/site-packages/pandas/core/base.py in _duplicated(self, keep)
1230 self, keep: Literal["first", "last", False] = "first"
1231 ) -> np.ndarray:
-> 1232 return duplicated(self._values, keep=keep)
~/miniconda3/envs/pandas-1.3.4/lib/python3.9/site-packages/pandas/core/algorithms.py in duplicated(values, keep)
925 duplicated : ndarray[bool]
926 """
--> 927 values, _ = _ensure_data(values)
928 return htable.duplicated(values, keep=keep)
929
~/miniconda3/envs/pandas-1.3.4/lib/python3.9/site-packages/pandas/core/algorithms.py in _ensure_data(values)
139 # i.e. all-bool Categorical, BooleanArray
140 try:
--> 141 return np.asarray(values).astype("uint8", copy=False), values.dtype
142 except TypeError:
143 # GH#42107 we have pd.NAs present
ValueError: cannot convert float NaN to integer
```
### Expected Behavior
on 1.2.5 code sample gives
```
1.2.5
0 False
1 False
2 True
3 True
4 False
dtype: bool
```
### Installed Versions
. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44351/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44351/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44352 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44352/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44352/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44352/events | https://github.com/pandas-dev/pandas/pull/44352 | 1,047,786,770 | PR_kwDOAA0YD84uPnSJ | 44,352 | changed shape argument for ndarray from int to tuple in ./core/strings/object_array.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/44080390?v=4",
"events_url": "https://api.github.com/users/nickleus27/events{/privacy}",
"followers_url": "https://api.github.com/users/nickleus27/followers",
"following_url": "https://api.github.com/users/nickleus27/following{/other_user}",
"gists_url": "https://api.github.com/users/nickleus27/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nickleus27",
"id": 44080390,
"login": "nickleus27",
"node_id": "MDQ6VXNlcjQ0MDgwMzkw",
"organizations_url": "https://api.github.com/users/nickleus27/orgs",
"received_events_url": "https://api.github.com/users/nickleus27/received_events",
"repos_url": "https://api.github.com/users/nickleus27/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nickleus27/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nickleus27/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nickleus27"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 4 | "2021-11-08T18:35:46Z" | "2021-11-16T00:57:37Z" | "2021-11-16T00:57:31Z" | CONTRIBUTOR | null | xref #37715
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44352/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44352/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44352.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44352",
"merged_at": "2021-11-16T00:57:31Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44352.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44352"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44353 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44353/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44353/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44353/events | https://github.com/pandas-dev/pandas/issues/44353 | 1,047,806,371 | I_kwDOAA0YD84-dEGj | 44,353 | BUG/API: DataFrame.iloc[:, foo] = bar inplaceness? | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | open | false | null | [] | null | 4 | "2021-11-08T18:51:28Z" | "2021-11-14T19:45:37Z" | null | MEMBER | null | In 1.3.0 we made it so that `df["A"] = foo` *never* operates in-place (xref [whatsnew](https://github.com/pandas-dev/pandas/blob/master/doc/source/whatsnew/v1.3.0.rst#never-operate-inplace-when-setting-framekeys--values), #33457) and *mostly* made it so that `df.loc[foo, bar] = baz` tries to operate in-place before falling back to casting (xref [whatsnew](https://github.com/pandas-dev/pandas/blob/master/doc/source/whatsnew/v1.3.0.rst#try-operating-inplace-when-setting-values-with-loc-and-iloc), https://github.com/pandas-dev/pandas/issues/33457#issuecomment-660126628)
There are some remaining cases where .iloc and .loc do not try to set inplace. This issue is to make sure we have consensus about changing/deprecating that behavior. Most of the impacted test cases involve doing an astype, e.g.
```
import numpy as np
import pandas as pd
df = pd.DataFrame(np.random.randn(4).reshape(2, 2), dtype=object)
df.iloc[:, 0] = df.iloc[:, 0].astype(np.float64)
```
ATM this changes df[0] to float64, i.e. is not inplace.
In this case, the user could/should do `df[0] = df[0].astype(np.float64)`. But that approach runs into problems with either non-unique columns or setting a slice of columns `df.iloc[:, :2] = foo`
My thoughts are that 1) we should be consistent about inplace-ness, not special-case the API and 2) the use case here _is_ convenient.
Thoughts?
<b>update</b> Cataloguing issues/PRs where this behavior we implemented apparently-intentionally
#29393 (#25495)
#6149
#6159 BUG/API: df['col'] = value and df.loc[:,'col'] = value are now completely equivalent | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44353/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44353/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44354 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44354/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44354/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44354/events | https://github.com/pandas-dev/pandas/issues/44354 | 1,047,864,850 | I_kwDOAA0YD84-dSYS | 44,354 | ENH: add suffixes argument to DataFrame.compare | {
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 1 | "2021-11-08T20:02:11Z" | "2021-11-09T01:52:42Z" | null | CONTRIBUTOR | null | #### Is your feature request related to a problem?
It would be convenient to choose other suffixes in `DataFrame.compare` than `self, other`
#### Describe the solution you'd like
Add argument `suffixes` so users can specify them.
#### API breaking implications
None
#### Additional context
```python
df = pd.DataFrame(
{"col1": ["a", "b", "c"], "col2": [1.0, 2.0, np.nan], "col3": [1.0, 2.0, 3.0]},
columns=["col1", "col2", "col3"],
)
df2 = df.copy()
df2.loc[0, "col1"] = "c"
df2.loc[2, "col3"] = np.nan
diff = df.compare(df2, suffixes=["left", "right"])
print(diff)
col1 col3
left right left right
0 a c NaN NaN
2 NaN NaN 3.0 NaN
```
| {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44354/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44354/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44355 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44355/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44355/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44355/events | https://github.com/pandas-dev/pandas/pull/44355 | 1,047,950,981 | PR_kwDOAA0YD84uQJyc | 44,355 | CLN: split giant dt accessor tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-11-08T21:45:28Z" | "2021-11-10T02:14:25Z" | "2021-11-10T01:43:48Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44355/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44355/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44355.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44355",
"merged_at": "2021-11-10T01:43:48Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44355.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44355"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44356 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44356/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44356/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44356/events | https://github.com/pandas-dev/pandas/pull/44356 | 1,047,971,948 | PR_kwDOAA0YD84uQOQn | 44,356 | Fixed regression in Series.duplicated for categorical dtype with bool categories | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 47,
"created_at": "2021-10-16T17:29:59Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-11-28T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/91",
"id": 7259169,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91/labels",
"node_id": "MI_kwDOAA0YD84AbsQh",
"number": 91,
"open_issues": 23,
"state": "open",
"title": "1.3.5",
"updated_at": "2021-11-21T13:42:45Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91"
} | 5 | "2021-11-08T22:10:59Z" | "2021-11-12T11:44:04Z" | "2021-11-12T03:09:36Z" | MEMBER | null | - [x] closes #44351
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44356/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44356/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44356.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44356",
"merged_at": "2021-11-12T03:09:35Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44356.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44356"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44357 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44357/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44357/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44357/events | https://github.com/pandas-dev/pandas/pull/44357 | 1,047,989,972 | PR_kwDOAA0YD84uQSEZ | 44,357 | DOC: Clarify DST rounding behavior in Timestamp/DatetimeIndex | {
"avatar_url": "https://avatars.githubusercontent.com/u/10647082?v=4",
"events_url": "https://api.github.com/users/mroeschke/events{/privacy}",
"followers_url": "https://api.github.com/users/mroeschke/followers",
"following_url": "https://api.github.com/users/mroeschke/following{/other_user}",
"gists_url": "https://api.github.com/users/mroeschke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mroeschke",
"id": 10647082,
"login": "mroeschke",
"node_id": "MDQ6VXNlcjEwNjQ3MDgy",
"organizations_url": "https://api.github.com/users/mroeschke/orgs",
"received_events_url": "https://api.github.com/users/mroeschke/received_events",
"repos_url": "https://api.github.com/users/mroeschke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mroeschke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mroeschke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mroeschke"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 7 | "2021-11-08T22:35:44Z" | "2021-11-17T17:48:56Z" | "2021-11-17T13:52:38Z" | MEMBER | null | xref https://github.com/pandas-dev/pandas/issues/44287
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44357/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44357/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44357.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44357",
"merged_at": "2021-11-17T13:52:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44357.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44357"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44358 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44358/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44358/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44358/events | https://github.com/pandas-dev/pandas/pull/44358 | 1,047,996,653 | PR_kwDOAA0YD84uQTeP | 44,358 | ENH: Use find_stack_level in pandas.core | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-11-08T22:47:15Z" | "2021-11-12T03:56:34Z" | "2021-11-12T03:19:05Z" | MEMBER | null | Part of #44347
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
This handles most of the stacklevels in core. A few more will take a bit more effort, separating out into a separate PR. After all stacklevels are replaced, will be removing `check_stacklevel=False` from the tests. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44358/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44358/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44358.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44358",
"merged_at": "2021-11-12T03:19:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44358.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44358"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44359 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44359/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44359/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44359/events | https://github.com/pandas-dev/pandas/pull/44359 | 1,047,998,654 | PR_kwDOAA0YD84uQT43 | 44,359 | Update cython version for asv conf | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "ae68cc",
"default": false,
"description": "Performance (ASV) benchmarks",
"id": 732775912,
"name": "Benchmark",
"node_id": "MDU6TGFiZWw3MzI3NzU5MTI=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Benchmark"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 4 | "2021-11-08T22:50:32Z" | "2021-11-09T21:25:00Z" | "2021-11-09T21:24:47Z" | MEMBER | null | - [x] closes #44067
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44359/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44359/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44359.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44359",
"merged_at": "2021-11-09T21:24:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44359.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44359"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44360 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44360/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44360/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44360/events | https://github.com/pandas-dev/pandas/pull/44360 | 1,047,999,303 | PR_kwDOAA0YD84uQUBE | 44,360 | TYP: changed variable hashed to combined_hashed in dtype.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/44080390?v=4",
"events_url": "https://api.github.com/users/nickleus27/events{/privacy}",
"followers_url": "https://api.github.com/users/nickleus27/followers",
"following_url": "https://api.github.com/users/nickleus27/following{/other_user}",
"gists_url": "https://api.github.com/users/nickleus27/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nickleus27",
"id": 44080390,
"login": "nickleus27",
"node_id": "MDQ6VXNlcjQ0MDgwMzkw",
"organizations_url": "https://api.github.com/users/nickleus27/orgs",
"received_events_url": "https://api.github.com/users/nickleus27/received_events",
"repos_url": "https://api.github.com/users/nickleus27/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nickleus27/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nickleus27/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nickleus27"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | null | 1 | "2021-11-08T22:51:37Z" | "2021-11-09T21:31:52Z" | "2021-11-09T17:16:23Z" | CONTRIBUTOR | null | xref #37715 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44360/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44360/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44360.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44360",
"merged_at": "2021-11-09T17:16:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44360.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44360"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44361 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44361/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44361/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44361/events | https://github.com/pandas-dev/pandas/pull/44361 | 1,048,008,896 | PR_kwDOAA0YD84uQV_3 | 44,361 | CLN: Removed _SAFE_NAMES_WARNING in io.sql | {
"avatar_url": "https://avatars.githubusercontent.com/u/29585319?v=4",
"events_url": "https://api.github.com/users/EdAbati/events{/privacy}",
"followers_url": "https://api.github.com/users/EdAbati/followers",
"following_url": "https://api.github.com/users/EdAbati/following{/other_user}",
"gists_url": "https://api.github.com/users/EdAbati/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/EdAbati",
"id": 29585319,
"login": "EdAbati",
"node_id": "MDQ6VXNlcjI5NTg1MzE5",
"organizations_url": "https://api.github.com/users/EdAbati/orgs",
"received_events_url": "https://api.github.com/users/EdAbati/received_events",
"repos_url": "https://api.github.com/users/EdAbati/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/EdAbati/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/EdAbati/subscriptions",
"type": "User",
"url": "https://api.github.com/users/EdAbati"
} | [
{
"color": "5319e7",
"default": false,
"description": "to_sql, read_sql, read_sql_query",
"id": 47232590,
"name": "IO SQL",
"node_id": "MDU6TGFiZWw0NzIzMjU5MA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20SQL"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-08T23:06:17Z" | "2021-11-14T20:24:29Z" | "2021-11-14T20:24:19Z" | CONTRIBUTOR | null | - [x] closes #44295
- [x] tests passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
Please let me know if I should improve/change something. Thank you very much! | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44361/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44361/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44361.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44361",
"merged_at": "2021-11-14T20:24:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44361.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44361"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44362 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44362/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44362/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44362/events | https://github.com/pandas-dev/pandas/pull/44362 | 1,048,011,723 | PR_kwDOAA0YD84uQWnC | 44,362 | CI: xfail tests failing on numpy dev | {
"avatar_url": "https://avatars.githubusercontent.com/u/16733618?v=4",
"events_url": "https://api.github.com/users/alimcmaster1/events{/privacy}",
"followers_url": "https://api.github.com/users/alimcmaster1/followers",
"following_url": "https://api.github.com/users/alimcmaster1/following{/other_user}",
"gists_url": "https://api.github.com/users/alimcmaster1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alimcmaster1",
"id": 16733618,
"login": "alimcmaster1",
"node_id": "MDQ6VXNlcjE2NzMzNjE4",
"organizations_url": "https://api.github.com/users/alimcmaster1/orgs",
"received_events_url": "https://api.github.com/users/alimcmaster1/received_events",
"repos_url": "https://api.github.com/users/alimcmaster1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alimcmaster1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alimcmaster1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alimcmaster1"
} | [
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 47,
"created_at": "2021-10-16T17:29:59Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-11-28T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/91",
"id": 7259169,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91/labels",
"node_id": "MI_kwDOAA0YD84AbsQh",
"number": 91,
"open_issues": 23,
"state": "open",
"title": "1.3.5",
"updated_at": "2021-11-21T13:42:45Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91"
} | 3 | "2021-11-08T23:09:44Z" | "2021-11-09T19:55:27Z" | "2021-11-09T01:17:50Z" | CONTRIBUTOR | null | - [x] ref #44343
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44362/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44362/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44362.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44362",
"merged_at": "2021-11-09T01:17:50Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44362.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44362"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44363 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44363/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44363/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44363/events | https://github.com/pandas-dev/pandas/issues/44363 | 1,048,072,493 | I_kwDOAA0YD84-eFEt | 44,363 | BUG: Unexpected period range index shift | {
"avatar_url": "https://avatars.githubusercontent.com/u/93783692?v=4",
"events_url": "https://api.github.com/users/jmcinto/events{/privacy}",
"followers_url": "https://api.github.com/users/jmcinto/followers",
"following_url": "https://api.github.com/users/jmcinto/following{/other_user}",
"gists_url": "https://api.github.com/users/jmcinto/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jmcinto",
"id": 93783692,
"login": "jmcinto",
"node_id": "U_kgDOBZcGjA",
"organizations_url": "https://api.github.com/users/jmcinto/orgs",
"received_events_url": "https://api.github.com/users/jmcinto/received_events",
"repos_url": "https://api.github.com/users/jmcinto/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jmcinto/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jmcinto/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jmcinto"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "eb6420",
"default": false,
"description": "Period data type",
"id": 60635328,
"name": "Period",
"node_id": "MDU6TGFiZWw2MDYzNTMyOA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Period"
},
{
"color": "207de5",
"default": false,
"description": "resample method",
"id": 74975453,
"name": "Resample",
"node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample"
}
] | open | false | null | [] | null | 2 | "2021-11-09T00:56:11Z" | "2021-11-16T01:54:02Z" | null | NONE | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
import pandas as pd
from datetime import datetime
print(pd.__version__)
df = pd.DataFrame(range(24))
df.index = pd.period_range(datetime(1900,1,1), periods=24, freq="1H")
resamp = df.resample("6H",label='right', closed='right').sum()
```
### Issue Description
Resampling a df that has a period range index results in an unexpected temporal shift in the results in the pandas version 1.3.4. This can be seen by running the example code in version 1.3.4 and comparing the results to version 1.0.5.
### Expected Behavior
Running the example code in version 1.0.5 results in the expected behavior.
### Installed Versions
1.3.4
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44363/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44363/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44364 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44364/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44364/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44364/events | https://github.com/pandas-dev/pandas/pull/44364 | 1,048,177,345 | PR_kwDOAA0YD84uQ4hX | 44,364 | BUG/API: implement DayDST | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [] | open | false | null | [] | null | 2 | "2021-11-09T04:26:07Z" | "2021-11-11T00:29:57Z" | null | MEMBER | null | xref #41943 cc @mroeschke
The tests all passed locally up until the last commit, have a handful of broken resample tests now.
The approach here is to keep Day as-is and implement DayDST, fix the actively-wrong infer_freq behavior (see test_infer_freq_across_dst_not_daily), then decide what to do with `freq="infer"` and `freq="D"` based on the presence of a tz.
I guess a deprecation path would be to warn users passing "D" or Day() that it will have DST-aware semantics in the future, and to keep Timedelta-like behavior they should pass "24H". Would we want to warn in cases where they are equvialent, e.g. tz="UTC" or with a date_range that doesn't happen to cross a DST transition?
With such a deprecation cycle, we could avoid implementing DayDST and when the time comes just call it Day. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44364/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44364/timeline | null | 1 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44364.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44364",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44364.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44364"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44365 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44365/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44365/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44365/events | https://github.com/pandas-dev/pandas/pull/44365 | 1,048,259,802 | PR_kwDOAA0YD84uRJTO | 44,365 | ENH: add suffixes argument to compare | {
"avatar_url": "https://avatars.githubusercontent.com/u/34067903?v=4",
"events_url": "https://api.github.com/users/erfannariman/events{/privacy}",
"followers_url": "https://api.github.com/users/erfannariman/followers",
"following_url": "https://api.github.com/users/erfannariman/following{/other_user}",
"gists_url": "https://api.github.com/users/erfannariman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erfannariman",
"id": 34067903,
"login": "erfannariman",
"node_id": "MDQ6VXNlcjM0MDY3OTAz",
"organizations_url": "https://api.github.com/users/erfannariman/orgs",
"received_events_url": "https://api.github.com/users/erfannariman/received_events",
"repos_url": "https://api.github.com/users/erfannariman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erfannariman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erfannariman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erfannariman"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
] | open | false | null | [] | null | 0 | "2021-11-09T07:06:34Z" | "2021-11-14T02:30:47Z" | null | CONTRIBUTOR | null | - [x] closes #44354
- [ ] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44365/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44365/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44365.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44365",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44365.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44365"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44366 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44366/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44366/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44366/events | https://github.com/pandas-dev/pandas/issues/44366 | 1,048,341,015 | I_kwDOAA0YD84-fGoX | 44,366 | BUG: parse_dates=False while passing date_parser tries to use date parser | {
"avatar_url": "https://avatars.githubusercontent.com/u/32839123?v=4",
"events_url": "https://api.github.com/users/Rik-de-Kort/events{/privacy}",
"followers_url": "https://api.github.com/users/Rik-de-Kort/followers",
"following_url": "https://api.github.com/users/Rik-de-Kort/following{/other_user}",
"gists_url": "https://api.github.com/users/Rik-de-Kort/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Rik-de-Kort",
"id": 32839123,
"login": "Rik-de-Kort",
"node_id": "MDQ6VXNlcjMyODM5MTIz",
"organizations_url": "https://api.github.com/users/Rik-de-Kort/orgs",
"received_events_url": "https://api.github.com/users/Rik-de-Kort/received_events",
"repos_url": "https://api.github.com/users/Rik-de-Kort/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Rik-de-Kort/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rik-de-Kort/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Rik-de-Kort"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
}
] | open | false | null | [] | null | 0 | "2021-11-09T08:50:33Z" | "2021-11-14T04:25:14Z" | null | CONTRIBUTOR | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
with open('tmp.csv', 'w+') as handle:
handle.write('a;b;c\n0;0,00;0')
def parser(p):
raise ValueError("Tried to use parser")
pd.read_csv('tmp.csv', date_parser=parser, parse_dates=False)
```
### Issue Description
Date parser gets run even when `parse_dates` is set to False. This happens because Line 510 in readers.py ([link](https://github.com/pandas-dev/pandas/blob/master/pandas/io/parsers/readers.py#L510) only checks whether `parse_dates` is a bool rather than the value.
I've not been able to reproduce without the comma and semicolons in there.
### Expected Behavior
Getting the same result as `pd.read_csv('tmp.csv')` which is a malformed DataFrame.
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 2cb96529396d93b46abab7bbc73a208e708c642e
python : 3.8.10.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.18363
machine : AMD64
processor : Intel64 Family 6 Model 85 Stepping 4, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United Kingdom.1252
pandas : 1.2.4
numpy : 1.20.2
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1.1
setuptools : 52.0.0.post20210125
Cython : None
pytest : 6.2.4
hypothesis : 6.14.1
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : None
pyxlsb : 1.0.8
s3fs : None
scipy : None
sqlalchemy : 1.4.22
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44366/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44366/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44367 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44367/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44367/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44367/events | https://github.com/pandas-dev/pandas/pull/44367 | 1,048,900,289 | PR_kwDOAA0YD84uTPJ8 | 44,367 | CLN: split/fixturize to_datetime tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-09T17:49:52Z" | "2021-11-11T17:53:06Z" | "2021-11-11T17:51:20Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44367/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44367/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44367.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44367",
"merged_at": "2021-11-11T17:51:20Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44367.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44367"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44368 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44368/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44368/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44368/events | https://github.com/pandas-dev/pandas/issues/44368 | 1,048,901,502 | I_kwDOAA0YD84-hPd- | 44,368 | DOC: BooleanDtype needs an instance to use pyarrow types_mapper parameter | {
"avatar_url": "https://avatars.githubusercontent.com/u/247555?v=4",
"events_url": "https://api.github.com/users/tswast/events{/privacy}",
"followers_url": "https://api.github.com/users/tswast/followers",
"following_url": "https://api.github.com/users/tswast/following{/other_user}",
"gists_url": "https://api.github.com/users/tswast/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tswast",
"id": 247555,
"login": "tswast",
"node_id": "MDQ6VXNlcjI0NzU1NQ==",
"organizations_url": "https://api.github.com/users/tswast/orgs",
"received_events_url": "https://api.github.com/users/tswast/received_events",
"repos_url": "https://api.github.com/users/tswast/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tswast/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tswast/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tswast"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "f9d0c4",
"default": false,
"description": "",
"id": 3303158446,
"name": "Arrow",
"node_id": "MDU6TGFiZWwzMzAzMTU4NDQ2",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Arrow"
}
] | closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/247555?v=4",
"events_url": "https://api.github.com/users/tswast/events{/privacy}",
"followers_url": "https://api.github.com/users/tswast/followers",
"following_url": "https://api.github.com/users/tswast/following{/other_user}",
"gists_url": "https://api.github.com/users/tswast/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tswast",
"id": 247555,
"login": "tswast",
"node_id": "MDQ6VXNlcjI0NzU1NQ==",
"organizations_url": "https://api.github.com/users/tswast/orgs",
"received_events_url": "https://api.github.com/users/tswast/received_events",
"repos_url": "https://api.github.com/users/tswast/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tswast/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tswast/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tswast"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/247555?v=4",
"events_url": "https://api.github.com/users/tswast/events{/privacy}",
"followers_url": "https://api.github.com/users/tswast/followers",
"following_url": "https://api.github.com/users/tswast/following{/other_user}",
"gists_url": "https://api.github.com/users/tswast/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tswast",
"id": 247555,
"login": "tswast",
"node_id": "MDQ6VXNlcjI0NzU1NQ==",
"organizations_url": "https://api.github.com/users/tswast/orgs",
"received_events_url": "https://api.github.com/users/tswast/received_events",
"repos_url": "https://api.github.com/users/tswast/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tswast/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tswast/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tswast"
}
] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 2 | "2021-11-09T17:51:17Z" | "2021-11-10T01:57:15Z" | "2021-11-09T22:30:55Z" | CONTRIBUTOR | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
import pyarrow
def types_mapper(arrow_type):
if pyarrow.types.is_boolean(arrow_type):
return pd.BooleanDtype
pyarrow_array = pyarrow.array([True, None, False], type=pyarrow.bool_())
expected = pd.Series([True, None, False], dtype="boolean")
# Convert to RecordBatch because types_mapper argument is ignored when
# using a pyarrow.Array. https://issues.apache.org/jira/browse/ARROW-9664
record_batch = pyarrow.RecordBatch.from_arrays([pyarrow_array], ["test_col"])
dataframe = record_batch.to_pandas(date_as_object=False, types_mapper=types_mapper)
series = dataframe["test_col"]
pd.testing.assert_series_equal(series, expected, check_names=False
```
### Issue Description
```
_______________________________________________________________________ test_from_arrow _______________________________________________________________________
def test_from_arrow():
pyarrow = pytest.importorskip("pyarrow")
def types_mapper(arrow_type):
if pyarrow.types.is_boolean(arrow_type):
return pd.BooleanDtype
pyarrow_array = pyarrow.array([True, None, False], type=pyarrow.bool_())
expected = pd.Series([True, None, False], dtype="boolean")
# Convert to RecordBatch because types_mapper argument is ignored when
# using a pyarrow.Array. https://issues.apache.org/jira/browse/ARROW-9664
record_batch = pyarrow.RecordBatch.from_arrays([pyarrow_array], ["test_col"])
> dataframe = record_batch.to_pandas(date_as_object=False, types_mapper=types_mapper)
pandas/tests/extension/test_boolean.py:415:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyarrow/array.pxi:757: in pyarrow.lib._PandasConvertible.to_pandas
???
pyarrow/table.pxi:951: in pyarrow.lib.RecordBatch._to_pandas
???
pyarrow/table.pxi:1748: in pyarrow.lib.Table._to_pandas
???
/usr/local/Caskroom/miniconda/base/envs/pandas-dev/lib/python3.8/site-packages/pyarrow/pandas_compat.py:789: in table_to_blockmanager
blocks = _table_to_blocks(options, table, categories, ext_columns_dtypes)
/usr/local/Caskroom/miniconda/base/envs/pandas-dev/lib/python3.8/site-packages/pyarrow/pandas_compat.py:1130: in _table_to_blocks
return [_reconstruct_block(item, columns, extension_columns)
/usr/local/Caskroom/miniconda/base/envs/pandas-dev/lib/python3.8/site-packages/pyarrow/pandas_compat.py:1130: in <listcomp>
return [_reconstruct_block(item, columns, extension_columns)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = {'placement': array([0]), 'py_array': <pyarrow.lib.ChunkedArray object at 0x7ffb60c6d6d0>
[
[
true,
null,
false
]
]}
columns = ['test_col'], extension_columns = {'test_col': <class 'pandas.core.arrays.boolean.BooleanDtype'>}
def _reconstruct_block(item, columns=None, extension_columns=None):
"""
Construct a pandas Block from the `item` dictionary coming from pyarrow's
serialization or returned by arrow::python::ConvertTableToPandas.
This function takes care of converting dictionary types to pandas
categorical, Timestamp-with-timezones to the proper pandas Block, and
conversion to pandas ExtensionBlock
Parameters
----------
item : dict
For basic types, this is a dictionary in the form of
{'block': np.ndarray of values, 'placement': pandas block placement}.
Additional keys are present for other types (dictionary, timezone,
object).
columns :
Column names of the table being constructed, used for extension types
extension_columns : dict
Dictionary of {column_name: pandas_dtype} that includes all columns
and corresponding dtypes that will be converted to a pandas
ExtensionBlock.
Returns
-------
pandas Block
"""
import pandas.core.internals as _int
block_arr = item.get('block', None)
placement = item['placement']
if 'dictionary' in item:
cat = _pandas_api.categorical_type.from_codes(
block_arr, categories=item['dictionary'],
ordered=item['ordered'])
block = _int.make_block(cat, placement=placement)
elif 'timezone' in item:
dtype = make_datetimetz(item['timezone'])
block = _int.make_block(block_arr, placement=placement,
klass=_int.DatetimeTZBlock,
dtype=dtype)
elif 'object' in item:
block = _int.make_block(builtin_pickle.loads(block_arr),
placement=placement)
elif 'py_array' in item:
# create ExtensionBlock
arr = item['py_array']
assert len(placement) == 1
name = columns[placement[0]]
pandas_dtype = extension_columns[name]
if not hasattr(pandas_dtype, '__from_arrow__'):
raise ValueError("This column does not support to be converted "
"to a pandas ExtensionArray")
> pd_ext_arr = pandas_dtype.__from_arrow__(arr)
E TypeError: __from_arrow__() missing 1 required positional argument: 'array'
/usr/local/Caskroom/miniconda/base/envs/pandas-dev/lib/python3.8/site-packages/pyarrow/pandas_compat.py:749: TypeError
```
### Expected Behavior
Should be able to create boolean series from boolean pyarrow array.
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 10e23e882b40094ae8dad7533b9840f1a43908a4
python : 3.8.10.final.0
python-bits : 64
OS : Darwin
OS-release : 20.6.0
Version : Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0.dev0+1064.g10e23e882b.dirty
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.3.1
setuptools : 57.4.0
Cython : 0.29.24
pytest : 6.2.5
hypothesis : 6.24.2
sphinx : 4.2.0
blosc : None
feather : None
xlsxwriter : 3.0.2
lxml.etree : 4.6.4
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.2
IPython : 7.29.0
pandas_datareader: None
bs4 : 4.10.0
bottleneck : 1.3.2
fsspec : 2021.10.1
fastparquet : 0.7.1
gcsfs : 2021.10.1
matplotlib : 3.4.3
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : 2021.10.1
scipy : 1.7.2
sqlalchemy : 1.4.26
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44368/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44368/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44369 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44369/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44369/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44369/events | https://github.com/pandas-dev/pandas/pull/44369 | 1,048,906,109 | PR_kwDOAA0YD84uTQWH | 44,369 | TST: check compatibility with pyarrow types_mapper parameter | {
"avatar_url": "https://avatars.githubusercontent.com/u/247555?v=4",
"events_url": "https://api.github.com/users/tswast/events{/privacy}",
"followers_url": "https://api.github.com/users/tswast/followers",
"following_url": "https://api.github.com/users/tswast/following{/other_user}",
"gists_url": "https://api.github.com/users/tswast/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tswast",
"id": 247555,
"login": "tswast",
"node_id": "MDQ6VXNlcjI0NzU1NQ==",
"organizations_url": "https://api.github.com/users/tswast/orgs",
"received_events_url": "https://api.github.com/users/tswast/received_events",
"repos_url": "https://api.github.com/users/tswast/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tswast/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tswast/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tswast"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "f9d0c4",
"default": false,
"description": "",
"id": 3303158446,
"name": "Arrow",
"node_id": "MDU6TGFiZWwzMzAzMTU4NDQ2",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Arrow"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-09T17:56:38Z" | "2021-11-14T02:22:52Z" | null | CONTRIBUTOR | null | - [x] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
Closes #44368 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44369/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44369/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44369.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44369",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44369.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44369"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44370 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44370/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44370/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44370/events | https://github.com/pandas-dev/pandas/pull/44370 | 1,049,047,496 | PR_kwDOAA0YD84uTvRu | 44,370 | Backport PR #44362 on branch 1.3.x (CI: xfail tests failing on numpy dev) | {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
} | [
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 47,
"created_at": "2021-10-16T17:29:59Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-11-28T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/91",
"id": 7259169,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91/labels",
"node_id": "MI_kwDOAA0YD84AbsQh",
"number": 91,
"open_issues": 23,
"state": "open",
"title": "1.3.5",
"updated_at": "2021-11-21T13:42:45Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91"
} | 0 | "2021-11-09T19:54:51Z" | "2021-11-09T21:23:37Z" | "2021-11-09T21:23:33Z" | MEMBER | null | Backport PR #44362 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44370/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44370/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44370.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44370",
"merged_at": "2021-11-09T21:23:33Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44370.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44370"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44371 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44371/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44371/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44371/events | https://github.com/pandas-dev/pandas/pull/44371 | 1,049,052,421 | PR_kwDOAA0YD84uTwRq | 44,371 | TST: test that Int64 series can be created from pyarrow array | {
"avatar_url": "https://avatars.githubusercontent.com/u/247555?v=4",
"events_url": "https://api.github.com/users/tswast/events{/privacy}",
"followers_url": "https://api.github.com/users/tswast/followers",
"following_url": "https://api.github.com/users/tswast/following{/other_user}",
"gists_url": "https://api.github.com/users/tswast/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tswast",
"id": 247555,
"login": "tswast",
"node_id": "MDQ6VXNlcjI0NzU1NQ==",
"organizations_url": "https://api.github.com/users/tswast/orgs",
"received_events_url": "https://api.github.com/users/tswast/received_events",
"repos_url": "https://api.github.com/users/tswast/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tswast/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tswast/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tswast"
} | [] | closed | false | null | [] | null | 2 | "2021-11-09T20:01:01Z" | "2021-11-10T18:42:30Z" | "2021-11-10T18:42:25Z" | CONTRIBUTOR | null | - [x] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
Closes #44368 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44371/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44371/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44371.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44371",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44371.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44371"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44372 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44372/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44372/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44372/events | https://github.com/pandas-dev/pandas/pull/44372 | 1,049,057,262 | PR_kwDOAA0YD84uTxT4 | 44,372 | TST: split/collect partial tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-09T20:06:53Z" | "2021-11-11T17:53:16Z" | "2021-11-11T17:51:02Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44372/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44372/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44372.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44372",
"merged_at": "2021-11-11T17:51:02Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44372.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44372"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44373 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44373/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44373/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44373/events | https://github.com/pandas-dev/pandas/pull/44373 | 1,049,161,097 | PR_kwDOAA0YD84uUHEC | 44,373 | TYP: changed variable cat_array to cat_array_list in dtypes.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/44080390?v=4",
"events_url": "https://api.github.com/users/nickleus27/events{/privacy}",
"followers_url": "https://api.github.com/users/nickleus27/followers",
"following_url": "https://api.github.com/users/nickleus27/following{/other_user}",
"gists_url": "https://api.github.com/users/nickleus27/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nickleus27",
"id": 44080390,
"login": "nickleus27",
"node_id": "MDQ6VXNlcjQ0MDgwMzkw",
"organizations_url": "https://api.github.com/users/nickleus27/orgs",
"received_events_url": "https://api.github.com/users/nickleus27/received_events",
"repos_url": "https://api.github.com/users/nickleus27/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nickleus27/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nickleus27/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nickleus27"
} | [] | open | false | null | [] | null | 2 | "2021-11-09T21:59:02Z" | "2021-11-14T05:57:17Z" | null | CONTRIBUTOR | null | xref #37715 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44373/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44373/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44373.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44373",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44373.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44373"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44374 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44374/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44374/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44374/events | https://github.com/pandas-dev/pandas/pull/44374 | 1,049,166,611 | PR_kwDOAA0YD84uUIOg | 44,374 | TST: Make tests for groupby median/mean more strict on dtype | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
] | closed | false | null | [] | null | 1 | "2021-11-09T22:06:34Z" | "2021-11-11T22:27:28Z" | "2021-11-11T00:17:10Z" | MEMBER | null | - [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
Followup to #41139. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44374/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44374/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44374.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44374",
"merged_at": "2021-11-11T00:17:09Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44374.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44374"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44375 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44375/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44375/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44375/events | https://github.com/pandas-dev/pandas/pull/44375 | 1,049,173,962 | PR_kwDOAA0YD84uUJxg | 44,375 | CLN: misplaced indexing tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
},
{
"color": "e99695",
"default": false,
"description": "Related to the Index class or subclasses",
"id": 1218227310,
"name": "Index",
"node_id": "MDU6TGFiZWwxMjE4MjI3MzEw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Index"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-09T22:17:05Z" | "2021-11-11T15:12:14Z" | "2021-11-11T13:40:52Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44375/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44375/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44375.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44375",
"merged_at": "2021-11-11T13:40:52Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44375.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44375"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44376 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44376/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44376/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44376/events | https://github.com/pandas-dev/pandas/issues/44376 | 1,049,210,878 | I_kwDOAA0YD84-ia_- | 44,376 | CI: Pyarrow 6.0.0 breaks ci | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
},
{
"color": "d93f0b",
"default": false,
"description": "Required and optional dependencies",
"id": 527603109,
"name": "Dependencies",
"node_id": "MDU6TGFiZWw1Mjc2MDMxMDk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dependencies"
}
] | closed | false | null | [] | null | 1 | "2021-11-09T22:58:56Z" | "2021-11-09T22:59:53Z" | "2021-11-09T22:59:53Z" | MEMBER | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
def test_date_col_as_index_col(all_parsers):
data = """\
KORD,19990127 19:00:00, 18:56:00, 0.8100, 2.8100, 7.2000, 0.0000, 280.0000
KORD,19990127 20:00:00, 19:56:00, 0.0100, 2.2100, 7.2000, 0.0000, 260.0000
KORD,19990127 21:00:00, 20:56:00, -0.5900, 2.2100, 5.7000, 0.0000, 280.0000
KORD,19990127 21:00:00, 21:18:00, -0.9900, 2.0100, 3.6000, 0.0000, 270.0000
KORD,19990127 22:00:00, 21:56:00, -0.5900, 1.7100, 5.1000, 0.0000, 290.0000
"""
parser = all_parsers
result = parser.read_csv(
StringIO(data), header=None, prefix="X", parse_dates=[1], index_col=1
)
index = Index(
[
datetime(1999, 1, 27, 19, 0),
datetime(1999, 1, 27, 20, 0),
datetime(1999, 1, 27, 21, 0),
datetime(1999, 1, 27, 21, 0),
datetime(1999, 1, 27, 22, 0),
],
name="X1",
)
expected = DataFrame(
[
["KORD", " 18:56:00", 0.81, 2.81, 7.2, 0.0, 280.0],
["KORD", " 19:56:00", 0.01, 2.21, 7.2, 0.0, 260.0],
["KORD", " 20:56:00", -0.59, 2.21, 5.7, 0.0, 280.0],
["KORD", " 21:18:00", -0.99, 2.01, 3.6, 0.0, 270.0],
["KORD", " 21:56:00", -0.59, 1.71, 5.1, 0.0, 290.0],
],
columns=["X0", "X2", "X3", "X4", "X5", "X6", "X7"],
index=index,
)
> tm.assert_frame_equal(result, expected)
pandas/tests/io/parser/test_parse_dates.py:434:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/_libs/testing.pyx:52: in pandas._libs.testing.assert_almost_equal
cpdef assert_almost_equal(a, b,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> raise_assert_detail(obj, msg, lobj, robj, index_values=index_values)
E AssertionError: DataFrame.iloc[:, 1] (column name="X2") are different
E
E DataFrame.iloc[:, 1] (column name="X2") values are different (100.0 %)
E [index]: [1999-01-27T19:00:00.000000000, 1999-01-27T20:00:00.000000000, 1999-01-27T21:00:00.000000000, 1999-01-27T21:00:00.000000000, 1999-01-27T22:00:00.000000000]
E [left]: [18:56:00, 19:56:00, 20:56:00, 21:18:00, 21:56:00]
E [right]: [ 18:56:00, 19:56:00, 20:56:00, 21:18:00, 21:56:00]
```
### Issue Description
Looks like the new PyArrow version deletes the space in front of the string
### Expected Behavior
Not sure, but probably should be kept
### Installed Versions
https://github.com/pandas-dev/pandas/runs/4157976598?check_suite_focus=true
last working build on master:
https://github.com/pandas-dev/pandas/runs/4155457578?check_suite_focus=true | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44376/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44376/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44377 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44377/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44377/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44377/events | https://github.com/pandas-dev/pandas/pull/44377 | 1,049,215,125 | PR_kwDOAA0YD84uUSoZ | 44,377 | REF/TST: collect index tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-11-09T23:05:55Z" | "2021-11-11T23:51:23Z" | "2021-11-11T23:42:16Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44377/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44377/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44377.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44377",
"merged_at": "2021-11-11T23:42:16Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44377.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44377"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44378 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44378/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44378/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44378/events | https://github.com/pandas-dev/pandas/issues/44378 | 1,049,219,356 | I_kwDOAA0YD84-idEc | 44,378 | BUG: Ambiguous time throws ambiguous error but then does not allow remediation with fold argument | {
"avatar_url": "https://avatars.githubusercontent.com/u/89095326?v=4",
"events_url": "https://api.github.com/users/MataanAMZ/events{/privacy}",
"followers_url": "https://api.github.com/users/MataanAMZ/followers",
"following_url": "https://api.github.com/users/MataanAMZ/following{/other_user}",
"gists_url": "https://api.github.com/users/MataanAMZ/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MataanAMZ",
"id": 89095326,
"login": "MataanAMZ",
"node_id": "MDQ6VXNlcjg5MDk1MzI2",
"organizations_url": "https://api.github.com/users/MataanAMZ/orgs",
"received_events_url": "https://api.github.com/users/MataanAMZ/received_events",
"repos_url": "https://api.github.com/users/MataanAMZ/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MataanAMZ/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MataanAMZ/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MataanAMZ"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "5319e7",
"default": false,
"description": "Timezone data dtype",
"id": 60458168,
"name": "Timezones",
"node_id": "MDU6TGFiZWw2MDQ1ODE2OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timezones"
}
] | closed | false | null | [] | null | 1 | "2021-11-09T23:12:45Z" | "2021-11-14T04:35:58Z" | "2021-11-14T04:35:46Z" | NONE | null | ###
- [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 master branch of pandas.
### Reproducible Example
```python
import pandas as pd
start_date = "2021-11-07T01:00:00"
tz = "America/Denver"
start_date = int(pd.Timestamp(start_date, tz=tz).timestamp(), fold=1)
```
### Issue Description
The above code throws the following error.
ValueError: Cannot pass fold with possibly unambiguous input: int, float, numpy.datetime64, str, or timezone-aware datetime-like. Pass naive datetime-like or build Timestamp from components.
start_date with the tz is ambiguous, and it is a naive datetime-like.
### Expected Behavior
Instead of this error, pd.Timestamp should fold the time to the second occurrence of Nov 7th 1am
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.8.9.final.0
python-bits : 64
OS : Darwin
OS-release : 20.6.0
Version : Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.4
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.3.1
setuptools : 49.2.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44378/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44378/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44379 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44379/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44379/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44379/events | https://github.com/pandas-dev/pandas/issues/44379 | 1,049,468,421 | I_kwDOAA0YD84-jZ4F | 44,379 | designing issue | {
"avatar_url": "https://avatars.githubusercontent.com/u/85473770?v=4",
"events_url": "https://api.github.com/users/pragnesh9199/events{/privacy}",
"followers_url": "https://api.github.com/users/pragnesh9199/followers",
"following_url": "https://api.github.com/users/pragnesh9199/following{/other_user}",
"gists_url": "https://api.github.com/users/pragnesh9199/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pragnesh9199",
"id": 85473770,
"login": "pragnesh9199",
"node_id": "MDQ6VXNlcjg1NDczNzcw",
"organizations_url": "https://api.github.com/users/pragnesh9199/orgs",
"received_events_url": "https://api.github.com/users/pragnesh9199/received_events",
"repos_url": "https://api.github.com/users/pragnesh9199/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pragnesh9199/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pragnesh9199/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pragnesh9199"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "0e8a16",
"default": true,
"description": null,
"id": 717120670,
"name": "good first issue",
"node_id": "MDU6TGFiZWw3MTcxMjA2NzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue"
}
] | open | false | null | [] | null | 8 | "2021-11-10T07:02:29Z" | "2021-11-13T18:37:05Z" | null | NONE | null | 
please check now and improve your designing
thanks regards,
pragnesh patel
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44379/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44379/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44380 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44380/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44380/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44380/events | https://github.com/pandas-dev/pandas/issues/44380 | 1,049,538,860 | I_kwDOAA0YD84-jrEs | 44,380 | Is there a bug while slicing in the non monotonic multi indices? | {
"avatar_url": "https://avatars.githubusercontent.com/u/83115948?v=4",
"events_url": "https://api.github.com/users/AayushSameerShah/events{/privacy}",
"followers_url": "https://api.github.com/users/AayushSameerShah/followers",
"following_url": "https://api.github.com/users/AayushSameerShah/following{/other_user}",
"gists_url": "https://api.github.com/users/AayushSameerShah/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AayushSameerShah",
"id": 83115948,
"login": "AayushSameerShah",
"node_id": "MDQ6VXNlcjgzMTE1OTQ4",
"organizations_url": "https://api.github.com/users/AayushSameerShah/orgs",
"received_events_url": "https://api.github.com/users/AayushSameerShah/received_events",
"repos_url": "https://api.github.com/users/AayushSameerShah/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AayushSameerShah/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AayushSameerShah/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AayushSameerShah"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
] | open | false | null | [] | null | 0 | "2021-11-10T08:33:48Z" | "2021-11-14T04:38:31Z" | null | NONE | null | Please take this question lightly as asked from curiosity:
<b>As</b> I was trying to see how the slicing in MultiIndex works, I came across the following situation ↓
```python
# Simple MultiIndex Creation
index = pd.MultiIndex.from_product([['a', 'c', 'b'], [1, 2]])
# Making Series with that MultiIndex
data = pd.Series(np.random.randint(10, size=6), index=index)
```
Returns:
<pre>
a 1 5
2 0
c 1 8
2 6
b 1 6
2 3
dtype: int32
</pre>
**NOTE** that the indices are ***not*** in the sorted order ie. `a, c, b` is the order which will result in the ***expected*** error that we want while slicing.
```python
# When we do slicing
data.loc["a":"c"]
```
Errors like:
<pre>
UnsortedIndexError
----> 1 data.loc["a":"c"]
UnsortedIndexError: 'Key length (1) was greater than MultiIndex lexsort depth (0)'
</pre>
That's expected. But now, after doing the following steps:
```python
# Making a DataFrame
data = data.unstack()
# Redindexing - to unsort the indices like before
data = data.reindex(["a", "c", "b"])
# Which looks like
1 2
a 5 0
c 8 6
b 6 3
# Then again making series
data = data.stack()
# Reindex Again!
data = data.reindex(["a", "c", "b"], level=0)
# Which looks like before
a 1 5
2 0
c 1 8
2 6
b 1 6
2 3
dtype: int32
```
### The Problem
So, now the process is: `Series → Unstack → DataFrame → Stack → Series`
Now, if I do the slicing like before *(still on with the indices unsorted)* we **don't get any error!**
```python
# The same slicing
data.loc["a":"c"]
```
Results without an error:
<pre>
a 1 5
2 0
c 1 8
2 6
dtype: int32
</pre>
**Even if** the `data.index.is_monotonic` → `False`. Then still why can we slice?
So the question is: **WHY?**. <br>
> I hope you got the understanding of the situation here. Because see, the same series which was before giving the error, after the `unstack` and `stack` operation is not giving any error.
So is that a bug, or a new concept that I am missing here?
Thanks!<br>
Aayush ∞ Shah | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44380/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44380/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44381 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44381/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44381/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44381/events | https://github.com/pandas-dev/pandas/pull/44381 | 1,049,550,422 | PR_kwDOAA0YD84uVYIn | 44,381 | TST/COMPAT: update csv test to infer time with pyarrow>=6.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "f9d0c4",
"default": false,
"description": "",
"id": 3303158446,
"name": "Arrow",
"node_id": "MDU6TGFiZWwzMzAzMTU4NDQ2",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Arrow"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 4 | "2021-11-10T08:47:32Z" | "2021-11-10T19:25:49Z" | "2021-11-10T19:25:11Z" | MEMBER | null | Closes #44231 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44381/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44381/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44381.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44381",
"merged_at": "2021-11-10T19:25:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44381.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44381"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44382 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44382/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44382/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44382/events | https://github.com/pandas-dev/pandas/issues/44382 | 1,049,605,550 | I_kwDOAA0YD84-j7Wu | 44,382 | BUG: FloatingArray.equals should consider NaNs in same location as equal | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"color": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-10T09:44:03Z" | "2021-11-13T17:21:41Z" | "2021-11-13T17:21:40Z" | MEMBER | null | From https://github.com/pandas-dev/pandas/pull/43930#discussion_r746413021. Currently we have
```
In [24]: arr1 = pd.arrays.FloatingArray(np.array([1.0, np.nan, 2.0]), np.array([False, False, True]))
In [25]: arr1
Out[25]:
<FloatingArray>
[1.0, nan, <NA>]
Length: 3, dtype: Float64
In [26]: arr2 = pd.arrays.FloatingArray(np.array([1.0, np.nan, 2.0]), np.array([False, False, True]))
In [27]: arr1.equals(arr2)
Out[27]: False
```
For nullable arrays, NAs in the same location are considered equal. For plain float arrays, we consider NaNs as equal. Although for FloatingArray we currently distinguish both NA and NaN, I think we should consider both as equal if in the same location, to preserve the goal of this function (NaN equal to NaN, and NA equal to NA, to be clear, not mixed).
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44382/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44382/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44383 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44383/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44383/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44383/events | https://github.com/pandas-dev/pandas/issues/44383 | 1,049,622,657 | I_kwDOAA0YD84-j_iB | 44,383 | Incosistent handling of 'None' when creating dataframe from list | {
"avatar_url": "https://avatars.githubusercontent.com/u/33337590?v=4",
"events_url": "https://api.github.com/users/markste-in/events{/privacy}",
"followers_url": "https://api.github.com/users/markste-in/followers",
"following_url": "https://api.github.com/users/markste-in/following{/other_user}",
"gists_url": "https://api.github.com/users/markste-in/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/markste-in",
"id": 33337590,
"login": "markste-in",
"node_id": "MDQ6VXNlcjMzMzM3NTkw",
"organizations_url": "https://api.github.com/users/markste-in/orgs",
"received_events_url": "https://api.github.com/users/markste-in/received_events",
"repos_url": "https://api.github.com/users/markste-in/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/markste-in/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/markste-in/subscriptions",
"type": "User",
"url": "https://api.github.com/users/markste-in"
} | [
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
] | closed | false | null | [] | null | 3 | "2021-11-10T10:00:52Z" | "2021-11-14T04:48:26Z" | "2021-11-14T04:48:17Z" | NONE | null | When I create a pandas dataframe from a list 'None' handled differently depending on the size of list
```
test = [(None, None), (1, 2)]
test2 = [(None, None)]
```
`pd.DataFrame(test)`
0 | 1 | 2
-- | -- | --
0 | NaN | NaN
1 | 1.0 | 2.0
`pd.DataFrame(test2)`
0 | 1 | 2
-- | -- | --
0 | None | None
The sudden appearance of different types my break other code (it did so in my case)
I am using pandas version '1.0.5' on Windows Version 10.0.19042
Same on pandas version 1.1.5 on Linux
Here is a runnable colab example
https://github.com/markste-in/colab/blob/master/pandas_bug.ipynb
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44383/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44383/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44384 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44384/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44384/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44384/events | https://github.com/pandas-dev/pandas/issues/44384 | 1,049,706,612 | I_kwDOAA0YD84-kUB0 | 44,384 | ENH: Generalized head and tail method. | {
"avatar_url": "https://avatars.githubusercontent.com/u/6231413?v=4",
"events_url": "https://api.github.com/users/mmngreco/events{/privacy}",
"followers_url": "https://api.github.com/users/mmngreco/followers",
"following_url": "https://api.github.com/users/mmngreco/following{/other_user}",
"gists_url": "https://api.github.com/users/mmngreco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mmngreco",
"id": 6231413,
"login": "mmngreco",
"node_id": "MDQ6VXNlcjYyMzE0MTM=",
"organizations_url": "https://api.github.com/users/mmngreco/orgs",
"received_events_url": "https://api.github.com/users/mmngreco/received_events",
"repos_url": "https://api.github.com/users/mmngreco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mmngreco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mmngreco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mmngreco"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | open | false | null | [] | null | 2 | "2021-11-10T11:26:08Z" | "2021-11-14T04:49:45Z" | null | CONTRIBUTOR | null | #### Is your feature request related to a problem?
I wondering if you maybe interested in include a new method `context` (I've chosen that name but can be other) which provides convenient slicing around an index (positional or not) for better data exploration. I see it as `head` or `tail` methods but generalized where the anchor can be other than the first or last index.
#### Describe the solution you'd like
I've implemented this https://github.com/mmngreco/pandas-context as a proof of concept which has the following code:
```python
import pandas as pd
def context(
pdobj, loc=None, iloc=None, around=2, pre=None, post=None, method="nearest"
):
if loc is not None:
idx = pdobj.index.get_loc(loc, method=method)
elif iloc is not None:
idx = iloc
else:
raise ValueError
if pre is None:
pre = around
if post is None:
post = around
if pre > idx:
pre = idx
ini = idx - pre
end = idx + post + 1
return pdobj.iloc[ini:end]
pd.core.frame.NDFrame.context = context
```
Here're some examples of usage:
```python
>>> import pandas as pd
... import numpy as np
... import pandas_context
... n = 1000 # long data
... data = np.random.randn(n)
... index = pd.date_range("19990101", periods=n)
... df = pd.DataFrame(data=data, index=index)
... date = index[50]
>>> date
Timestamp('1999-02-20 00:00:00', freq='D')
>>> df.context(date)
0
1999-02-18 1.086181
1999-02-19 0.174156
1999-02-20 -0.762305 # <-----
1999-02-21 -0.110677
1999-02-22 -0.766751
>>> df.context(date, around=1)
0
1999-02-19 0.174156
1999-02-20 -0.762305 # <-----
1999-02-21 -0.110677
>>> df.context(date, pre=3, post=1)
0
1999-02-17 -0.809791
1999-02-18 1.086181
1999-02-19 0.174156
1999-02-20 -0.762305 # <-----
1999-02-21 -0.110677
```
#### API breaking implications
[this should provide a description of how this feature will affect the API]
None (I think)
Let me know if you are interested in this feature I will be glad to open a PR. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44384/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44384/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44385 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44385/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44385/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44385/events | https://github.com/pandas-dev/pandas/pull/44385 | 1,050,276,424 | PR_kwDOAA0YD84uXv3C | 44,385 | TST: make get_upcast_box more flexible | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-11-10T20:23:09Z" | "2021-11-11T00:41:29Z" | "2021-11-11T00:39:48Z" | MEMBER | null | Will make it easier to parametrize these tests | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44385/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44385/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44385.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44385",
"merged_at": "2021-11-11T00:39:48Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44385.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44385"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44386 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44386/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44386/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44386/events | https://github.com/pandas-dev/pandas/issues/44386 | 1,050,423,646 | I_kwDOAA0YD84-nDFe | 44,386 | BUG: DataFrame apply additional args fails when type DataFrame input | {
"avatar_url": "https://avatars.githubusercontent.com/u/3155637?v=4",
"events_url": "https://api.github.com/users/vsocrates/events{/privacy}",
"followers_url": "https://api.github.com/users/vsocrates/followers",
"following_url": "https://api.github.com/users/vsocrates/following{/other_user}",
"gists_url": "https://api.github.com/users/vsocrates/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vsocrates",
"id": 3155637,
"login": "vsocrates",
"node_id": "MDQ6VXNlcjMxNTU2Mzc=",
"organizations_url": "https://api.github.com/users/vsocrates/orgs",
"received_events_url": "https://api.github.com/users/vsocrates/received_events",
"repos_url": "https://api.github.com/users/vsocrates/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vsocrates/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vsocrates/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vsocrates"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
},
{
"color": "be21f2",
"default": false,
"description": "May be closeable, needs more eyeballs",
"id": 2365504893,
"name": "Closing Candidate",
"node_id": "MDU6TGFiZWwyMzY1NTA0ODkz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Closing%20Candidate"
}
] | closed | false | null | [] | null | 2 | "2021-11-10T23:53:35Z" | "2021-11-11T18:09:41Z" | "2021-11-11T18:09:41Z" | NONE | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
import pandas as pd
d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data=d)
d = {'col1': [5, 6], 'col2': [7, 8]}
df2 = pd.DataFrame(data=d)
def sum_row(row, other_df):
print(row)
print(other_df)
df.apply(sum_row, axis=1, args=(df2))
```
### Issue Description
When I try to pass an additional argument of type `pandas.core.frame.DataFrame` to the DataFrame apply function through the `args` parameter, I get the following error:
```
/.../python3.7/site-packages/pandas/core/apply.py in __init__(self, obj, func, raw, result_type, args, kwargs)
110 self.obj = obj
111 self.raw = raw
--> 112 self.args = args or ()
113 self.kwargs = kwargs or {}
114
/.../python3.7/site-packages/pandas/core/generic.py in __nonzero__(self)
1533 def __nonzero__(self):
1534 raise ValueError(
-> 1535 f"The truth value of a {type(self).__name__} is ambiguous. "
1536 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
1537 )
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
```
It seems that this is because of the check before setting the `args` parameter in the Apply class. Since DataFrames have ambiguous truthiness, this doesn't work.
### Expected Behavior
The expected behavior would be us to be able to pass in a dataframe into the apply function as an extra parameter.
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : c7f7443c1bad8262358114d5e88cd9c8a308e8aa
python : 3.7.9.final.0
python-bits : 64
OS : Linux
OS-release : 3.10.0-1160.25.1.el7.x86_64
Version : #1 SMP Tue Apr 13 18:55:45 EDT 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.1
numpy : 1.19.4
pytz : 2020.4
dateutil : 2.8.1
pip : 20.3.3
setuptools : 49.6.0.post20201009
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 5.8.0
pandas_datareader: None
bs4 : 4.10.0
bottleneck : None
fsspec : 0.8.5
fastparquet : None
gcsfs : None
matplotlib : 3.3.3
numexpr : 2.7.2
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.5.3
sqlalchemy : 1.4.26
tables : 3.6.1
tabulate : None
xarray : 0.16.2
xlrd : None
xlwt : None
numba : 0.52.0
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44386/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44386/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44387 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44387/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44387/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44387/events | https://github.com/pandas-dev/pandas/pull/44387 | 1,050,457,883 | PR_kwDOAA0YD84uYV2j | 44,387 | ENH: implement EA._putmask | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-11T00:42:15Z" | "2021-11-11T17:53:41Z" | "2021-11-11T17:50:22Z" | MEMBER | null | Broken off from #43930 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44387/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44387/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44387.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44387",
"merged_at": "2021-11-11T17:50:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44387.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44387"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44388 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44388/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44388/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44388/events | https://github.com/pandas-dev/pandas/pull/44388 | 1,050,485,528 | PR_kwDOAA0YD84uYbaZ | 44,388 | CI: Use conda-forge to create Python 3.10 env | {
"avatar_url": "https://avatars.githubusercontent.com/u/47963215?v=4",
"events_url": "https://api.github.com/users/lithomas1/events{/privacy}",
"followers_url": "https://api.github.com/users/lithomas1/followers",
"following_url": "https://api.github.com/users/lithomas1/following{/other_user}",
"gists_url": "https://api.github.com/users/lithomas1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lithomas1",
"id": 47963215,
"login": "lithomas1",
"node_id": "MDQ6VXNlcjQ3OTYzMjE1",
"organizations_url": "https://api.github.com/users/lithomas1/orgs",
"received_events_url": "https://api.github.com/users/lithomas1/received_events",
"repos_url": "https://api.github.com/users/lithomas1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lithomas1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lithomas1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lithomas1"
} | [
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
},
{
"color": "fef2c0",
"default": false,
"description": "",
"id": 2955636717,
"name": "Python 3.10",
"node_id": "MDU6TGFiZWwyOTU1NjM2NzE3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Python%203.10"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 47,
"created_at": "2021-10-16T17:29:59Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-11-28T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/91",
"id": 7259169,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91/labels",
"node_id": "MI_kwDOAA0YD84AbsQh",
"number": 91,
"open_issues": 23,
"state": "open",
"title": "1.3.5",
"updated_at": "2021-11-21T13:42:45Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91"
} | 5 | "2021-11-11T01:40:10Z" | "2021-11-11T03:01:13Z" | "2021-11-11T02:48:10Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
Anaconda messed up their recipe :(. Fixes the sdist job. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44388/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44388/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44388.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44388",
"merged_at": "2021-11-11T02:48:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44388.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44388"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44389 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44389/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44389/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44389/events | https://github.com/pandas-dev/pandas/pull/44389 | 1,050,516,001 | PR_kwDOAA0YD84uYhbv | 44,389 | Backport PR #44388 on branch 1.3.x (CI: Use conda-forge to create Python 3.10 env) | {
"avatar_url": "https://avatars.githubusercontent.com/u/39504233?v=4",
"events_url": "https://api.github.com/users/meeseeksmachine/events{/privacy}",
"followers_url": "https://api.github.com/users/meeseeksmachine/followers",
"following_url": "https://api.github.com/users/meeseeksmachine/following{/other_user}",
"gists_url": "https://api.github.com/users/meeseeksmachine/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/meeseeksmachine",
"id": 39504233,
"login": "meeseeksmachine",
"node_id": "MDQ6VXNlcjM5NTA0MjMz",
"organizations_url": "https://api.github.com/users/meeseeksmachine/orgs",
"received_events_url": "https://api.github.com/users/meeseeksmachine/received_events",
"repos_url": "https://api.github.com/users/meeseeksmachine/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/meeseeksmachine/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/meeseeksmachine/subscriptions",
"type": "User",
"url": "https://api.github.com/users/meeseeksmachine"
} | [
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
},
{
"color": "fef2c0",
"default": false,
"description": "",
"id": 2955636717,
"name": "Python 3.10",
"node_id": "MDU6TGFiZWwyOTU1NjM2NzE3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Python%203.10"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 47,
"created_at": "2021-10-16T17:29:59Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-11-28T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/91",
"id": 7259169,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91/labels",
"node_id": "MI_kwDOAA0YD84AbsQh",
"number": 91,
"open_issues": 23,
"state": "open",
"title": "1.3.5",
"updated_at": "2021-11-21T13:42:45Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91"
} | 0 | "2021-11-11T02:48:36Z" | "2021-11-11T03:50:32Z" | "2021-11-11T03:50:32Z" | NONE | null | Backport PR #44388: CI: Use conda-forge to create Python 3.10 env | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44389/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44389/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44389.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44389",
"merged_at": "2021-11-11T03:50:32Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44389.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44389"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44390 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44390/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44390/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44390/events | https://github.com/pandas-dev/pandas/pull/44390 | 1,050,527,131 | PR_kwDOAA0YD84uYjrb | 44,390 | BUG: handle NaNs in FloatingArray.equals | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 11 | "2021-11-11T03:13:17Z" | "2021-11-13T19:24:15Z" | "2021-11-13T17:21:41Z" | MEMBER | null | - [x] closes #44382
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44390/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44390/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44390.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44390",
"merged_at": "2021-11-13T17:21:40Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44390.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44390"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44391 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44391/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44391/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44391/events | https://github.com/pandas-dev/pandas/pull/44391 | 1,050,963,839 | PR_kwDOAA0YD84uZ_A9 | 44,391 | fix documentation on options in read_csv | {
"avatar_url": "https://avatars.githubusercontent.com/u/4441338?v=4",
"events_url": "https://api.github.com/users/LunarLanding/events{/privacy}",
"followers_url": "https://api.github.com/users/LunarLanding/followers",
"following_url": "https://api.github.com/users/LunarLanding/following{/other_user}",
"gists_url": "https://api.github.com/users/LunarLanding/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LunarLanding",
"id": 4441338,
"login": "LunarLanding",
"node_id": "MDQ6VXNlcjQ0NDEzMzg=",
"organizations_url": "https://api.github.com/users/LunarLanding/orgs",
"received_events_url": "https://api.github.com/users/LunarLanding/received_events",
"repos_url": "https://api.github.com/users/LunarLanding/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LunarLanding/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LunarLanding/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LunarLanding"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-11T13:09:51Z" | "2021-11-11T14:15:32Z" | "2021-11-11T14:15:28Z" | CONTRIBUTOR | null | Noticed this due to pylance (typing) showing header=None was wrong. Don't know how it will propagate to the typings.
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44391/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44391/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44391.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44391",
"merged_at": "2021-11-11T14:15:28Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44391.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44391"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44392 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44392/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44392/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44392/events | https://github.com/pandas-dev/pandas/issues/44392 | 1,050,983,648 | I_kwDOAA0YD84-pLzg | 44,392 | BUG: `Series.map` passes `DatetimeIndex` as first argument on some series | {
"avatar_url": "https://avatars.githubusercontent.com/u/10991626?v=4",
"events_url": "https://api.github.com/users/pierremonico/events{/privacy}",
"followers_url": "https://api.github.com/users/pierremonico/followers",
"following_url": "https://api.github.com/users/pierremonico/following{/other_user}",
"gists_url": "https://api.github.com/users/pierremonico/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pierremonico",
"id": 10991626,
"login": "pierremonico",
"node_id": "MDQ6VXNlcjEwOTkxNjI2",
"organizations_url": "https://api.github.com/users/pierremonico/orgs",
"received_events_url": "https://api.github.com/users/pierremonico/received_events",
"repos_url": "https://api.github.com/users/pierremonico/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pierremonico/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pierremonico/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pierremonico"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "8dd5fc",
"default": false,
"description": "Series data structure",
"id": 1357732944,
"name": "Series",
"node_id": "MDU6TGFiZWwxMzU3NzMyOTQ0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Series"
}
] | open | false | null | [] | null | 8 | "2021-11-11T13:31:35Z" | "2021-11-21T02:39:18Z" | null | NONE | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
from datetime import datetime
from random import randint
import pandas as pd
def mapping_func(ts):
assert type(ts) == pd.Timestamp
# --- works as expected ---
ts_list = [
datetime(2021, randint(1, 12), randint(1, 28))
for _ in range(5)
]
df01 = pd.DataFrame(ts_list, columns=["timestamps"])
df01["timestamps"].map(mapping_func)
# --- doesn't work as expected ---
ts_list_02 = [
'2020-09-01T15:47:33.953000+00:00',
'2020-09-02T16:57:16.547000+00:00',
'2020-09-02T16:57:16.887000+00:00',
'2020-09-02T16:57:12.377000+00:00',
'2020-09-02T16:57:12.667000+00:00',
]
df02 = pd.DataFrame(ts_list_02, columns=["timestamps"])
df02["timestamps"] = pd.to_datetime(df02["timestamps"])
df02["timestamps"].map(mapping_func)
# --- Type checks ---
assert isinstance(df01["timestamps"], pd.Series)
assert isinstance(df02["timestamps"], pd.Series)
assert df01["timestamps"].dtype == df02["timestamps"].dtype
# fails because (respectively) dtype('<M8[ns]') != datetime64[ns, UTC]
```
### Issue Description
I am having a weird issued when using `Series.map(arg=fn)` on a series containing `Timestamp`s:
- In some cases the **first** time `fn` is called by map, the argument is a `DatetimeIndex` containing all timestamps in the series. Further calls pass every individual member of the series to `fn` as expected.
- In other cases it passes every individual member of the series to `fn` as expected.
I was able to reproduce it by:
- creating one series based on a list of python `datetime`s instances (`df01` in the example - works as expected).
- creating one series based on a list of ISO timestamps and casting the series to `Timestamp` using `pd.to_datetime` (`df02` in the example - doesn't work as expected aka. passes a full `DatetimeIndex` the first time it calls `fn`).
### Expected Behavior
```python
def mapping_func(ts):
assert type(ts) == pd.Timestamp
ts_list = [
datetime(2021, randint(1, 12), randint(1, 28))
for _ in range(5)
]
df01 = pd.DataFrame(ts_list, columns=["timestamps"])
df01["timestamps"].map(mapping_func)
```
Works as expected, the `ts` parameter of `mapping_func` always being a `Timestamp` instance.
```python
def mapping_func(ts):
assert type(ts) == pd.Timestamp
ts_list_02 = [
'2020-09-01T15:47:33.953000+00:00',
'2020-09-02T16:57:16.547000+00:00',
'2020-09-02T16:57:16.887000+00:00',
'2020-09-02T16:57:12.377000+00:00',
'2020-09-02T16:57:12.667000+00:00',
]
df02 = pd.DataFrame(ts_list_02, columns=["timestamps"])
df02["timestamps"] = pd.to_datetime(df02["timestamps"])
df02["timestamps"].map(mapping_func)
```
Should not raise an error but actually does, since the first time `mapping_func` is called, the `ts` parameter is passed a `DatetimeIndex`.
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.7.9.final.0
python-bits : 64
OS : Darwin
OS-release : 20.5.0
Version : Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : None.UTF-8
pandas : 1.3.4
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.1.3
setuptools : 57.4.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 3.0.2
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : 2.9.1 (dt dec pq3 ext lo64)
jinja2 : 3.0.3
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 2021.11.0
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.4.26
tables : None
tabulate : 0.8.9
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44392/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44392/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44393 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44393/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44393/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44393/events | https://github.com/pandas-dev/pandas/issues/44393 | 1,050,987,194 | I_kwDOAA0YD84-pMq6 | 44,393 | BUG: `date_range` ignores `nanoseconds` component of `DateOffset` frequency | {
"avatar_url": "https://avatars.githubusercontent.com/u/3190405?v=4",
"events_url": "https://api.github.com/users/shwina/events{/privacy}",
"followers_url": "https://api.github.com/users/shwina/followers",
"following_url": "https://api.github.com/users/shwina/following{/other_user}",
"gists_url": "https://api.github.com/users/shwina/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shwina",
"id": 3190405,
"login": "shwina",
"node_id": "MDQ6VXNlcjMxOTA0MDU=",
"organizations_url": "https://api.github.com/users/shwina/orgs",
"received_events_url": "https://api.github.com/users/shwina/received_events",
"repos_url": "https://api.github.com/users/shwina/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shwina/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shwina/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shwina"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 1 | "2021-11-11T13:35:44Z" | "2021-11-14T05:10:13Z" | "2021-11-14T05:10:13Z" | CONTRIBUTOR | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
import pandas as pd
pd.date_range(start='2001-01-01', freq=pd.DateOffset(nanoseconds=1), periods=3).to_numpy()
```
### Issue Description
Greetings!
When specifying the frequency as a `DateOffset` object, Pandas seems to ignore the frequency entirely if it consists solely of a `nanoseconds` component:
```python
In [6]: pd.date_range(start='2001-01-01', freq='1ns', periods=3).to_numpy()
Out[6]:
array(['2001-01-01T00:00:00.000000000', '2001-01-01T00:00:00.000000001',
'2001-01-01T00:00:00.000000002'], dtype='datetime64[ns]')
In [7]: pd.date_range(start='2001-01-01', freq=pd.DateOffset(nanoseconds=1), periods=3).to_numpy()
Out[7]:
array(['2001-01-01T00:00:00.000000000', '2001-01-02T00:00:00.000000000',
'2001-01-03T00:00:00.000000000'], dtype='datetime64[ns]')
```
or, if it consists of multiple components, ignores the `nanoseconds` part:
```python
In [8]: pd.date_range(start='2001-01-01', freq=pd.DateOffset(days=1, nanoseconds=1), periods=3).to_numpy()
Out[8]:
array(['2001-01-01T00:00:00.000000000', '2001-01-02T00:00:00.000000000',
'2001-01-03T00:00:00.000000000'], dtype='datetime64[ns]')
```
### Expected Behavior
```python
import pandas as pd
import numpy as np
expect = pd.date_range(start='2001-01-01', freq='1ns', periods=3).to_numpy().astype('int64')
got = pd.date_range(start='2001-01-01', freq=pd.DateOffset(nanoseconds=1), periods=3).to_numpy().astype('int64')
np.testing.assert_equal(expect, got)
````
### Installed Versions
<details>
Replace this line with the output of pd.show_versions()
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44393/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44393/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44394 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44394/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44394/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44394/events | https://github.com/pandas-dev/pandas/issues/44394 | 1,051,019,251 | I_kwDOAA0YD84-pUfz | 44,394 | BUG: wrong processing of wintertime | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | null | 1 | "2021-11-11T14:10:10Z" | "2021-11-11T15:20:43Z" | "2021-11-11T15:20:43Z" | NONE | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
import pandas as pd
import pytz
from datetime import datetime
pd.show_versions()
date_list = ['2016-03-27 01:55:00', '2016-03-27 02:00:00', '2016-03-27 03:00:00']
df = pd.DataFrame()
df['date'] = date_list
df.date = pd.to_datetime(df.date, format='%Y-%m-%d %H:%M:%S')
timezone = pytz.timezone('Europe/Amsterdam')
df['date2'] = df.date.apply(lambda x: timezone.localize(x))
print(df)
date_list2 = [timezone.localize(datetime.strptime(i, '%Y-%m-%d %H:%M:%S')) for i in date_list]
print(date_list2)
df['date3'] = date_list2
print(df)
```
### Issue Description
By adding timezone information with pytz, it should only add the hours that differ from UTC, however, when doing so through pandas, it changes the time itself too. This does not happen when using datetime and pytz outside of pandas.
It only does this when going from winter time to summer time (march) and it causes duplicated timestamps which should not be there.
These timestamps:
['2016-03-27 01:55:00', '2016-03-27 02:00:00', '2016-03-27 03:00:00']
are transformed by pandas to:
** date date2
0 2016-03-27 01:55:00 2016-03-27 01:55:00+01:00
1 2016-03-27 02:00:00 2016-03-27 03:00:00+02:00
2 2016-03-27 03:00:00 2016-03-27 03:00:00+02:00**
Where both the 02:00:00 hour an the 03:00:00 hour are transformed to 03:00:00 + 02:00, causing the duplication.
This happens with all times between 02:00:00 and 03:00:00 during the switch from winter to summertime.
The expected values (as given when using datetime with pytz outside of pandas):
- datetime.datetime(2016, 3, 27, 1, 55, tzinfo=<DstTzInfo 'Europe/Amsterdam' CET+1:00:00 STD>),
- datetime.datetime(2016, 3, 27, 2, 0, tzinfo=<DstTzInfo 'Europe/Amsterdam' CET+1:00:00 STD>),
- datetime.datetime(2016, 3, 27, 3, 0, tzinfo=<DstTzInfo 'Europe/Amsterdam' CEST+2:00:00 DST>)
As soon as I add the correct values (as processed by datetime/pytz) as a column to a pandas dataframe, it shows it wrong again. Where both datetime.datetime(2016, 3, 27, 2, 0, tzinfo=<DstTzInfo 'Europe/Amsterdam' CET+1:00:00 STD>) and
datetime.datetime(2016, 3, 27, 3, 0, tzinfo=<DstTzInfo 'Europe/Amsterdam' CEST+2:00:00 DST>) are shown as the same time.
### Expected Behavior
The expected values (as given when using datetime with pytz outside of pandas):
- datetime.datetime(2016, 3, 27, 1, 55, tzinfo=<DstTzInfo 'Europe/Amsterdam' CET+1:00:00 STD>),
- datetime.datetime(2016, 3, 27, 2, 0, tzinfo=<DstTzInfo 'Europe/Amsterdam' CET+1:00:00 STD>),
- datetime.datetime(2016, 3, 27, 3, 0, tzinfo=<DstTzInfo 'Europe/Amsterdam' CEST+2:00:00 DST>)
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.9.6.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.18363
machine : AMD64
processor : Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1252
pandas : 1.3.4
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.1.2
setuptools : 57.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44394/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44394/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44395 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44395/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44395/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44395/events | https://github.com/pandas-dev/pandas/pull/44395 | 1,051,241,201 | PR_kwDOAA0YD84ua49f | 44,395 | TST: parametrize arithmetic tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-11T18:15:36Z" | "2021-11-11T21:08:49Z" | "2021-11-11T21:02:19Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44395/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44395/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44395.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44395",
"merged_at": "2021-11-11T21:02:18Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44395.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44395"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44396 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44396/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44396/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44396/events | https://github.com/pandas-dev/pandas/pull/44396 | 1,051,330,206 | PR_kwDOAA0YD84ubLiX | 44,396 | [ArrayManager] Array version of putmask logic | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
},
{
"color": "1d76db",
"default": false,
"description": "",
"id": 3165546917,
"name": "ArrayManager",
"node_id": "MDU6TGFiZWwzMTY1NTQ2OTE3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ArrayManager"
}
] | open | false | null | [] | null | 4 | "2021-11-11T20:21:45Z" | "2021-11-15T18:15:11Z" | null | MEMBER | null | xref #39146
Trying to remove the usage of `apply_with_block` for putmask.
(I also need to this for the Copy-on-Write branch to be able to perform the copy on write in putmask) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44396/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44396/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44396.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44396",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44396.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44396"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44397 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44397/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44397/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44397/events | https://github.com/pandas-dev/pandas/pull/44397 | 1,051,337,411 | PR_kwDOAA0YD84ubM40 | 44,397 | ENH: Support timespec argument in Timestamp.isoformat() | {
"avatar_url": "https://avatars.githubusercontent.com/u/971544?v=4",
"events_url": "https://api.github.com/users/swt2c/events{/privacy}",
"followers_url": "https://api.github.com/users/swt2c/followers",
"following_url": "https://api.github.com/users/swt2c/following{/other_user}",
"gists_url": "https://api.github.com/users/swt2c/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/swt2c",
"id": 971544,
"login": "swt2c",
"node_id": "MDQ6VXNlcjk3MTU0NA==",
"organizations_url": "https://api.github.com/users/swt2c/orgs",
"received_events_url": "https://api.github.com/users/swt2c/received_events",
"repos_url": "https://api.github.com/users/swt2c/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/swt2c/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/swt2c/subscriptions",
"type": "User",
"url": "https://api.github.com/users/swt2c"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 2 | "2021-11-11T20:30:25Z" | "2021-11-14T03:19:18Z" | "2021-11-14T03:19:08Z" | CONTRIBUTOR | null | - [x] closes #26131
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
This is an update of PR #38550. I added support for "nanoseconds" as an argument, expanded the test cases, and addressed most of the comments in the original PR. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44397/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44397/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44397.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44397",
"merged_at": "2021-11-14T03:19:08Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44397.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44397"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44398 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44398/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44398/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44398/events | https://github.com/pandas-dev/pandas/pull/44398 | 1,051,361,780 | PR_kwDOAA0YD84ubR88 | 44,398 | DEPR: PeriodIndex.astype(dt64) | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "eb6420",
"default": false,
"description": "Period data type",
"id": 60635328,
"name": "Period",
"node_id": "MDU6TGFiZWw2MDYzNTMyOA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Period"
},
{
"color": "5319e7",
"default": false,
"description": "Functionality to remove in pandas",
"id": 87485152,
"name": "Deprecate",
"node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 3 | "2021-11-11T21:07:33Z" | "2021-11-14T15:34:01Z" | "2021-11-14T03:20:32Z" | MEMBER | null | - [ ] closes #xxxx
- [x] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
Match the Series/EA behavior | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44398/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44398/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44398.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44398",
"merged_at": "2021-11-14T03:20:32Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44398.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44398"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44399 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44399/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44399/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44399/events | https://github.com/pandas-dev/pandas/pull/44399 | 1,051,365,649 | PR_kwDOAA0YD84ubSww | 44,399 | CLN: Refactor extract multiindex header call | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-11T21:13:29Z" | "2021-11-12T08:34:12Z" | "2021-11-12T03:10:37Z" | MEMBER | null | I am in the process of typing parts of the parser modules. I stumbled across this function. The check I have removed is performed inside the function and self.col_names is always None when inserting, so no need to pass it at all | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44399/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44399/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44399.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44399",
"merged_at": "2021-11-12T03:10:37Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44399.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44399"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44400 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44400/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44400/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44400/events | https://github.com/pandas-dev/pandas/issues/44400 | 1,051,455,379 | I_kwDOAA0YD84-q--T | 44,400 | BUG: Resampler agg cannot apply on list of functions | {
"avatar_url": "https://avatars.githubusercontent.com/u/84085756?v=4",
"events_url": "https://api.github.com/users/Mengda-Li/events{/privacy}",
"followers_url": "https://api.github.com/users/Mengda-Li/followers",
"following_url": "https://api.github.com/users/Mengda-Li/following{/other_user}",
"gists_url": "https://api.github.com/users/Mengda-Li/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Mengda-Li",
"id": 84085756,
"login": "Mengda-Li",
"node_id": "MDQ6VXNlcjg0MDg1NzU2",
"organizations_url": "https://api.github.com/users/Mengda-Li/orgs",
"received_events_url": "https://api.github.com/users/Mengda-Li/received_events",
"repos_url": "https://api.github.com/users/Mengda-Li/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Mengda-Li/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Mengda-Li/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Mengda-Li"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "207de5",
"default": false,
"description": "resample method",
"id": 74975453,
"name": "Resample",
"node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample"
},
{
"color": "fbca04",
"default": false,
"description": "Apply, Aggregate, Transform",
"id": 697792067,
"name": "Apply",
"node_id": "MDU6TGFiZWw2OTc3OTIwNjc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Apply"
}
] | open | false | null | [] | null | 2 | "2021-11-11T23:58:37Z" | "2021-11-16T20:38:11Z" | null | NONE | null | ###
- [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 master branch of pandas.
### Reproducible Example
```python
import pandas as pd
# loading a dataFrame as variable csv with attributes `trade Id`, `price`, `qty` like
# trade Id price qty quoteQty isBuyerMaker
# time
# 2021-09-01 00:00:00.023 1391646824 47150.32 0.002 94.30 True
# 2021-09-01 00:00:00.093 1391646825 47150.33 0.002 94.30 False
r = csv.head(10).resample('1s', label='right')
# define a function vwap with some d
def vwap(x):
print("it's vwap")
print(x)
p = x.price
print("it's p")
print(p)
q = x.qty
print("it's q")
print(q)
# print(x.price)
return (p @ q)/q.sum()
def sum_qty(x):
print(x)
return x.qty.sum()
def sum_quoteQty(x):
return x.quoteQty.sum()
# then apply a list of functions on the Resampler
r.apply({"price" : vwap, "qty": sum_qty, "quoteQty": sum_quoteQty})
```
### Issue Description
Get an AttributeError because the attribute `price` cannot be located
`AttributeError: 'Series' object has no attribute 'price'`
when execute
```python
r.apply({"price" : vwap, "qty": sum_qty, "quoteQty": sum_quoteQty})
```
get a debug print from function `vwap`
```
it's vwap
2021-09-01 00:00:00.023 47150.32
2021-09-01 00:00:00.093 47150.33
2021-09-01 00:00:00.994 47150.33
2021-09-01 00:00:00.994 47150.33
2021-09-01 00:00:00.994 47152.97
2021-09-01 00:00:00.994 47153.48
Name: price, dtype: float64
```
Then the error message is
```python
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/tmp/ipykernel_939/4117684543.py in <module>
----> 1 r.apply({"price" : vwap, "qty": sum_qty, "quoteQty": sum_quoteQty})
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/resample.py in aggregate(self, func, *args, **kwargs)
332 def aggregate(self, func, *args, **kwargs):
333
--> 334 result = ResamplerWindowApply(self, func, args=args, kwargs=kwargs).agg()
335 if result is None:
336 how = func
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/apply.py in agg(self)
159
160 if is_dict_like(arg):
--> 161 return self.agg_dict_like()
162 elif is_list_like(arg):
163 # we require a list, but not a 'str'
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/apply.py in agg_dict_like(self)
433 else:
434 # key used for column selection and output
--> 435 results = {
436 key: obj._gotitem(key, ndim=1).agg(how) for key, how in arg.items()
437 }
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/apply.py in <dictcomp>(.0)
434 # key used for column selection and output
435 results = {
--> 436 key: obj._gotitem(key, ndim=1).agg(how) for key, how in arg.items()
437 }
438
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/groupby/generic.py in aggregate(self, func, engine, engine_kwargs, *args, **kwargs)
263
264 try:
--> 265 return self._python_agg_general(func, *args, **kwargs)
266 except KeyError:
267 # TODO: KeyError is raised in _python_agg_general,
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/groupby/groupby.py in _python_agg_general(self, func, *args, **kwargs)
1308 try:
1309 # if this function is invalid for this dtype, we will ignore it.
-> 1310 result = self.grouper.agg_series(obj, f)
1311 except TypeError:
1312 warnings.warn(
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/groupby/ops.py in agg_series(self, obj, func, preserve_dtype)
1026
1027 else:
-> 1028 result = self._aggregate_series_fast(obj, func)
1029
1030 npvalues = lib.maybe_convert_objects(result, try_float=False)
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/groupby/ops.py in _aggregate_series_fast(self, obj, func)
1249 # - len(self.bins) > 0
1250 sbg = libreduction.SeriesBinGrouper(obj, func, self.bins)
-> 1251 result, _ = sbg.get_result()
1252 return result
1253
/SSD/lime/conda/lib/python3.9/site-packages/pandas/_libs/reduction.pyx in pandas._libs.reduction.SeriesBinGrouper.get_result()
/SSD/lime/conda/lib/python3.9/site-packages/pandas/_libs/reduction.pyx in pandas._libs.reduction._BaseGrouper._apply_to_group()
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/groupby/groupby.py in <lambda>(x)
1294 def _python_agg_general(self, func, *args, **kwargs):
1295 func = com.is_builtin_func(func)
-> 1296 f = lambda x: func(x, *args, **kwargs)
1297
1298 # iterate through "columns" ex exclusions to populate output dict
/tmp/ipykernel_939/2003501728.py in vwap(x)
2 print("it's vwap")
3 print(x)
----> 4 p = x.price
5 print("it's p")
6 print(p)
/SSD/lime/conda/lib/python3.9/site-packages/pandas/core/generic.py in __getattr__(self, name)
5485 ):
5486 return self[name]
-> 5487 return object.__getattribute__(self, name)
5488
5489 def __setattr__(self, name: str, value) -> None:
AttributeError: 'Series' object has no attribute 'price'
```
### Expected Behavior
`Resampler.apply` can locate attribute with one function
```python
r.apply(vwap)
```
which returns
```
time
2021-09-01 00:00:01 47150.777407
2021-09-01 00:00:02 NaN
2021-09-01 00:00:03 47153.470000
Freq: S, dtype: float64
```
and the debug prints in `vwap` show it can locate attributes `price` and `vwap`:
```
it's vwap
2021-09-01 00:00:00.023 1391646824
2021-09-01 00:00:00.093 1391646825
2021-09-01 00:00:00.994 1391646826
2021-09-01 00:00:00.994 1391646827
2021-09-01 00:00:00.994 1391646828
2021-09-01 00:00:00.994 1391646829
Name: trade Id, dtype: int64
it's vwap
trade Id price qty quoteQty isBuyerMaker
time
2021-09-01 00:00:00.023 1391646824 47150.32 0.002 94.30 True
2021-09-01 00:00:00.093 1391646825 47150.33 0.002 94.30 False
2021-09-01 00:00:00.994 1391646826 47150.33 0.021 990.15 False
2021-09-01 00:00:00.994 1391646827 47150.33 0.021 990.15 False
2021-09-01 00:00:00.994 1391646828 47152.97 0.002 94.30 False
2021-09-01 00:00:00.994 1391646829 47153.48 0.006 282.92 False
it's p
time
2021-09-01 00:00:00.023 47150.32
2021-09-01 00:00:00.093 47150.33
2021-09-01 00:00:00.994 47150.33
2021-09-01 00:00:00.994 47150.33
2021-09-01 00:00:00.994 47152.97
2021-09-01 00:00:00.994 47153.48
Name: price, dtype: float64
it's q
time
2021-09-01 00:00:00.023 0.002
2021-09-01 00:00:00.093 0.002
2021-09-01 00:00:00.994 0.021
2021-09-01 00:00:00.994 0.021
2021-09-01 00:00:00.994 0.002
2021-09-01 00:00:00.994 0.006
Name: qty, dtype: float64
it's vwap
Empty DataFrame
Columns: [trade Id, price, qty, quoteQty, isBuyerMaker]
Index: []
it's p
Series([], Name: price, dtype: float64)
it's q
Series([], Name: qty, dtype: float64)
it's vwap
trade Id price qty quoteQty isBuyerMaker
time
2021-09-01 00:00:02.050 1391646830 47153.47 0.006 282.92 True
2021-09-01 00:00:02.889 1391646831 47153.47 0.054 2546.28 True
2021-09-01 00:00:02.889 1391646832 47153.47 0.050 2357.67 True
2021-09-01 00:00:02.889 1391646833 47153.47 0.050 2357.67 True
it's p
time
2021-09-01 00:00:02.050 47153.47
2021-09-01 00:00:02.889 47153.47
2021-09-01 00:00:02.889 47153.47
2021-09-01 00:00:02.889 47153.47
Name: price, dtype: float64
it's q
time
2021-09-01 00:00:02.050 0.006
2021-09-01 00:00:02.889 0.054
2021-09-01 00:00:02.889 0.050
2021-09-01 00:00:02.889 0.050
Name: qty, dtype: float64
```
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 5f648bf1706dd75a9ca0d29f26eadfbb595fe52b
python : 3.9.5.final.0
python-bits : 64
OS : Linux
OS-release : 3.10.0-1160.42.2.el7.x86_64
Version : #1 SMP Tue Sep 7 14:49:57 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : fr_CA.UTF-8
LOCALE : fr_CA.UTF-8
pandas : 1.3.2
numpy : 1.20.3
pytz : 2021.1
dateutil : 2.8.2
pip : 21.1.3
setuptools : 52.0.0.post20210125
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.27.0
pandas_datareader: 0.10.0
bs4 : None
bottleneck : 1.3.2
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : 2.7.3
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44400/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44400/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44401 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44401/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44401/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44401/events | https://github.com/pandas-dev/pandas/pull/44401 | 1,051,455,956 | PR_kwDOAA0YD84ublcl | 44,401 | BUG: DataFrame.stack with EA columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-12T00:00:02Z" | "2021-11-12T17:19:01Z" | "2021-11-12T03:11:32Z" | MEMBER | null | - [x] closes #43561
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 1,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44401/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44401/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44401.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44401",
"merged_at": "2021-11-12T03:11:32Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44401.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44401"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44402 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44402/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44402/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44402/events | https://github.com/pandas-dev/pandas/pull/44402 | 1,051,707,933 | PR_kwDOAA0YD84ucYKs | 44,402 | Backport PR #44356 on branch 1.3.x (Fixed regression in Series.duplicated for categorical dtype with bool categories) | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "e11d21",
"default": false,
"description": "Functionality that used to work in a prior pandas version",
"id": 32815646,
"name": "Regression",
"node_id": "MDU6TGFiZWwzMjgxNTY0Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Regression"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 47,
"created_at": "2021-10-16T17:29:59Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/13159005?v=4",
"events_url": "https://api.github.com/users/simonjayhawkins/events{/privacy}",
"followers_url": "https://api.github.com/users/simonjayhawkins/followers",
"following_url": "https://api.github.com/users/simonjayhawkins/following{/other_user}",
"gists_url": "https://api.github.com/users/simonjayhawkins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simonjayhawkins",
"id": 13159005,
"login": "simonjayhawkins",
"node_id": "MDQ6VXNlcjEzMTU5MDA1",
"organizations_url": "https://api.github.com/users/simonjayhawkins/orgs",
"received_events_url": "https://api.github.com/users/simonjayhawkins/received_events",
"repos_url": "https://api.github.com/users/simonjayhawkins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simonjayhawkins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simonjayhawkins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simonjayhawkins"
},
"description": "on-merge: backport to 1.3.x",
"due_on": "2021-11-28T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/91",
"id": 7259169,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91/labels",
"node_id": "MI_kwDOAA0YD84AbsQh",
"number": 91,
"open_issues": 23,
"state": "open",
"title": "1.3.5",
"updated_at": "2021-11-21T13:42:45Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/91"
} | 1 | "2021-11-12T08:33:01Z" | "2021-11-12T09:51:40Z" | "2021-11-12T09:46:04Z" | MEMBER | null | Backport PR #44356 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44402/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44402/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44402.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44402",
"merged_at": "2021-11-12T09:46:04Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44402.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44402"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44403 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44403/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44403/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44403/events | https://github.com/pandas-dev/pandas/issues/44403 | 1,051,717,178 | I_kwDOAA0YD84-r-46 | 44,403 | BUG: Exception while loading XML with XPath | {
"avatar_url": "https://avatars.githubusercontent.com/u/49984942?v=4",
"events_url": "https://api.github.com/users/olvinroght/events{/privacy}",
"followers_url": "https://api.github.com/users/olvinroght/followers",
"following_url": "https://api.github.com/users/olvinroght/following{/other_user}",
"gists_url": "https://api.github.com/users/olvinroght/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/olvinroght",
"id": 49984942,
"login": "olvinroght",
"node_id": "MDQ6VXNlcjQ5OTg0OTQy",
"organizations_url": "https://api.github.com/users/olvinroght/orgs",
"received_events_url": "https://api.github.com/users/olvinroght/received_events",
"repos_url": "https://api.github.com/users/olvinroght/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/olvinroght/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/olvinroght/subscriptions",
"type": "User",
"url": "https://api.github.com/users/olvinroght"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "1d76db",
"default": false,
"description": "read_xml, to_xml",
"id": 2707590670,
"name": "IO XML",
"node_id": "MDU6TGFiZWwyNzA3NTkwNjcw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20XML"
}
] | open | false | null | [] | null | 1 | "2021-11-12T08:44:32Z" | "2021-11-20T18:42:56Z" | null | NONE | null | ###
- [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 master branch of pandas.
### Reproducible Example
```python
import pandas as pd
xml = '''<RootNode>
<Child1>Text1</Child1>
<Child2>Text2</Child2>
<Node1 name="Child3" value="Text3" />
<Node2 customname="Child4" some-attr="blah blah" value="Text4" />
</RootNode>'''
xpath = ".//Child1/text() | .//Child2/text() | " \
".//Node1[@name='Child3']/@value | " \
".//Node2[@customname='Child4']/@value"
df = pd.read_xml(xml, xpath=xpath)
```
### Issue Description
Last line `pd.read_xml()` throws next exception:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\[USER]\AppData\Roaming\Python\Python39\site-packages\pandas\io\xml.py", line 927, in read_xml
return _parse(
File "C:\Users\[USER]\AppData\Roaming\Python\Python39\site-packages\pandas\io\xml.py", line 728, in _parse
data_dicts = p.parse_data()
File "C:\Users\[USER]\AppData\Roaming\Python\Python39\site-packages\pandas\io\xml.py", line 400, in parse_data
return self._parse_nodes()
File "C:\Users\[USER]\AppData\Roaming\Python\Python39\site-packages\pandas\io\xml.py", line 455, in _parse_nodes
dicts = [
File "C:\Users\[USER]\AppData\Roaming\Python\Python39\site-packages\pandas\io\xml.py", line 457, in <listcomp>
**el.attrib,
AttributeError: 'lxml.etree._ElementUnicodeResult' object has no attribute 'attrib'
```
Same XPath expression works in `lxml` which is used as default xml parser. For some reasons `pandas` fails to get attribute value `/@value`, if I remove this from expression it doesn't throw any exceptions.
With simpler XPath (`.//Node1[@name='Child3']/@value`) it throws another exception:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\[USER]\AppData\Roaming\Python\Python39\site-packages\pandas\io\xml.py", line 927, in read_xml
return _parse(
File "C:\Users\[USER]\AppData\Roaming\Python\Python39\site-packages\pandas\io\xml.py", line 728, in _parse
data_dicts = p.parse_data()
File "C:\Users\[USER]\AppData\Roaming\Python\Python39\site-packages\pandas\io\xml.py", line 397, in parse_data
self._validate_path()
File "C:\Users\[USER]\AppData\Roaming\Python\Python39\site-packages\pandas\io\xml.py", line 505, in _validate_path
raise ValueError(msg)
ValueError: xpath does not return any nodes. Be sure row level nodes are in xpath. If document uses namespaces denoted with xmlns, be sure to define namespaces and use them in xpath.
```
### Expected Behavior
```python
from lxml import etree
xml = '''<RootNode>
<Child1>Text1</Child1>
<Child2>Text2</Child2>
<Node1 name="Child3" value="Text3" />
<Node2 customname="Child4" some-attr="blah blah" value="Text4" />
</RootNode>'''
xpath = ".//Child1/text() | .//Child2/text() | " \
".//Node1[@name='Child3']/@value | " \
".//Node2[@customname='Child4']/@value"
root = etree.fromstring(xml)
result = root.xpath(xpath)
# returns ['Text1', 'Text2', 'Text3', 'Text4']
```
### Installed Versions
```
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.9.7.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19043
machine : AMD64
processor : AMD64 Family 18 Model 1 Stepping 0, AuthenticAMD
byteorder : little
LC_ALL : None
LANG : None
LOCALE :
pandas : 1.3.4
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.2.3
setuptools : 57.4.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : 0.8.9
xarray : None
xlrd : None
xlwt : None
numba : None
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44403/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44403/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44404 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44404/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44404/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44404/events | https://github.com/pandas-dev/pandas/pull/44404 | 1,051,760,909 | PR_kwDOAA0YD84uchzy | 44,404 | BUG: .get_indexer_non_unique() must return an array of ints (#44084) | {
"avatar_url": "https://avatars.githubusercontent.com/u/5902745?v=4",
"events_url": "https://api.github.com/users/johannes-mueller/events{/privacy}",
"followers_url": "https://api.github.com/users/johannes-mueller/followers",
"following_url": "https://api.github.com/users/johannes-mueller/following{/other_user}",
"gists_url": "https://api.github.com/users/johannes-mueller/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/johannes-mueller",
"id": 5902745,
"login": "johannes-mueller",
"node_id": "MDQ6VXNlcjU5MDI3NDU=",
"organizations_url": "https://api.github.com/users/johannes-mueller/orgs",
"received_events_url": "https://api.github.com/users/johannes-mueller/received_events",
"repos_url": "https://api.github.com/users/johannes-mueller/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/johannes-mueller/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/johannes-mueller/subscriptions",
"type": "User",
"url": "https://api.github.com/users/johannes-mueller"
} | [
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
},
{
"color": "009800",
"default": false,
"description": "Interval data type",
"id": 150096370,
"name": "Interval",
"node_id": "MDU6TGFiZWwxNTAwOTYzNzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Interval"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-12T09:32:22Z" | "2021-11-16T12:53:04Z" | "2021-11-14T02:26:44Z" | CONTRIBUTOR | null | GH#44084 boils down to the following.
According to the docs `.get_indexer_non_unique()` is supposed to return
"integers from 0 to n - 1 indicating that the index at these positions matches
the corresponding target values". However, for an index that is non unique and
non monotonic it returns a boolean mask. That is because it uses `.get_loc()`
which for non unique, non monotonic indexes returns a boolean mask.
This patch catches that case and converts the boolean mask from `.get_loc()`
into the corresponding array of integers if the index is not unique and not
monotonic.
- [x] closes #44084
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44404/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44404/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44404.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44404",
"merged_at": "2021-11-14T02:26:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44404.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44404"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44405 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44405/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44405/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44405/events | https://github.com/pandas-dev/pandas/issues/44405 | 1,051,776,286 | I_kwDOAA0YD84-sNUe | 44,405 | BUG: drop_duplicates on categorical not preserving NA | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
},
{
"color": "8cc645",
"default": false,
"description": "Related to pd.NA and nullable extension arrays",
"id": 1817503692,
"name": "NA - MaskedArrays",
"node_id": "MDU6TGFiZWwxODE3NTAzNjky",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/NA%20-%20MaskedArrays"
}
] | open | false | null | [] | null | 2 | "2021-11-12T09:49:22Z" | "2021-11-14T05:13:21Z" | null | MEMBER | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
ser = Series(
Categorical(
[True, False, True, False, NA], categories=[True, False], ordered=True
)
)
ser.drop_duplicates()
```
### Issue Description
``NA`` gets converted to ``NaN``
```
0 True
1 False
4 NaN
dtype: category
Categories (2, object): [True < False]
```
### Expected Behavior
Returning ``NA``
```
0 True
1 False
4 NA
dtype: category
Categories (2, object): [True < False]
```
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 01b86edbbbf4bd81d85d7d6638117545cd13dfac
python : 3.8.12.final.0
python-bits : 64
OS : Linux
OS-release : 5.11.0-38-generic
Version : #42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0.dev0+1085.g01b86edbbb
numpy : 1.21.3
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 58.0.4
Cython : 0.29.24
pytest : 6.2.5
hypothesis : 6.23.1
sphinx : 4.2.0
blosc : None
feather : None
xlsxwriter : 3.0.1
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.28.0
pandas_datareader: None
bs4 : 4.10.0
bottleneck : 1.3.2
fsspec : 2021.11.0
fastparquet : 0.7.1
gcsfs : 2021.05.0
matplotlib : 3.4.3
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : 2021.11.0
scipy : 1.7.2
sqlalchemy : 1.4.25
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.18.0
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1
None
Process finished with exit code 0
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44405/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44405/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44406 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44406/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44406/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44406/events | https://github.com/pandas-dev/pandas/pull/44406 | 1,051,949,203 | PR_kwDOAA0YD84udJAL | 44,406 | TYP: Typ part of python_parser | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | open | false | null | [] | null | 5 | "2021-11-12T13:06:14Z" | "2021-11-20T20:21:04Z" | null | MEMBER | null | @simonjayhawkins I am wondering about mypy with overloads.
The overload for ``_do_date_conversion`` could be more specific, e.g.
```
@overload
def _do_date_conversions(
self,
names: list[Scalar | tuple],
data: dict[Scalar | tuple, ArrayLike] | dict[Scalar | tuple, np.ndarray],
) -> tuple[
list[Scalar | tuple],
dict[Scalar | tuple, ArrayLike] | dict[Scalar | tuple, np.ndarray],
]:
...
```
could be transformed to
```
@overload
def _do_date_conversions(
self,
names: list[Scalar | tuple],
data: dict[Scalar | tuple, ArrayLike],
) -> tuple[
list[Scalar | tuple],
dict[Scalar | tuple, ArrayLike],
]:
...
@overload
def _do_date_conversions(
self,
names: list[Scalar | tuple],
data: dict[Scalar | tuple, np.ndarray],
) -> tuple[
list[Scalar | tuple],
dict[Scalar | tuple, np.ndarray],
]:
...
```
But in this case mypy complains about:
`` error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [misc]``
On the other side, if typing this only with
```
@overload
def _do_date_conversions(
self,
names: list[Scalar | tuple],
data: dict[Scalar | tuple, ArrayLike],
) -> tuple[
list[Scalar | tuple],
dict[Scalar | tuple, ArrayLike],
]:
...
```
and passing a ``dict[Scalar | tuple, np.ndarray]`` mypy complains with
```
pandas/io/parsers/python_parser.py:283: error: Argument 2 to "_do_date_conversions" of "ParserBase" has incompatible type "Dict[Union[Union[Union[str, int, float, bool], Union[Period, Timestamp, Timedelta, Any]], Tuple[Any, ...]], ndarray[Any, Any]]"; expected "Dict[Union[Union[Union[str, int, float, bool], Union[Period, Timestamp, Timedelta, Any]], Tuple[Any, ...]], Union[ExtensionArray, ndarray[Any, Any]]]" [arg-type]
pandas/io/parsers/python_parser.py:283: note: "Dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
pandas/io/parsers/python_parser.py:283: note: Consider using "Mapping" instead, which is covariant in the value type
```
This looks inconsistent. I think the overload should accept the distinction between ``ArrayLike`` and ``np.ndarray`` with dicts or lists?
Technically we could use ``Mapping`` probably, but we would loose some strictness in this case and the object is alwyas a ``dict`` and we know if passing only np.ndarray we will get them in return.
On another topic: Should we use an alias for ``Scalar | tuple``? We need this throughout the code to indicate column names | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44406/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44406/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44406.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44406",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44406.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44406"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44407 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44407/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44407/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44407/events | https://github.com/pandas-dev/pandas/pull/44407 | 1,051,958,594 | PR_kwDOAA0YD84udK_q | 44,407 | TST: Add nulls fixture to duplicates categorical na test | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-12T13:17:30Z" | "2021-11-12T15:16:11Z" | "2021-11-12T14:55:43Z" | MEMBER | null | - [ ] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
cc @jorisvandenbossche as a follow up | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44407/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44407/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44407.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44407",
"merged_at": "2021-11-12T14:55:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44407.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44407"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44408 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44408/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44408/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44408/events | https://github.com/pandas-dev/pandas/pull/44408 | 1,052,007,134 | PR_kwDOAA0YD84udVCI | 44,408 | BUG: read_csv raising if parse_dates is used with MultiIndex columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-12T14:12:49Z" | "2021-11-14T02:17:49Z" | "2021-11-14T02:17:45Z" | MEMBER | null | - [x] closes #8991
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44408/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44408/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44408.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44408",
"merged_at": "2021-11-14T02:17:44Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44408.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44408"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44409 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44409/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44409/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44409/events | https://github.com/pandas-dev/pandas/issues/44409 | 1,052,068,117 | I_kwDOAA0YD84-tUkV | 44,409 | BUG: DataFrame.to_csv cannot return a binary string when not piped to file | {
"avatar_url": "https://avatars.githubusercontent.com/u/93189615?v=4",
"events_url": "https://api.github.com/users/Julien-Moussou/events{/privacy}",
"followers_url": "https://api.github.com/users/Julien-Moussou/followers",
"following_url": "https://api.github.com/users/Julien-Moussou/following{/other_user}",
"gists_url": "https://api.github.com/users/Julien-Moussou/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Julien-Moussou",
"id": 93189615,
"login": "Julien-Moussou",
"node_id": "U_kgDOBY317w",
"organizations_url": "https://api.github.com/users/Julien-Moussou/orgs",
"received_events_url": "https://api.github.com/users/Julien-Moussou/received_events",
"repos_url": "https://api.github.com/users/Julien-Moussou/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Julien-Moussou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Julien-Moussou/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Julien-Moussou"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "207de5",
"default": false,
"description": "Requires discussion from core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
}
] | open | false | null | [] | null | 2 | "2021-11-12T15:12:02Z" | "2021-11-18T13:52:32Z" | null | NONE | null | ###
- [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 master branch of pandas.
### Reproducible Example
```python
import pandas as pd
df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
print(df.to_csv(index=False)) # works
print(df.to_csv(mode="b", index=False)) # fails with unclear error
```
### Issue Description
When calling `to_csv` in binary mode without providing an output file, the following error is thrown:
```
File "...\pandas\core\generic.py", line 3466, in to_csv
return DataFrameRenderer(formatter).to_csv(
File "...\pandas\io\formats\format.py", line 1105, in to_csv
csv_formatter.save()
File "...\pandas\io\formats\csvs.py", line 257, in save
self._save()
File "...\pandas\io\common.py", line 122, in __exit__
self.close()
File "...\pandas\io\common.py", line 107, in close
self.handle.flush()
TypeError: string argument expected, got 'bytes'
```
I believe that is due to the use of `StringIO` as buffer [here](https://github.com/pandas-dev/pandas/blob/945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5/pandas/io/formats/format.py#L1082) (and possibly in other places) when the output is not directed to a file.
It is easy enough to work around on the user side (use the string output and do `unicodestring.encode()` on the result) but the error thrown is not very useful.
### Expected Behavior
In my view, from best to worse:
- Produce the expected binary string - in the example above `b'a,b\r\n1,4\r\n2,5\r\n3,6\r\n'`.
- By replacing the StringIO buffer logic, see above.
- By calling `.encode()` after formatting the string. Much simpler to code, but it might cause some memory issues if the output is large (doubling the output). Possibly some performance issues too?
- Raise a better exception. Even simpler to code, with something along the lines of
```
if path_or_buf is None and "b" in mode:
raise ValueError("Binary mode output can only be used for files. Produce a str and call .encode() afterwards.")
```
- Status quo
### Installed Versions
<details>
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.9.6.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19043
machine : AMD64
processor : Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
byteorder : little
LC_ALL : None
LANG : fr_FR.UTF-8
LOCALE : fr_FR.cp1252
pandas : 1.3.4
numpy : 1.20.2
pytz : 2021.1
dateutil : 2.8.1
pip : 21.3.1
setuptools : 56.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : 2.8.6 (dt dec pq3 ext lo64)
jinja2 : 2.11.3
IPython : 7.26.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : 1.4.0
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44409/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44409/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44410 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44410/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44410/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44410/events | https://github.com/pandas-dev/pandas/issues/44410 | 1,052,082,549 | I_kwDOAA0YD84-tYF1 | 44,410 | BUG: reset_index on a MultiIndex with duplicate levels raises a ValueError | {
"avatar_url": "https://avatars.githubusercontent.com/u/5266232?v=4",
"events_url": "https://api.github.com/users/pymrkc/events{/privacy}",
"followers_url": "https://api.github.com/users/pymrkc/followers",
"following_url": "https://api.github.com/users/pymrkc/following{/other_user}",
"gists_url": "https://api.github.com/users/pymrkc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pymrkc",
"id": 5266232,
"login": "pymrkc",
"node_id": "MDQ6VXNlcjUyNjYyMzI=",
"organizations_url": "https://api.github.com/users/pymrkc/orgs",
"received_events_url": "https://api.github.com/users/pymrkc/received_events",
"repos_url": "https://api.github.com/users/pymrkc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pymrkc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pymrkc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pymrkc"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
] | open | false | null | [] | null | 1 | "2021-11-12T15:25:52Z" | "2021-11-14T05:18:44Z" | null | NONE | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
>>> import pandas
>>> from pandas import Timestamp
>>> df = pandas.DataFrame({'label': {1000: 'apple',
1001: 'carrot',
1002: 'carrot',
1003: 'apple',
1004: 'apple',
1005: 'carrot'},
'date': {1000: Timestamp('2021-10-27 00:00:00'),
1001: Timestamp('2021-10-27 00:00:00'),
1002: Timestamp('2021-10-28 00:00:00'),
1003: Timestamp('2021-10-28 00:00:00'),
1004: Timestamp('2021-10-29 00:00:00'),
1005: Timestamp('2021-10-29 00:00:00')},
'stock': {1000: 100,
1001: 150,
1002: 75,
1003: 50,
1004: 200,
1005: 20}})
>>> df_rolling = df.set_index(['label', 'date']).groupby(level='label').rolling(window=7, min_periods=1).sum()
>>> df_rolling
stock
label label date
apple apple 2021-10-27 100.0
2021-10-28 150.0
2021-10-29 350.0
carrot carrot 2021-10-27 150.0
2021-10-28 225.0
2021-10-29 245.0
>>> df_rolling.index
MultiIndex([( 'apple', 'apple', '2021-10-27'),
( 'apple', 'apple', '2021-10-28'),
( 'apple', 'apple', '2021-10-29'),
('carrot', 'carrot', '2021-10-27'),
('carrot', 'carrot', '2021-10-28'),
('carrot', 'carrot', '2021-10-29')],
names=['label', 'label', 'date'])
>>> df_rolling = df_rolling.reset_index()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-53-8b81c1e32ea2> in <module>
----> 1 df_rolling = df_rolling.reset_index()
/usr/local/lib/python3.8/dist-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs)
309 stacklevel=stacklevel,
310 )
--> 311 return func(*args, **kwargs)
312
313 return wrapper
/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py in reset_index(self, level, drop, inplace, col_level, col_fill)
5797 )
5798
-> 5799 new_obj.insert(0, name, level_values)
5800
5801 new_obj.index = new_index
/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py in insert(self, loc, column, value, allow_duplicates)
4412 if not allow_duplicates and column in self.columns:
4413 # Should this be a different kind of error??
-> 4414 raise ValueError(f"cannot insert {column}, already exists")
4415 if not isinstance(loc, int):
4416 raise TypeError("loc must be int")
ValueError: cannot insert label, already exists
```
### Issue Description
In pandas 1.1.5, this code works fine; the `MultiIndex` looks as you'd expect it to, and the `reset_index` call works fine. This code breaks in 1.3.4.
### Expected Behavior
```
>>> import pandas
>>> from pandas import Timestamp
>>> df = pandas.DataFrame({'label': {1000: 'apple',
1001: 'carrot',
1002: 'carrot',
1003: 'apple',
1004: 'apple',
1005: 'carrot'},
'date': {1000: Timestamp('2021-10-27 00:00:00'),
1001: Timestamp('2021-10-27 00:00:00'),
1002: Timestamp('2021-10-28 00:00:00'),
1003: Timestamp('2021-10-28 00:00:00'),
1004: Timestamp('2021-10-29 00:00:00'),
1005: Timestamp('2021-10-29 00:00:00')},
'stock': {1000: 100,
1001: 150,
1002: 75,
1003: 50,
1004: 200,
1005: 20}})
>>> df_rolling = df.set_index(['label', 'date']).groupby(level='label').rolling(window=7, min_periods=1).sum()
>>> df_rolling
stock
label
apple 100.0
apple 150.0
apple 350.0
carrot 150.0
carrot 225.0
carrot 245.0
>>> df_rolling.index
MultiIndex([( 'apple',),
( 'apple',),
( 'apple',),
('carrot',),
('carrot',),
('carrot',)],
names=['label'])
>>> df_rolling = df_rolling.reset_index()
>>> df_rolling.index
RangeIndex(start=0, stop=6, step=1)
```
### Installed Versions
<details>
In [60]: pandas.show_versions()
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.11.0-37-generic
Version : #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.4
numpy : 1.21.4
pytz : 2019.3
dateutil : 2.7.3
pip : 20.0.2
setuptools : 45.2.0
Cython : None
pytest : 6.2.4
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.13.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44410/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44410/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44411 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44411/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44411/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44411/events | https://github.com/pandas-dev/pandas/pull/44411 | 1,052,197,317 | PR_kwDOAA0YD84ud6uK | 44,411 | WARN: Add FutureWarning for `DataFrame.to_latex` | {
"avatar_url": "https://avatars.githubusercontent.com/u/24256554?v=4",
"events_url": "https://api.github.com/users/attack68/events{/privacy}",
"followers_url": "https://api.github.com/users/attack68/followers",
"following_url": "https://api.github.com/users/attack68/following{/other_user}",
"gists_url": "https://api.github.com/users/attack68/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/attack68",
"id": 24256554,
"login": "attack68",
"node_id": "MDQ6VXNlcjI0MjU2NTU0",
"organizations_url": "https://api.github.com/users/attack68/orgs",
"received_events_url": "https://api.github.com/users/attack68/received_events",
"repos_url": "https://api.github.com/users/attack68/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/attack68/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/attack68/subscriptions",
"type": "User",
"url": "https://api.github.com/users/attack68"
} | [
{
"color": "0052cc",
"default": false,
"description": "pandas objects compatability with Numpy or Python functions",
"id": 76865106,
"name": "Compat",
"node_id": "MDU6TGFiZWw3Njg2NTEwNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat"
},
{
"color": "5319e7",
"default": false,
"description": "Functionality to remove in pandas",
"id": 87485152,
"name": "Deprecate",
"node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate"
},
{
"color": "006b75",
"default": false,
"description": "to_latex",
"id": 251382258,
"name": "IO LaTeX",
"node_id": "MDU6TGFiZWwyNTEzODIyNTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20LaTeX"
}
] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-12T17:25:26Z" | "2021-11-20T21:17:10Z" | null | CONTRIBUTOR | null | Instead of #41648, which performs a refactor and adds the warning in the same PR, I am proposing adding the warning only for 1.4.0 and then in 2.0 there will be scope to make breaking changes and refactor the arguments signature.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44411/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44411/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44411.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44411",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44411.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44411"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44412 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44412/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44412/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44412/events | https://github.com/pandas-dev/pandas/pull/44412 | 1,052,206,338 | PR_kwDOAA0YD84ud8bn | 44,412 | REF: EA quantile logic to EA._quantile | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] | open | false | null | [] | null | 1 | "2021-11-12T17:33:53Z" | "2021-11-15T02:09:10Z" | null | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44412/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44412/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44412.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44412",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44412.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44412"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44413 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44413/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44413/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44413/events | https://github.com/pandas-dev/pandas/pull/44413 | 1,052,244,721 | PR_kwDOAA0YD84ueB3V | 44,413 | TST: collect/share Index tests | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-12T18:00:43Z" | "2021-11-14T15:12:55Z" | "2021-11-14T02:05:39Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44413/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44413/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44413.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44413",
"merged_at": "2021-11-14T02:05:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44413.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44413"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44414 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44414/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44414/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44414/events | https://github.com/pandas-dev/pandas/issues/44414 | 1,052,345,082 | I_kwDOAA0YD84-uYL6 | 44,414 | BUG: DataFrame attributes are lost after specifying dtype for select columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/6249613?v=4",
"events_url": "https://api.github.com/users/blaylockbk/events{/privacy}",
"followers_url": "https://api.github.com/users/blaylockbk/followers",
"following_url": "https://api.github.com/users/blaylockbk/following{/other_user}",
"gists_url": "https://api.github.com/users/blaylockbk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/blaylockbk",
"id": 6249613,
"login": "blaylockbk",
"node_id": "MDQ6VXNlcjYyNDk2MTM=",
"organizations_url": "https://api.github.com/users/blaylockbk/orgs",
"received_events_url": "https://api.github.com/users/blaylockbk/received_events",
"repos_url": "https://api.github.com/users/blaylockbk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/blaylockbk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/blaylockbk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/blaylockbk"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "370f77",
"default": false,
"description": "DataFrame data structure",
"id": 1049312478,
"name": "DataFrame",
"node_id": "MDU6TGFiZWwxMDQ5MzEyNDc4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/DataFrame"
},
{
"color": "56efc9",
"default": false,
"description": "_metadata, .attrs",
"id": 1539579994,
"name": "metadata",
"node_id": "MDU6TGFiZWwxNTM5NTc5OTk0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/metadata"
}
] | open | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/47086561?v=4",
"events_url": "https://api.github.com/users/skwirskj/events{/privacy}",
"followers_url": "https://api.github.com/users/skwirskj/followers",
"following_url": "https://api.github.com/users/skwirskj/following{/other_user}",
"gists_url": "https://api.github.com/users/skwirskj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/skwirskj",
"id": 47086561,
"login": "skwirskj",
"node_id": "MDQ6VXNlcjQ3MDg2NTYx",
"organizations_url": "https://api.github.com/users/skwirskj/orgs",
"received_events_url": "https://api.github.com/users/skwirskj/received_events",
"repos_url": "https://api.github.com/users/skwirskj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/skwirskj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/skwirskj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/skwirskj"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/47086561?v=4",
"events_url": "https://api.github.com/users/skwirskj/events{/privacy}",
"followers_url": "https://api.github.com/users/skwirskj/followers",
"following_url": "https://api.github.com/users/skwirskj/following{/other_user}",
"gists_url": "https://api.github.com/users/skwirskj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/skwirskj",
"id": 47086561,
"login": "skwirskj",
"node_id": "MDQ6VXNlcjQ3MDg2NTYx",
"organizations_url": "https://api.github.com/users/skwirskj/orgs",
"received_events_url": "https://api.github.com/users/skwirskj/received_events",
"repos_url": "https://api.github.com/users/skwirskj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/skwirskj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/skwirskj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/skwirskj"
}
] | null | 4 | "2021-11-12T19:23:21Z" | "2021-11-15T23:14:26Z" | null | NONE | null | ###
- [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 master branch of pandas.
### Reproducible Example
```python
# I add attributes to a DataFrame
df = pd.DataFrame(dict(column1=[1,2,3,4], column2=[1,2,3,4]))
df.attrs['name'] = "hello"
print(df)
print(df.attrs)
OUT:
column1 column2
0 1 1
1 2 2
2 3 3
3 4 4
{'name': 'hello'}
# When I change the dtype, the attribute is still there (as expected)
df1 = df.astype(float)
print(df1)
print(df1.attrs)
OUT:
column1 column2
0 1.0 1.0
1 2.0 2.0
2 3.0 3.0
3 4.0 4.0
{'name': 'hello'}
# But when I specify the dtype for specific columns, the attributes are lost
df2 = df.astype({'column1':float})
print(df2)
print(df2.attrs)
OUT:
column1 column2
0 1.0 1
1 2.0 2
2 3.0 3
3 4.0 4
{}
```
### Issue Description
I assigned attributes to a DataFrame. When I change the DataFrame dtype with `df.astype(float)`, the DataFrame attribute are retained, as expected. But when I change the dtype for specific columns with `df.astype({'column1':float})`, the attributes are lost.
### Expected Behavior
I expected the DataFrame to retrain the attributes after specifying the dtype for specific columns as it does when I specify the dtype for the full DataFrame.
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.9.7.final.0
python-bits : 64
OS : Linux
OS-release : 5.3.18-24.78-default
Version : #1 SMP Mon Aug 2 21:00:23 UTC 2021 (a13100d)
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.4
numpy : 1.21.3
pytz : 2021.3
dateutil : 2.8.2
pip : 21.3.1
setuptools : 58.2.0
Cython : None
pytest : 6.2.5
hypothesis : None
sphinx : 4.0.3
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.0
IPython : 7.28.0
pandas_datareader: None
bs4 : 4.10.0
bottleneck : None
fsspec : 2021.10.1
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : 2021.10.1
scipy : 1.7.1
sqlalchemy : 1.4.26
tables : None
tabulate : None
xarray : 0.19.0
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44414/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44414/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44415 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44415/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44415/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44415/events | https://github.com/pandas-dev/pandas/pull/44415 | 1,052,361,501 | PR_kwDOAA0YD84ueQhC | 44,415 | TST: de-duplicate assert_slics_equivalent | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-12T19:50:19Z" | "2021-11-13T17:19:28Z" | "2021-11-13T17:05:21Z" | MEMBER | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
Also fixes one of the usages that uses `.is_integer` instead of `.is_integer()` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44415/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44415/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44415.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44415",
"merged_at": "2021-11-13T17:05:21Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44415.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44415"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44416 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44416/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44416/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44416/events | https://github.com/pandas-dev/pandas/pull/44416 | 1,052,418,274 | PR_kwDOAA0YD84uecUG | 44,416 | ENH: Use find_stack_level | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "0052cc",
"default": false,
"description": "pandas objects compatability with Numpy or Python functions",
"id": 76865106,
"name": "Compat",
"node_id": "MDU6TGFiZWw3Njg2NTEwNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-12T21:24:20Z" | "2021-11-13T21:16:16Z" | "2021-11-13T17:04:23Z" | MEMBER | null | Part of #44347
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44416/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44416/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44416.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44416",
"merged_at": "2021-11-13T17:04:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44416.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44416"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44417 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44417/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44417/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44417/events | https://github.com/pandas-dev/pandas/pull/44417 | 1,052,450,287 | PR_kwDOAA0YD84uei8I | 44,417 | BUG: DataFrame.astype(series) with duplicate columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/8078968?v=4",
"events_url": "https://api.github.com/users/jbrockmendel/events{/privacy}",
"followers_url": "https://api.github.com/users/jbrockmendel/followers",
"following_url": "https://api.github.com/users/jbrockmendel/following{/other_user}",
"gists_url": "https://api.github.com/users/jbrockmendel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jbrockmendel",
"id": 8078968,
"login": "jbrockmendel",
"node_id": "MDQ6VXNlcjgwNzg5Njg=",
"organizations_url": "https://api.github.com/users/jbrockmendel/orgs",
"received_events_url": "https://api.github.com/users/jbrockmendel/received_events",
"repos_url": "https://api.github.com/users/jbrockmendel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jbrockmendel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jbrockmendel"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-12T22:24:42Z" | "2021-11-14T06:03:30Z" | "2021-11-14T02:12:10Z" | MEMBER | null | - [ ] closes #xxxx
- [x] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44417/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44417/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44417.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44417",
"merged_at": "2021-11-14T02:12:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44417.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44417"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44418 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44418/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44418/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44418/events | https://github.com/pandas-dev/pandas/pull/44418 | 1,052,458,852 | PR_kwDOAA0YD84uekqi | 44,418 | DOC: Add how=cross description to join | {
"avatar_url": "https://avatars.githubusercontent.com/u/61934744?v=4",
"events_url": "https://api.github.com/users/phofl/events{/privacy}",
"followers_url": "https://api.github.com/users/phofl/followers",
"following_url": "https://api.github.com/users/phofl/following{/other_user}",
"gists_url": "https://api.github.com/users/phofl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/phofl",
"id": 61934744,
"login": "phofl",
"node_id": "MDQ6VXNlcjYxOTM0NzQ0",
"organizations_url": "https://api.github.com/users/phofl/orgs",
"received_events_url": "https://api.github.com/users/phofl/received_events",
"repos_url": "https://api.github.com/users/phofl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/phofl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/phofl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/phofl"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 1 | "2021-11-12T22:44:01Z" | "2021-11-13T18:48:29Z" | "2021-11-13T17:05:35Z" | MEMBER | null | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44418/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44418/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44418.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44418",
"merged_at": "2021-11-13T17:05:35Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44418.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44418"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44419 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44419/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44419/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44419/events | https://github.com/pandas-dev/pandas/pull/44419 | 1,052,468,265 | PR_kwDOAA0YD84uemnS | 44,419 | DOC: whatsnew for the improvement to warning messages | {
"avatar_url": "https://avatars.githubusercontent.com/u/45562402?v=4",
"events_url": "https://api.github.com/users/rhshadrach/events{/privacy}",
"followers_url": "https://api.github.com/users/rhshadrach/followers",
"following_url": "https://api.github.com/users/rhshadrach/following{/other_user}",
"gists_url": "https://api.github.com/users/rhshadrach/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhshadrach",
"id": 45562402,
"login": "rhshadrach",
"node_id": "MDQ6VXNlcjQ1NTYyNDAy",
"organizations_url": "https://api.github.com/users/rhshadrach/orgs",
"received_events_url": "https://api.github.com/users/rhshadrach/received_events",
"repos_url": "https://api.github.com/users/rhshadrach/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhshadrach/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhshadrach/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhshadrach"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 1203,
"created_at": "2021-06-09T18:28:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2021-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/86",
"id": 6840253,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86/labels",
"node_id": "MDk6TWlsZXN0b25lNjg0MDI1Mw==",
"number": 86,
"open_issues": 77,
"state": "open",
"title": "1.4",
"updated_at": "2021-11-21T02:34:31Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/86"
} | 0 | "2021-11-12T23:07:11Z" | "2021-11-13T17:34:57Z" | "2021-11-13T17:21:03Z" | MEMBER | null | - [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry
The use of find_stack_level is a significant improvement for users, thought it should go in the whatsnew. It appears to me that the ipython directive in sphinx will suppress any warning message, so I've just made it a literal block.

cc @phofl
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44419/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44419/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44419.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44419",
"merged_at": "2021-11-13T17:21:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/44419.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44419"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/44420 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44420/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44420/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44420/events | https://github.com/pandas-dev/pandas/issues/44420 | 1,052,474,922 | I_kwDOAA0YD84-u34q | 44,420 | BUG: Incorrect string matched in tests/io/parser/test_quoting.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/20543961?v=4",
"events_url": "https://api.github.com/users/RRathna/events{/privacy}",
"followers_url": "https://api.github.com/users/RRathna/followers",
"following_url": "https://api.github.com/users/RRathna/following{/other_user}",
"gists_url": "https://api.github.com/users/RRathna/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RRathna",
"id": 20543961,
"login": "RRathna",
"node_id": "MDQ6VXNlcjIwNTQzOTYx",
"organizations_url": "https://api.github.com/users/RRathna/orgs",
"received_events_url": "https://api.github.com/users/RRathna/received_events",
"repos_url": "https://api.github.com/users/RRathna/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RRathna/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RRathna/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RRathna"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0052cc",
"default": false,
"description": "Issue that has not been reviewed by a pandas team member",
"id": 1954720290,
"name": "Needs Triage",
"node_id": "MDU6TGFiZWwxOTU0NzIwMjkw",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Triage"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 4 | "2021-11-12T23:22:57Z" | "2021-11-13T00:04:14Z" | "2021-11-13T00:04:14Z" | NONE | null | ###
- [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.
- [X] I have confirmed this bug exists on the master branch of pandas.
### Reproducible Example
```python
Run command:
python3 -m pytest -s -q --no-header --skip-slow --skip-db --skip-network /usr/local/lib/python3.9/site-packages/pandas/tests/io/parser/test_quoting.py
Expected result:
AssertionError: Regex pattern '"quotechar" must be string, not int' does not match '"quotechar" must be string or None, not int'.
```
### Issue Description
Pandas now returns string '"quotechar" must be string or None, not int' when passing in an int value as argument.
The current test does a regex match for '"quotechar" must be string, not int' which is resulting in the test failing.
### Expected Behavior
The test should pass
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.9.8.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0
Version : Mystikos 1.0.0
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : None
LOCALE : en_US.UTF-8
pandas : 1.3.4
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.2.4
setuptools : 57.5.0
Cython : None
pytest : 6.2.5
hypothesis : 6.24.2
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44420/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44420/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44421 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44421/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44421/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44421/events | https://github.com/pandas-dev/pandas/issues/44421 | 1,052,486,671 | I_kwDOAA0YD84-u6wP | 44,421 | BUG: pd.read_sql() fails on self join when handling date columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/6820092?v=4",
"events_url": "https://api.github.com/users/RevolutionTech/events{/privacy}",
"followers_url": "https://api.github.com/users/RevolutionTech/followers",
"following_url": "https://api.github.com/users/RevolutionTech/following{/other_user}",
"gists_url": "https://api.github.com/users/RevolutionTech/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RevolutionTech",
"id": 6820092,
"login": "RevolutionTech",
"node_id": "MDQ6VXNlcjY4MjAwOTI=",
"organizations_url": "https://api.github.com/users/RevolutionTech/orgs",
"received_events_url": "https://api.github.com/users/RevolutionTech/received_events",
"repos_url": "https://api.github.com/users/RevolutionTech/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RevolutionTech/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RevolutionTech/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RevolutionTech"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "5319e7",
"default": false,
"description": "to_sql, read_sql, read_sql_query",
"id": 47232590,
"name": "IO SQL",
"node_id": "MDU6TGFiZWw0NzIzMjU5MA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20SQL"
}
] | open | false | null | [] | null | 1 | "2021-11-12T23:59:06Z" | "2021-11-21T04:40:42Z" | null | NONE | null | ###
- [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 master branch of pandas.
### Reproducible Example
```python
import sqlalchemy as sa
import pandas as pd
username = "..."
password = "..."
host = "..."
port = "..."
database = "..."
conn_string = sa.engine.url.URL.create(
"postgresql",
username=username,
password=password,
host=host,
port=port,
database=database
)
engine = sa.create_engine(conn_string)
conn = engine.connect()
sql_query = 'SELECT * FROM "person" AS p1 INNER JOIN "person" AS p2 ON p1.id = p2.id;'
df = pd.read_sql(sql_query, conn)
```
### Issue Description
When performing a SQL self-join on a table that includes date columns, `pd.read_sql()` fails with `ValueError: shape mismatch: value array of shape (0,1) could not be broadcast to indexing result of shape (1,1)`:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/io/sql.py", line 628, in read_sql
return pandas_sql.read_query(
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/io/sql.py", line 1594, in read_query
frame = _wrap_result(
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/io/sql.py", line 177, in _wrap_result
frame = _parse_date_columns(frame, parse_dates)
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/io/sql.py", line 158, in _parse_date_columns
data_frame[col_name] = _handle_date_column(df_col, format=fmt)
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/core/frame.py", line 3612, in __setitem__
self._set_item(key, value)
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/core/frame.py", line 3797, in _set_item
self._set_item_mgr(key, value)
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/core/frame.py", line 3756, in _set_item_mgr
self._iset_item_mgr(loc, value)
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/core/frame.py", line 3746, in _iset_item_mgr
self._mgr.iset(loc, value)
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 1078, in iset
blk.set_inplace(blk_locs, value_getitem(val_locs))
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/core/internals/blocks.py", line 360, in set_inplace
self.values[locs] = values
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/core/arrays/datetimelike.py", line 373, in __setitem__
super().__setitem__(key, value)
File "/Users/lucas/.virtualenvs/pandas-read-sql-bug/lib/python3.8/site-packages/pandas/core/arrays/_mixins.py", line 183, in __setitem__
self._ndarray[key] = value
ValueError: shape mismatch: value array of shape (0,1) could not be broadcast to indexing result of shape (1,1)
```
The tables referenced in the example were created in a PostgreSQL database using the following SQL:
```sql
CREATE TABLE person
(
id serial constraint person_pkey primary key,
created_dt timestamp with time zone
);
INSERT INTO person
VALUES (1, '2021-01-01T00:00:00Z');
```
### Expected Behavior
I would expect `pd.read_sql()` to return a DataFrame here with two `id` columns and two `created_dt` columns. This is the behaviour I get when creating the table without a primary key:
```sql
CREATE TABLE person
(
id int not null,
created_dt timestamp with time zone
);
```
### Installed Versions
<details>
INSTALLED VERSIONS
------------------
commit : 945c9ed766a61c7d2c0a7cbb251b6edebf9cb7d5
python : 3.8.2.final.0
python-bits : 64
OS : Darwin
OS-release : 20.6.0
Version : Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.4
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.1.1
setuptools : 56.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : 2.9.2 (dt dec pq3 ext lo64)
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.4.27
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
</details> | {
"+1": 3,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44421/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44421/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/44422 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/44422/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/44422/comments | https://api.github.com/repos/pandas-dev/pandas/issues/44422/events | https://github.com/pandas-dev/pandas/pull/44422 | 1,052,534,925 | PR_kwDOAA0YD84uezim | 44,422 | Bug gh44079 | {
"avatar_url": "https://avatars.githubusercontent.com/u/58493968?v=4",
"events_url": "https://api.github.com/users/zhangxiaoxing/events{/privacy}",
"followers_url": "https://api.github.com/users/zhangxiaoxing/followers",
"following_url": "https://api.github.com/users/zhangxiaoxing/following{/other_user}",
"gists_url": "https://api.github.com/users/zhangxiaoxing/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zhangxiaoxing",
"id": 58493968,
"login": "zhangxiaoxing",
"node_id": "MDQ6VXNlcjU4NDkzOTY4",
"organizations_url": "https://api.github.com/users/zhangxiaoxing/orgs",
"received_events_url": "https://api.github.com/users/zhangxiaoxing/received_events",
"repos_url": "https://api.github.com/users/zhangxiaoxing/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zhangxiaoxing/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zhangxiaoxing/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zhangxiaoxing"
} | [] | closed | false | null | [] | null | 0 | "2021-11-13T03:50:43Z" | "2021-11-13T06:10:20Z" | "2021-11-13T06:10:20Z" | CONTRIBUTOR | null | - [x] closes #44079
- [ ] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/44422/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/44422/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/44422.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/44422",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/44422.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/44422"
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.