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
timestamp[us, tz=UTC]
updated_at
timestamp[us, tz=UTC]
closed_at
timestamp[us, tz=UTC]
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/35417
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35417/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35417/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35417/events
https://github.com/pandas-dev/pandas/pull/35417
665,873,802
MDExOlB1bGxSZXF1ZXN0NDU2ODE1NjQ4
35,417
BUG: df[col] = arr should not overwrite data in df[col]
{ "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" } ]
open
false
null
[]
{ "closed_at": null, "closed_issues": 4, "created_at": "2016-08-16T13:21:24Z", "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": "2022-06-30T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/42", "id": 1945020, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/42/labels", "node_id": "MDk6TWlsZXN0b25lMTk0NTAyMA==", "number": 42, "open_issues": 11, "state": "open", "title": "2.0", "updated_at": "2021-10-07T22:01:52Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/42" }
44
2020-07-26T22:39:51Z
2021-11-14T01:41:36Z
null
MEMBER
null
- [x] closes #33457 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry cc @jorisvandenbossche this still fails 7 tests locally and there's one more (commented in-line) test that looks fishy. Extra eyeballs would be welcome. xref #35271, #35266
{ "+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/35417/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35417/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35417.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35417", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35417.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35417" }
https://api.github.com/repos/pandas-dev/pandas/issues/35418
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35418/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35418/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35418/events
https://github.com/pandas-dev/pandas/issues/35418
665,954,570
MDU6SXNzdWU2NjU5NTQ1NzA=
35,418
ENH: implement drop_levels argument in loc
{ "avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4", "events_url": "https://api.github.com/users/arw2019/events{/privacy}", "followers_url": "https://api.github.com/users/arw2019/followers", "following_url": "https://api.github.com/users/arw2019/following{/other_user}", "gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/arw2019", "id": 48889395, "login": "arw2019", "node_id": "MDQ6VXNlcjQ4ODg5Mzk1", "organizations_url": "https://api.github.com/users/arw2019/orgs", "received_events_url": "https://api.github.com/users/arw2019/received_events", "repos_url": "https://api.github.com/users/arw2019/repos", "site_admin": false, "starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/arw2019/subscriptions", "type": "User", "url": "https://api.github.com/users/arw2019" }
[ { "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" }, { "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" } ]
open
false
null
[]
null
6
2020-07-27T03:51:21Z
2021-08-08T19:01:36Z
null
MEMBER
null
xref #6249, #18262, #35301 Following up on #35301. This is an outstanding piece of `DataFrame.xs` functionality that's currently not available in `.loc`. Since `xs` is slated for deprecation I'd like implement this in `.loc` #### Example Let's define a multiindexed dataframe (example from `xs` docs) ``` ...: import pandas as pd ...: ...: d = { ...: 'num_legs': [4, 4, 2, 2], ...: 'num_wings': [0, 0, 2, 2], ...: 'class': ['mammal', 'mammal', 'mammal', 'bird'], ...: 'animal': ['cat', 'dog', 'bat', 'penguin'], ...: 'locomotion': ['walks', 'walks', 'flies', 'walks'] ...: } ...: ...: df = pd.DataFrame(data=d) ...: df.set_index(['class', 'animal', 'locomotion'], inplace=True) In [2]: df Out[2]: num_legs num_wings class animal locomotion mammal cat walks 4 0 dog walks 4 0 bat flies 2 2 bird penguin walks 2 2 ``` `xs` and `.loc` both let us take a cross-section through a `MultiIndex` ``` In [3]: import pandas._testing as tm ...: ...: res_xs = df.xs(('mammal', slice(None))) ...: res_loc = df.loc[('mammal', slice(None))] ...: tm.assert_frame_equal(res_xs, res_loc) ``` but with `xs` we can choose to keep the index columns through which we're slicing using the `drop_level` argument: ``` In [4]: df.xs(('mammal', slice(None), 'flies'), drop_level=False) Out[4]: num_legs num_wings class animal locomotion mammal bat flies 2 2 ``` #### new API Looking for ideas on what's appropriate here. Based off of suggestions in #6249 would something like this work? ``` In [ ]: df.loc(drop_levels=False)[('mammal', slice(None), 'flies')] Out[4]: num_legs num_wings class animal locomotion mammal bat flies 2 2 ```
{ "+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/35418/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35418/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35419
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35419/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35419/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35419/events
https://github.com/pandas-dev/pandas/issues/35419
665,991,560
MDU6SXNzdWU2NjU5OTE1NjA=
35,419
DOC: HDF5 External Compatibility section examples don't work
{ "avatar_url": "https://avatars.githubusercontent.com/u/8238804?v=4", "events_url": "https://api.github.com/users/ivirshup/events{/privacy}", "followers_url": "https://api.github.com/users/ivirshup/followers", "following_url": "https://api.github.com/users/ivirshup/following{/other_user}", "gists_url": "https://api.github.com/users/ivirshup/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ivirshup", "id": 8238804, "login": "ivirshup", "node_id": "MDQ6VXNlcjgyMzg4MDQ=", "organizations_url": "https://api.github.com/users/ivirshup/orgs", "received_events_url": "https://api.github.com/users/ivirshup/received_events", "repos_url": "https://api.github.com/users/ivirshup/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ivirshup/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ivirshup/subscriptions", "type": "User", "url": "https://api.github.com/users/ivirshup" }
[ { "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_hdf, HDFStore", "id": 47229190, "name": "IO HDF5", "node_id": "MDU6TGFiZWw0NzIyOTE5MA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HDF5" } ]
open
false
null
[]
null
1
2020-07-27T05:39:21Z
2020-09-04T15:33:41Z
null
CONTRIBUTOR
null
#### Location of the documentation https://pandas.pydata.org/docs/user_guide/io.html#external-compatibility. #### Documentation problem This section probably has at least one typo, but more generally, doesn't seem to be documenting current behaviour. I'll quickly run through the example here, but with a bit of cleaning so we don't have to run the entire page. ```python import pandas as pd import numpy as np df_for_r = pd.DataFrame({"first": np.random.rand(100), "second": np.random.rand(100), "class": np.random.randint(0, 2, (100, ))}, index=range(100)) store_export = pd.HDFStore('export.h5') # In the documentation, this is written with 'data_columns=df_dc.columns', which I'm assuming is a mistake store_export.append('df_for_r', df_for_r, data_columns=df_for_r.columns) store_export ``` We can take a look at what's in this file: ```python store_export.close() !h5ls -r export.h5 ``` <details> <summary> Output </summary> ``` / Group /df_for_r Group /df_for_r/_i_table Group /df_for_r/_i_table/class Group /df_for_r/_i_table/class/abounds Dataset {0/Inf} /df_for_r/_i_table/class/bounds Dataset {0/Inf, 127} /df_for_r/_i_table/class/indices Dataset {0/Inf, 131072} /df_for_r/_i_table/class/indicesLR Dataset {131072} /df_for_r/_i_table/class/mbounds Dataset {0/Inf} /df_for_r/_i_table/class/mranges Dataset {0/Inf} /df_for_r/_i_table/class/ranges Dataset {0/Inf, 2} /df_for_r/_i_table/class/sorted Dataset {0/Inf, 131072} /df_for_r/_i_table/class/sortedLR Dataset {131201} /df_for_r/_i_table/class/zbounds Dataset {0/Inf} /df_for_r/_i_table/first Group /df_for_r/_i_table/first/abounds Dataset {0/Inf} /df_for_r/_i_table/first/bounds Dataset {0/Inf, 127} /df_for_r/_i_table/first/indices Dataset {0/Inf, 131072} /df_for_r/_i_table/first/indicesLR Dataset {131072} /df_for_r/_i_table/first/mbounds Dataset {0/Inf} /df_for_r/_i_table/first/mranges Dataset {0/Inf} /df_for_r/_i_table/first/ranges Dataset {0/Inf, 2} /df_for_r/_i_table/first/sorted Dataset {0/Inf, 131072} /df_for_r/_i_table/first/sortedLR Dataset {131201} /df_for_r/_i_table/first/zbounds Dataset {0/Inf} /df_for_r/_i_table/index Group /df_for_r/_i_table/index/abounds Dataset {0/Inf} /df_for_r/_i_table/index/bounds Dataset {0/Inf, 127} /df_for_r/_i_table/index/indices Dataset {0/Inf, 131072} /df_for_r/_i_table/index/indicesLR Dataset {131072} /df_for_r/_i_table/index/mbounds Dataset {0/Inf} /df_for_r/_i_table/index/mranges Dataset {0/Inf} /df_for_r/_i_table/index/ranges Dataset {0/Inf, 2} /df_for_r/_i_table/index/sorted Dataset {0/Inf, 131072} /df_for_r/_i_table/index/sortedLR Dataset {131201} /df_for_r/_i_table/index/zbounds Dataset {0/Inf} /df_for_r/_i_table/second Group /df_for_r/_i_table/second/abounds Dataset {0/Inf} /df_for_r/_i_table/second/bounds Dataset {0/Inf, 127} /df_for_r/_i_table/second/indices Dataset {0/Inf, 131072} /df_for_r/_i_table/second/indicesLR Dataset {131072} /df_for_r/_i_table/second/mbounds Dataset {0/Inf} /df_for_r/_i_table/second/mranges Dataset {0/Inf} /df_for_r/_i_table/second/ranges Dataset {0/Inf, 2} /df_for_r/_i_table/second/sorted Dataset {0/Inf, 131072} /df_for_r/_i_table/second/sortedLR Dataset {131201} /df_for_r/_i_table/second/zbounds Dataset {0/Inf} /df_for_r/table Dataset {200/Inf} ``` </details> Next, there is an R function for reading in this data. Just from comparing the given function to the written file I think we can see there is a mismatch: ```R library(rhdf5) loadhdf5data <- function(h5File) { listing <- h5ls(h5File) # Find all data nodes, values are stored in *_values and corresponding column # titles in *_items data_nodes <- grep("_values", listing$name) name_nodes <- grep("_items", listing$name) data_paths = paste(listing$group[data_nodes], listing$name[data_nodes], sep = "/") name_paths = paste(listing$group[name_nodes], listing$name[name_nodes], sep = "/") columns = list() for (idx in seq(data_paths)) { # NOTE: matrices returned by h5read have to be transposed to obtain # required Fortran order! data <- data.frame(t(h5read(h5File, data_paths[idx]))) names <- t(h5read(h5File, name_paths[idx])) entry <- data.frame(data) colnames(entry) <- names columns <- append(columns, entry) } data <- data.frame(columns) return(data) } ``` For example, there are no entries in `export.h5` which have `_values` or `_items` in the names. If we actually call this function, we get an empty dataframe back: ```R > loadhdf5data("export.h5") data frame with 0 columns and 0 rows ``` This function does seem to work if the file is written using "fixed" format ```python df_for_r.to_hdf("export2.h5", key="df_for_r", format="fixed") ``` ```R > loadhdf5data("export2.h5") first second class 1 0.675013759 0.787289926 0 2 0.936797348 0.349671699 1 3 0.951930811 0.275965069 0 4 0.203085530 0.380154180 0 5 0.627195223 0.462702969 1 6 0.129148756 0.385663581 1 ... ``` This is a bit contrary to the prose for this section which reads: > HDFStore writes table format objects in specific formats suitable for producing loss-less round trips to pandas objects. For external compatibility, HDFStore can read native PyTables format tables. > > It is possible to write an HDFStore object that can easily be imported into R using the rhdf5 library (Package website). Create a table format store like this: #### Suggested fix for documentation This should probably specify that the "table" format doesn't work here. In addition, since external compatibility relies on the user writing code to read this format, maybe a specification for the format should be documented here?
{ "+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/35419/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35419/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35420
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35420/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35420/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35420/events
https://github.com/pandas-dev/pandas/issues/35420
666,045,275
MDU6SXNzdWU2NjYwNDUyNzU=
35,420
to_json/read_json can't handle interval index
{ "avatar_url": "https://avatars.githubusercontent.com/u/2629945?v=4", "events_url": "https://api.github.com/users/konstantinmiller/events{/privacy}", "followers_url": "https://api.github.com/users/konstantinmiller/followers", "following_url": "https://api.github.com/users/konstantinmiller/following{/other_user}", "gists_url": "https://api.github.com/users/konstantinmiller/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/konstantinmiller", "id": 2629945, "login": "konstantinmiller", "node_id": "MDQ6VXNlcjI2Mjk5NDU=", "organizations_url": "https://api.github.com/users/konstantinmiller/orgs", "received_events_url": "https://api.github.com/users/konstantinmiller/received_events", "repos_url": "https://api.github.com/users/konstantinmiller/repos", "site_admin": false, "starred_url": "https://api.github.com/users/konstantinmiller/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/konstantinmiller/subscriptions", "type": "User", "url": "https://api.github.com/users/konstantinmiller" }
[ { "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": "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" }, { "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" } ]
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" }
2
2020-07-27T07:17:03Z
2020-07-27T13:41:17Z
null
NONE
null
Serializing a data frame with an interval index to JSON and then deserializing it fails to recover the index. Here is an example: ``` df = pd.DataFrame(index=pd.IntervalIndex(closed='left', dtype='interval[int64]', data=[pd.Interval(0, 2, closed='left')]), data={'a': [42'}) serialized = df.to_json(orient='table') deserialized = pd.read_json(serialized, orient='table') ``` Looking at `serialized` reveals that the interval index is serialized as `any` type looking like that: ``` {"closed":"left","closed_right":false,"left":0,"mid":0.5,"open_right":true,"right":1} ``` and looking at `deserialized.index[0]` reveals that the interval type wasn't recovered but rather the de-serialized value is still a dict: ``` {'closed': 'left', 'closed_right': False, 'left': 0, 'mid': 1.0, 'open_right': True, 'right': 2} ```
{ "+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/35420/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35420/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35421
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35421/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35421/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35421/events
https://github.com/pandas-dev/pandas/issues/35421
666,091,563
MDU6SXNzdWU2NjYwOTE1NjM=
35,421
Support reading YAML files
{ "avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4", "events_url": "https://api.github.com/users/janosh/events{/privacy}", "followers_url": "https://api.github.com/users/janosh/followers", "following_url": "https://api.github.com/users/janosh/following{/other_user}", "gists_url": "https://api.github.com/users/janosh/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/janosh", "id": 30958850, "login": "janosh", "node_id": "MDQ6VXNlcjMwOTU4ODUw", "organizations_url": "https://api.github.com/users/janosh/orgs", "received_events_url": "https://api.github.com/users/janosh/received_events", "repos_url": "https://api.github.com/users/janosh/repos", "site_admin": false, "starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janosh/subscriptions", "type": "User", "url": "https://api.github.com/users/janosh" }
[ { "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": "06909A", "default": false, "description": "IO issues that don't fit into a more specific label", "id": 2301354, "name": "IO Data", "node_id": "MDU6TGFiZWwyMzAxMzU0", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Data" }, { "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" } ]
closed
false
null
[]
null
4
2020-07-27T08:25:21Z
2021-08-08T19:10:41Z
2021-08-08T19:10:41Z
CONTRIBUTOR
null
Would be cool if pandas supported reading YAML files. #### Describe the solution you'd like `pd.read_yaml(file_path: str, **kwargs: dict)` #### API breaking implications None #### Describe alternatives you've considered You can of course import the `yaml` module, use it to read the file and then feed that data into pandas. ```py import pandas as pd import yaml with open("data.yml") as stream: data = yaml.safe_load(stream) df = pd.DataFrame(data) ``` But for a format that has become as widely used as YAML, this is a lot of manual work compared to ```py import pandas as pd df = pd.read_yaml("data.yml") ```
{ "+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/35421/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35421/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35422
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35422/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35422/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35422/events
https://github.com/pandas-dev/pandas/issues/35422
666,135,725
MDU6SXNzdWU2NjYxMzU3MjU=
35,422
Using loc[] or at[] to add rows doesn't work with an IntervalIndex doesn't work
{ "avatar_url": "https://avatars.githubusercontent.com/u/2629945?v=4", "events_url": "https://api.github.com/users/konstantinmiller/events{/privacy}", "followers_url": "https://api.github.com/users/konstantinmiller/followers", "following_url": "https://api.github.com/users/konstantinmiller/following{/other_user}", "gists_url": "https://api.github.com/users/konstantinmiller/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/konstantinmiller", "id": 2629945, "login": "konstantinmiller", "node_id": "MDQ6VXNlcjI2Mjk5NDU=", "organizations_url": "https://api.github.com/users/konstantinmiller/orgs", "received_events_url": "https://api.github.com/users/konstantinmiller/received_events", "repos_url": "https://api.github.com/users/konstantinmiller/repos", "site_admin": false, "starred_url": "https://api.github.com/users/konstantinmiller/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/konstantinmiller/subscriptions", "type": "User", "url": "https://api.github.com/users/konstantinmiller" }
[ { "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": "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": "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" }, { "color": "207de5", "default": false, "description": "Clarification about behavior needed to assess issue", "id": 307649777, "name": "Needs Info", "node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info" } ]
closed
false
null
[]
null
2
2020-07-27T09:31:18Z
2020-07-27T13:13:01Z
2020-07-27T13:12:50Z
NONE
null
It seems that a data frame with an `IntervalIndex` won't let you use `loc[]` or `at[]` to add rows. I would expect the following to work: ``` df = pd.DataFrame(index=pd.IntervalIndex(closed='left', dtype='interval[int64]', data=[pd.Interval(0, 1, closed='left')]), data={'a': [42]}) df.at[pd.Interval(2, 3, closed='left'), 'a'] = 43 ``` However, it throws a confusing error ``` AttributeError: 'pandas._libs.interval.IntervalTree' object has no attribute 'set_value' ```
{ "+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/35422/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35422/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35423
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35423/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35423/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35423/events
https://github.com/pandas-dev/pandas/issues/35423
666,144,923
MDU6SXNzdWU2NjYxNDQ5MjM=
35,423
TST: Add test for `GroupBy.describe()` with duplicate columns
{ "avatar_url": "https://avatars.githubusercontent.com/u/3813175?v=4", "events_url": "https://api.github.com/users/smithto1/events{/privacy}", "followers_url": "https://api.github.com/users/smithto1/followers", "following_url": "https://api.github.com/users/smithto1/following{/other_user}", "gists_url": "https://api.github.com/users/smithto1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/smithto1", "id": 3813175, "login": "smithto1", "node_id": "MDQ6VXNlcjM4MTMxNzU=", "organizations_url": "https://api.github.com/users/smithto1/orgs", "received_events_url": "https://api.github.com/users/smithto1/received_events", "repos_url": "https://api.github.com/users/smithto1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/smithto1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/smithto1/subscriptions", "type": "User", "url": "https://api.github.com/users/smithto1" }
[ { "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": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "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" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
0
2020-07-27T09:44:59Z
2020-08-03T23:13:38Z
2020-08-03T23:13:38Z
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 of pandas. - [x] (optional) I have confirmed this bug exists on the master branch of pandas. --- While working on #35314 I made a change that broke `GroupBy.apply` if you called it on a DataFrame with duplicate columns; however, this break as not caught by any test. Was just caught on inpsection: https://github.com/pandas-dev/pandas/pull/35314#discussion_r460000612 This issue is just to add a test for this case to ensure it works and doesn't break again in the future.
{ "+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/35423/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35423/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35424
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35424/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35424/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35424/events
https://github.com/pandas-dev/pandas/pull/35424
666,146,406
MDExOlB1bGxSZXF1ZXN0NDU3MDQwNTg0
35,424
TST: adding test for .describe() with duplicate columns
{ "avatar_url": "https://avatars.githubusercontent.com/u/3813175?v=4", "events_url": "https://api.github.com/users/smithto1/events{/privacy}", "followers_url": "https://api.github.com/users/smithto1/followers", "following_url": "https://api.github.com/users/smithto1/following{/other_user}", "gists_url": "https://api.github.com/users/smithto1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/smithto1", "id": 3813175, "login": "smithto1", "node_id": "MDQ6VXNlcjM4MTMxNzU=", "organizations_url": "https://api.github.com/users/smithto1/orgs", "received_events_url": "https://api.github.com/users/smithto1/received_events", "repos_url": "https://api.github.com/users/smithto1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/smithto1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/smithto1/subscriptions", "type": "User", "url": "https://api.github.com/users/smithto1" }
[ { "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": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "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" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
3
2020-07-27T09:47:09Z
2020-08-03T23:13:45Z
2020-08-03T23:13:38Z
MEMBER
null
- [x] closes #35423 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` While working on #35314 I made a change that broke `GroupBy.apply` if you called it on a DataFrame with duplicate columns; however, this break was not caught by any test. Was just caught on inpsection: https://github.com/pandas-dev/pandas/pull/35314#discussion_r460000612 This PR is just to add a test for this case to ensure it works and doesn't break again in the future.
{ "+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/35424/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35424/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35424.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35424", "merged_at": "2020-08-03T23:13:38Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35424.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35424" }
https://api.github.com/repos/pandas-dev/pandas/issues/35425
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35425/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35425/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35425/events
https://github.com/pandas-dev/pandas/issues/35425
666,160,202
MDU6SXNzdWU2NjYxNjAyMDI=
35,425
BUG: attrs lost for Series in DataFrame
{ "avatar_url": "https://avatars.githubusercontent.com/u/32569096?v=4", "events_url": "https://api.github.com/users/RobertRosca/events{/privacy}", "followers_url": "https://api.github.com/users/RobertRosca/followers", "following_url": "https://api.github.com/users/RobertRosca/following{/other_user}", "gists_url": "https://api.github.com/users/RobertRosca/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/RobertRosca", "id": 32569096, "login": "RobertRosca", "node_id": "MDQ6VXNlcjMyNTY5MDk2", "organizations_url": "https://api.github.com/users/RobertRosca/orgs", "received_events_url": "https://api.github.com/users/RobertRosca/received_events", "repos_url": "https://api.github.com/users/RobertRosca/repos", "site_admin": false, "starred_url": "https://api.github.com/users/RobertRosca/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RobertRosca/subscriptions", "type": "User", "url": "https://api.github.com/users/RobertRosca" }
[ { "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": "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
null
[]
null
5
2020-07-27T10:04:47Z
2021-08-08T19:11:36Z
null
NONE
null
- [x] I have checked that this issue has not already been reported. - Has sort of come up in other issues related to metadata/attrs not propagating through properly, however I haven't seen any issues specifically about `Series` attrs being lost when put into a `DataFrame`. - [x] I have confirmed this bug exists on the latest version of pandas. - [x] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example See this [GitHub Gist Notebook](https://gist.github.com/RobertRosca/d3c53151dd93242c448daf008fb4bb23). Summary of the issue is: ```python import pandas as pd # Make some dummy dataframe df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]}) # Make some dummy series col1_w_attr = df["col1"].copy() # Add some attrs to it col1_w_attr.attrs["test_attr"] = 1 df["col1_w_attr"] = col1_w_attr # Issue 1: The attrs are missing, call `__finalize__` manually df["col1_w_attr"].__finalize__(col1_w_attr) # Repeat the above with another column: col2_w_attr = df["col2"].copy() col2_w_attr.attrs["test_attr"] = 2 df["col2_w_attr"] = col2_w_attr df["col2_w_attr"].__finalize__(col2_w_attr) # Attrs are present as before df["col2_w_attr"].attrs # Issue 2: col1_w_attrs is now missing its attrs: df["col1_w_attr"].attrs ``` #### Problem description First issue is that attrs are not propagated through when a `Series` is added to a `DataFrame` (likely related to #28283). Second issue is that if you call `__finalize__` to make sure that the attrs are present, once you add another column in or modify the dataframe, the attrs already present for a column are lost. My guess is that when the DataFrame is modified, finalize is not called per-column again, but I haven't looked into it much. I'd be happy to help with this issue, however there are already many issues related to this topic and a few branches where others are working on attrs/metadata/finalize, so I'm a bit hesitant to start work as it'll probably conflict with what has already been done. What would be the best place to discuss collaboration on this? #### Expected Output Expectation would be that you can attach some attrs to a Series, place it into a dataframe, modify/work with the dataframe, then access the attrs again. #### Output of ``pd.show_versions()`` <details> import pandas as pd pd.show_versions() INSTALLED VERSIONS ------------------ commit : None python : 3.8.3.final.0 python-bits : 64 OS : Linux OS-release : 5.7.0-3-MANJARO machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_GB.UTF-8 LOCALE : en_GB.UTF-8 pandas : 1.0.5 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 19.2.3 setuptools : 41.2.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 : 2.11.2 IPython : 7.16.1 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pytest : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/35425/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35425/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35426
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35426/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35426/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35426/events
https://github.com/pandas-dev/pandas/issues/35426
666,183,589
MDU6SXNzdWU2NjYxODM1ODk=
35,426
CI/COMPAT: read_stata failing in numpy dev pipeline
{ "avatar_url": "https://avatars.githubusercontent.com/u/23253999?v=4", "events_url": "https://api.github.com/users/AlexKirko/events{/privacy}", "followers_url": "https://api.github.com/users/AlexKirko/followers", "following_url": "https://api.github.com/users/AlexKirko/following{/other_user}", "gists_url": "https://api.github.com/users/AlexKirko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AlexKirko", "id": 23253999, "login": "AlexKirko", "node_id": "MDQ6VXNlcjIzMjUzOTk5", "organizations_url": "https://api.github.com/users/AlexKirko/orgs", "received_events_url": "https://api.github.com/users/AlexKirko/received_events", "repos_url": "https://api.github.com/users/AlexKirko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AlexKirko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AlexKirko/subscriptions", "type": "User", "url": "https://api.github.com/users/AlexKirko" }
[ { "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": "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": "read_stata, to_stata", "id": 104865385, "name": "IO Stata", "node_id": "MDU6TGFiZWwxMDQ4NjUzODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Stata" } ]
closed
false
null
[]
null
7
2020-07-27T10:34:35Z
2020-08-01T09:34:51Z
2020-08-01T09:34:51Z
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 of pandas. - [X] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Problem description Looks like a change in numpy broke our `read_stata` code, so now we have a bunch of `read_stata` test errors popping up during CI in the numpy_dev pipeline. Maybe this [Numpy PR](https://github.com/numpy/numpy/pull/16943) somehow broke things? I don't think any other PR merged during the last 24 hours could have possibly done so, although I might be missing something. Error example: ``` pandas/tests/io/test_stata.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pandas/io/stata.py:1928: in read_stata data = reader.read() pandas/io/stata.py:1646: in read cols_ = np.where(self.dtyplist)[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = ([<class 'numpy.int8'>, <class 'numpy.int16'>, <class 'numpy.int32'>, <class 'numpy.float32'>, <class 'numpy.float64'>, <class 'numpy.float32'>, ...],) kwargs = {} relevant_args = ([<class 'numpy.int8'>, <class 'numpy.int16'>, <class 'numpy.int32'>, <class 'numpy.float32'>, <class 'numpy.float64'>, <class 'numpy.float32'>, ...], None, None) > ??? E ValueError: invalid __array_struct__ ```
{ "+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/35426/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35426/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35427
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35427/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35427/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35427/events
https://github.com/pandas-dev/pandas/pull/35427
666,199,957
MDExOlB1bGxSZXF1ZXN0NDU3MDg0ODYy
35,427
MAINT: Fix issue in StataReader due to upstream changes
{ "avatar_url": "https://avatars.githubusercontent.com/u/5585221?v=4", "events_url": "https://api.github.com/users/bashtage/events{/privacy}", "followers_url": "https://api.github.com/users/bashtage/followers", "following_url": "https://api.github.com/users/bashtage/following{/other_user}", "gists_url": "https://api.github.com/users/bashtage/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bashtage", "id": 5585221, "login": "bashtage", "node_id": "MDQ6VXNlcjU1ODUyMjE=", "organizations_url": "https://api.github.com/users/bashtage/orgs", "received_events_url": "https://api.github.com/users/bashtage/received_events", "repos_url": "https://api.github.com/users/bashtage/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bashtage/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bashtage/subscriptions", "type": "User", "url": "https://api.github.com/users/bashtage" }
[ { "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": "5319e7", "default": false, "description": "read_stata, to_stata", "id": 104865385, "name": "IO Stata", "node_id": "MDU6TGFiZWwxMDQ4NjUzODU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Stata" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
9
2020-07-27T10:57:26Z
2020-08-06T12:43:13Z
2020-08-06T12:42:57Z
CONTRIBUTOR
null
Avoid creating an array of dtypes to workaround NumPy future change closes #35426 - [X] closes #35426 - [ ] tests added / passed - [X] passes `black pandas` - [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] 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/35427/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35427/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35427.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35427", "merged_at": "2020-08-06T12:42:57Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35427.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35427" }
https://api.github.com/repos/pandas-dev/pandas/issues/35428
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35428/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35428/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35428/events
https://github.com/pandas-dev/pandas/pull/35428
666,459,305
MDExOlB1bGxSZXF1ZXN0NDU3Mjk5Mzc2
35,428
WIP BUG: Inconsistent date parsing of to_datetime
{ "avatar_url": "https://avatars.githubusercontent.com/u/48889395?v=4", "events_url": "https://api.github.com/users/arw2019/events{/privacy}", "followers_url": "https://api.github.com/users/arw2019/followers", "following_url": "https://api.github.com/users/arw2019/following{/other_user}", "gists_url": "https://api.github.com/users/arw2019/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/arw2019", "id": 48889395, "login": "arw2019", "node_id": "MDQ6VXNlcjQ4ODg5Mzk1", "organizations_url": "https://api.github.com/users/arw2019/orgs", "received_events_url": "https://api.github.com/users/arw2019/received_events", "repos_url": "https://api.github.com/users/arw2019/repos", "site_admin": false, "starred_url": "https://api.github.com/users/arw2019/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/arw2019/subscriptions", "type": "User", "url": "https://api.github.com/users/arw2019" }
[ { "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" } ]
closed
false
null
[]
null
5
2020-07-27T17:25:40Z
2020-09-18T15:34:56Z
2020-09-18T15:34:56Z
MEMBER
null
- [x] closes #12585 - [x] tests added / passed - [ ] documentation updated - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry (pending 1.2) This PR is an attempt to address concerns about datetime parsing. I'll update the docs if people approve this change. #### Original problem From #12585: ``` python In [3]: pd.to_datetime(["31/12/2014", "10/03/2011"]) ...: Out[3]: DatetimeIndex(['2014-12-31', '2011-03-10'], dtype='datetime64[ns]', freq=None) ``` The issue is that the first item is parsed as `DD\MM\YYYY` whereas for the second the format is `MM\DD\YYYY`, and there is no message to alert the user of inconsistency in the output. The problem lies with the `dayfirst` argument that selects between `DD\MM\YYYY` and `MM\DD\YYYY`. In the parser: https://github.com/pandas-dev/pandas/blob/04e9e0afd476b1b8bed930e47bf60ee20fa78f38/pandas/_libs/tslibs/parsing.pyx#L94-L163 we try `DD\MM\YYYY` or `MM\DD\YYYY` first depending on `dayfirst` but if the result is invalid we try the other. #### Proposed change I'd like to raise warnings whenever we parse in contradiction to the directive of `dayfirst`. The OP, where `dayfirst` defaults to `False`, now raises a Warning: ``` python In [4]: pd.to_datetime(["31/12/2014", "10/03/2011"], dayfirst=False) ...: /workspaces/pandas-arw2019/pandas/core/arrays/datetimes.py:2044: UserWarning: Parsing 31/12/2014 DD/MM format. result, tz_parsed = tslib.array_to_datetime( Out[4]: DatetimeIndex(['2014-12-31', '2011-10-03'], dtype='datetime64[ns]', freq=None) ``` A downside of this change is that sometimes a consistent output produces unnecessary warnings (due to mismatch with the default value of `dayfirst`): ``` python In [11]: pd.to_datetime(["31/12/2014", "30/04/2011", "31/05/2016"] ) /workspaces/pandas-arw2019/pandas/core/arrays/datetimes.py:2044: UserWarning: Parsing 31/12/2014 DD/MM format. result, tz_parsed = tslib.array_to_datetime( /workspaces/pandas-arw2019/pandas/core/arrays/datetimes.py:2044: UserWarning: Parsing 30/04/2011 DD/MM format. result, tz_parsed = tslib.array_to_datetime( /workspaces/pandas-arw2019/pandas/core/arrays/datetimes.py:2044: UserWarning: Parsing 31/05/2016 DD/MM format. result, tz_parsed = tslib.array_to_datetime( Out[11]: DatetimeIndex(['2014-12-31', '2011-04-30', '2016-05-31'], dtype='datetime64[ns]', freq=None) ``` but these can be silenced with `infer_datetime_format`: ``` python In [12]: pd.to_datetime(["31/12/2014", "30/04/2011", "31/05/2016"], infer_datetime_format=True ) Out[12]: DatetimeIndex(['2014-12-31', '2011-04-30', '2016-05-31'], dtype='datetime64[ns]', freq=None) ``` For invalid input (if it cannot be parsed according to a single format) we will *always* raise a warning, even with `infer_datetime_format=True`: ``` python In [13]: pd.to_datetime(["31/12/2014", "03/31/2011"], infer_datetime_format=True) /workspaces/pandas-arw2019/pandas/core/arrays/datetimes.py:2044: UserWarning: Parsing 31/12/2014 DD/MM format. result, tz_parsed = tslib.array_to_datetime( Out[13]: DatetimeIndex(['2014-12-31', '2011-03-31'], dtype='datetime64[ns]', freq=None) ``` #### Remaining issues Personally I can see a case for raising an error with ``` python In [13]: pd.to_datetime(["31/12/2014", "03/31/2011"], infer_datetime_format=True) ``` since there's no valid way to process that. I also think that ``` python In [11]: pd.to_datetime(["31/12/2014", "30/04/2011", "31/05/2016"]) ``` shouldn't be raising warnings, but I feel much less strongly about that. That said, changing this behaviour will require more heavy-handed alterations to the codebase (and maybe performance implications - not sure). I think that the warnings I added here will allow users to figure out the origin of these problems when they turn up and that should do away with most of the headaches.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 1, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/35428/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35428/timeline
null
1
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35428.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35428", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35428.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35428" }
https://api.github.com/repos/pandas-dev/pandas/issues/35429
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35429/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35429/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35429/events
https://github.com/pandas-dev/pandas/issues/35429
666,589,306
MDU6SXNzdWU2NjY1ODkzMDY=
35,429
BUG: NA does not propagate through mask and where/ raises AssertionError in 1.1.0rc
{ "avatar_url": "https://avatars.githubusercontent.com/u/1417503?v=4", "events_url": "https://api.github.com/users/johnflavin/events{/privacy}", "followers_url": "https://api.github.com/users/johnflavin/followers", "following_url": "https://api.github.com/users/johnflavin/following{/other_user}", "gists_url": "https://api.github.com/users/johnflavin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/johnflavin", "id": 1417503, "login": "johnflavin", "node_id": "MDQ6VXNlcjE0MTc1MDM=", "organizations_url": "https://api.github.com/users/johnflavin/orgs", "received_events_url": "https://api.github.com/users/johnflavin/received_events", "repos_url": "https://api.github.com/users/johnflavin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/johnflavin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/johnflavin/subscriptions", "type": "User", "url": "https://api.github.com/users/johnflavin" }
[ { "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": "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": "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" }, { "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
[]
{ "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" }
5
2020-07-27T21:15:03Z
2020-11-28T17:52:06Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python >>> a = pd.DataFrame([{'col': 'a'}] * 3).convert_dtypes() >>> a col 0 a 1 a 2 a >>> tfna = pd.Series([True, False, pd.NA]).convert_dtypes() >>> tfna 0 True 1 False 2 <NA> dtype: boolean >>> a.mask(tfna, 'b') col 0 b 1 a 2 b >>> a.where(tfna, 'b') col 0 a 1 b 2 b ``` #### Problem description When replacing values with `mask` or `where`, `pd.NA` values in a boolean series used for the `cond` input are always replaced. This means `pd.NA` gets treated as `False` by `where` but as `True` by `mask`. #### Expected Output I would expect that `pd.NA` values in `cond` would propagate to the output. ```python >>> a.mask(tfna, 'b') col 0 b 1 a 2 <NA> >>> a.where(tfna, 'b') col 0 a 1 b 2 <NA> ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.8.3.final.0 python-bits : 64 OS : Darwin OS-release : 18.7.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.0.5 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.0.post20200712 Cython : None pytest : 5.4.3 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.11.2 IPython : 7.15.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.2.2 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : 0.17.1 pytables : None pytest : 5.4.3 pyxlsb : None s3fs : 0.4.2 scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/35429/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35429/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35430
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35430/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35430/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35430/events
https://github.com/pandas-dev/pandas/issues/35430
666,743,357
MDU6SXNzdWU2NjY3NDMzNTc=
35,430
BUG: parse_dates in read_csv fails silently
{ "avatar_url": "https://avatars.githubusercontent.com/u/39023576?v=4", "events_url": "https://api.github.com/users/metazoic/events{/privacy}", "followers_url": "https://api.github.com/users/metazoic/followers", "following_url": "https://api.github.com/users/metazoic/following{/other_user}", "gists_url": "https://api.github.com/users/metazoic/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/metazoic", "id": 39023576, "login": "metazoic", "node_id": "MDQ6VXNlcjM5MDIzNTc2", "organizations_url": "https://api.github.com/users/metazoic/orgs", "received_events_url": "https://api.github.com/users/metazoic/received_events", "repos_url": "https://api.github.com/users/metazoic/repos", "site_admin": false, "starred_url": "https://api.github.com/users/metazoic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/metazoic/subscriptions", "type": "User", "url": "https://api.github.com/users/metazoic" }
[ { "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
2020-07-28T04:16:43Z
2020-07-29T09:43:57Z
2020-07-28T08:43: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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- If `timestamp.csv` contains the following: ``` timestamp 11:22:33.44 11:22:33:44 ``` then ```python df = pandas.read_csv('timestamp.csv', parse_dates=['timestamp']) df.timestamp.dtype ``` results in ``` dtype('O') ``` because of the malformed timestamp. #### Problem description This is a problem because the silent fail does not alert to the malformed timestamp. #### Expected Output By contrast, ```python pandas.to_datetime(df.timestamp) ``` results in an explicit error ```python ParserError: Unknown string format: 11:22:33:44 ``` #### Output of ``pd.show_versions()`` <details> ``` INSTALLED VERSIONS ------------------ commit : None python : 3.7.7.final.0 python-bits : 64 OS : Darwin OS-release : 18.7.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : None LOCALE : None.UTF-8 pandas : 1.0.5 numpy : 1.18.5 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.0.post20200714 Cython : 0.29.21 pytest : 5.4.3 hypothesis : None sphinx : 3.1.2 blosc : None feather : None xlsxwriter : 1.2.9 lxml.etree : 4.5.2 html5lib : 1.1 pymysql : None psycopg2 : None jinja2 : 2.11.2 IPython : 7.16.1 pandas_datareader: None bs4 : 4.9.1 bottleneck : 1.3.2 fastparquet : None gcsfs : None lxml.etree : 4.5.2 matplotlib : 3.2.2 numexpr : 2.7.1 odfpy : None openpyxl : 3.0.4 pandas_gbq : None pyarrow : None pytables : None pytest : 5.4.3 pyxlsb : None s3fs : None scipy : 1.5.0 sqlalchemy : 1.3.18 tables : 3.4.4 tabulate : None xarray : None xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : 1.2.9 numba : 0.50.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/35430/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35430/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35431
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35431/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35431/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35431/events
https://github.com/pandas-dev/pandas/issues/35431
666,750,053
MDU6SXNzdWU2NjY3NTAwNTM=
35,431
BUG: index_col in read_csv ignores dtype
{ "avatar_url": "https://avatars.githubusercontent.com/u/39023576?v=4", "events_url": "https://api.github.com/users/metazoic/events{/privacy}", "followers_url": "https://api.github.com/users/metazoic/followers", "following_url": "https://api.github.com/users/metazoic/following{/other_user}", "gists_url": "https://api.github.com/users/metazoic/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/metazoic", "id": 39023576, "login": "metazoic", "node_id": "MDQ6VXNlcjM5MDIzNTc2", "organizations_url": "https://api.github.com/users/metazoic/orgs", "received_events_url": "https://api.github.com/users/metazoic/received_events", "repos_url": "https://api.github.com/users/metazoic/repos", "site_admin": false, "starred_url": "https://api.github.com/users/metazoic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/metazoic/subscriptions", "type": "User", "url": "https://api.github.com/users/metazoic" }
[ { "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": "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": "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": "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
[]
null
4
2020-07-28T04:28:49Z
2020-07-29T03:38:10Z
2020-07-28T10:09:15Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- If `index.csv` contains: ``` id,key 00,11 22,33 ``` then ```python df = pandas.read_csv('index.csv', dtype=str, index_col='id') df.index.dtype ``` results in ``` dtype('int64') ``` #### Problem description This does not result in an index of strings. #### Expected Output By contrast, ```python df = pandas.read_csv('index.csv', dtype=str) df.set_index('id', inplace=True) df.index.dtype ``` results in ``` dtype('O') ``` as intended. #### Output of ``pd.show_versions()`` <details> ``` INSTALLED VERSIONS ------------------ commit : None python : 3.7.7.final.0 python-bits : 64 OS : Darwin OS-release : 18.7.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : None LOCALE : None.UTF-8 pandas : 1.0.5 numpy : 1.18.5 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.0.post20200714 Cython : 0.29.21 pytest : 5.4.3 hypothesis : None sphinx : 3.1.2 blosc : None feather : None xlsxwriter : 1.2.9 lxml.etree : 4.5.2 html5lib : 1.1 pymysql : None psycopg2 : None jinja2 : 2.11.2 IPython : 7.16.1 pandas_datareader: None bs4 : 4.9.1 bottleneck : 1.3.2 fastparquet : None gcsfs : None lxml.etree : 4.5.2 matplotlib : 3.2.2 numexpr : 2.7.1 odfpy : None openpyxl : 3.0.4 pandas_gbq : None pyarrow : None pytables : None pytest : 5.4.3 pyxlsb : None s3fs : None scipy : 1.5.0 sqlalchemy : 1.3.18 tables : 3.4.4 tabulate : None xarray : None xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : 1.2.9 numba : 0.50.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/35431/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35431/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35432
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35432/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35432/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35432/events
https://github.com/pandas-dev/pandas/pull/35432
666,804,755
MDExOlB1bGxSZXF1ZXN0NDU3NTg1ODE2
35,432
CLN/PERF: move RangeIndex._cached_data to RangeIndex._cache
{ "avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4", "events_url": "https://api.github.com/users/topper-123/events{/privacy}", "followers_url": "https://api.github.com/users/topper-123/followers", "following_url": "https://api.github.com/users/topper-123/following{/other_user}", "gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/topper-123", "id": 26364415, "login": "topper-123", "node_id": "MDQ6VXNlcjI2MzY0NDE1", "organizations_url": "https://api.github.com/users/topper-123/orgs", "received_events_url": "https://api.github.com/users/topper-123/received_events", "repos_url": "https://api.github.com/users/topper-123/repos", "site_admin": false, "starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/topper-123/subscriptions", "type": "User", "url": "https://api.github.com/users/topper-123" }
[ { "color": "a10c02", "default": false, "description": "Memory or execution speed performance", "id": 8935311, "name": "Performance", "node_id": "MDU6TGFiZWw4OTM1MzEx", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance" }, { "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" }, { "color": "d4c5f9", "default": false, "description": "Series/DataFrame/Index/pd.array Constructors", "id": 1465286368, "name": "Constructors", "node_id": "MDU6TGFiZWwxNDY1Mjg2MzY4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Constructors" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
2
2020-07-28T06:27:36Z
2020-08-04T10:20:54Z
2020-08-04T07:51:52Z
CONTRIBUTOR
null
The ``._cached_data`` attribute is not necessary. It was originally added to allow a check to see if the ``._data`` ndarray had been created, but that's also possible to do by a ``"_data" in _cache`` check in the new implemention, which IMO would be more idiomatic. The new implementation has the benefit that the ``_data`` will be available to new copies of a RangeIndex, saving the need to create a new ndarray for each new copy of the RangeIndex. ```python >>> idx = pd.RangeIndex(1_000_000) >>> idx[[1, 4]] # this accesses ._data and saves it in cached_data (master) or _cache["_data"](this PR) >> %timeit idx._shallow_copy()[[1, 4]] 2.55 ms ± 69.3 µs per loop # master 17.7 µs ± 405 ns per loop # this PR ``` xref #26565.
{ "+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/35432/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35432/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35432.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35432", "merged_at": "2020-08-04T07:51:52Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35432.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35432" }
https://api.github.com/repos/pandas-dev/pandas/issues/35433
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35433/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35433/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35433/events
https://github.com/pandas-dev/pandas/issues/35433
666,853,042
MDU6SXNzdWU2NjY4NTMwNDI=
35,433
BUG: A change between Python version 3.6.0 and 3.6.1 causes an apply lambda function with selective column processing to check every column
{ "avatar_url": "https://avatars.githubusercontent.com/u/12877032?v=4", "events_url": "https://api.github.com/users/DeeeeLAN/events{/privacy}", "followers_url": "https://api.github.com/users/DeeeeLAN/followers", "following_url": "https://api.github.com/users/DeeeeLAN/following{/other_user}", "gists_url": "https://api.github.com/users/DeeeeLAN/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/DeeeeLAN", "id": 12877032, "login": "DeeeeLAN", "node_id": "MDQ6VXNlcjEyODc3MDMy", "organizations_url": "https://api.github.com/users/DeeeeLAN/orgs", "received_events_url": "https://api.github.com/users/DeeeeLAN/received_events", "repos_url": "https://api.github.com/users/DeeeeLAN/repos", "site_admin": false, "starred_url": "https://api.github.com/users/DeeeeLAN/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DeeeeLAN/subscriptions", "type": "User", "url": "https://api.github.com/users/DeeeeLAN" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" } ]
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" }
5
2020-07-28T07:59:50Z
2020-07-28T10:43:26Z
2020-07-28T10:29:26Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python import pandas as pd test = pd.DataFrame([ [1, {'c': 1}], [2, {'c': 2}], [3, {'c': 3}], [4, {'c': 4}], [5, {'c': 5}] ], columns=['A', 'B']) print(test[['A', 'B']].apply(lambda x: x.nlargest(2, keep='all') if x.name in ['A'] else x.apply(lambda y: y['c']).nsmallest(2, keep='all'))) ``` #### Problem description On and after Python version 3.6.1, the above code crashes with the error: `TypeError: Cannot use method 'nlargest' with dtype object`. This happens because the `apply(lambda x` function is applying to both columns, even though the `if/else` check should only apply it to the specified column. I am not certain if this is a bug in Python itself, or if python changed and Pandas needs to update to match. I am starting here, though, because I believe the issue will be identified (and fixed if necessary) quicker. On previous versions, the following output is produced: #### Expected Output ``` >>> test[['A', 'B']].apply(lambda x: x.nlargest(2, keep='all') if x.name in ['A'] else x.apply(lambda y: y['c']).nsmallest(2, keep='all')) A B 0 NaN 1.0 1 NaN 2.0 3 4.0 NaN 4 5.0 NaN ``` #### Output of ``pd.show_versions()`` <details> ``` INSTALLED VERSIONS ------------------ commit : None python : 3.6.1.final.0 python-bits : 64 OS : Linux OS-release : 4.9.0-11-amd64 machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.0.5 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.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 fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pytest : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/35433/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35433/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35434
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35434/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35434/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35434/events
https://github.com/pandas-dev/pandas/issues/35434
666,919,212
MDU6SXNzdWU2NjY5MTkyMTI=
35,434
BUG: Shift on a group column when column name is a tuple-of-tuples results in NumPy VisibleDeprecationWarning
{ "avatar_url": "https://avatars.githubusercontent.com/u/23288150?v=4", "events_url": "https://api.github.com/users/misantroop/events{/privacy}", "followers_url": "https://api.github.com/users/misantroop/followers", "following_url": "https://api.github.com/users/misantroop/following{/other_user}", "gists_url": "https://api.github.com/users/misantroop/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/misantroop", "id": 23288150, "login": "misantroop", "node_id": "MDQ6VXNlcjIzMjg4MTUw", "organizations_url": "https://api.github.com/users/misantroop/orgs", "received_events_url": "https://api.github.com/users/misantroop/received_events", "repos_url": "https://api.github.com/users/misantroop/repos", "site_admin": false, "starred_url": "https://api.github.com/users/misantroop/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/misantroop/subscriptions", "type": "User", "url": "https://api.github.com/users/misantroop" }
[ { "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": "ffa0ff", "default": false, "description": "Incorrect or improved errors from pandas", "id": 42670965, "name": "Error Reporting", "node_id": "MDU6TGFiZWw0MjY3MDk2NQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting" }, { "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": "f2f989", "default": false, "description": "Data where the values are collections (lists, sets, dicts, objects, etc.).", "id": 2189479765, "name": "Nested Data", "node_id": "MDU6TGFiZWwyMTg5NDc5NzY1", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Nested%20Data" } ]
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" }
5
2020-07-28T09:25:40Z
2021-08-08T19:13:36Z
null
NONE
null
- [+] I have checked that this issue has not already been reported. - [+] I have confirmed this bug exists on the latest version of pandas. - [+] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample, a copy-pastable example ```python import pandas as pd import numpy as np np.warnings.filterwarnings('error', category=np.VisibleDeprecationWarning) tuple_column = ('A', ('B', 2),) df = pd.DataFrame({tuple_column: [1]}, index=['q']) grp = df.groupby(level=0) df[tuple_column] = grp[[tuple_column]].shift() ``` #### Problem description Shifting a group that has a column name as tuple-of-tuples gives VisibleDeprecationWarning. > File "C:\Python\lib\site-packages\pandas\core\groupby\groupby.py", line 2562, in shift return self._get_cythonized_result( File "C:\Python\lib\site-packages\pandas\core\groupby\groupby.py", line 2457, in _get_cythonized_result for idx, obj in enumerate(self._iterate_slices()): File "C:\Python\lib\site-packages\pandas\core\groupby\generic.py", line 998, in _iterate_slices obj = self._selected_obj File "pandas\_libs\properties.pyx", line 33, in pandas._libs.properties.CachedProperty.__get__ File "C:\Python\lib\site-packages\pandas\core\groupby\groupby.py", line 641, in _selected_obj return self.obj[self._selection] File "C:\Python\lib\site-packages\pandas\core\frame.py", line 2889, in __getitem__ if com.is_bool_indexer(key): File "C:\Python\lib\site-packages\pandas\core\common.py", line 142, in is_bool_indexer arr = np.asarray(key) File "C:\Python\lib\site-packages\numpy\core\_asarray.py", line 83, in asarray return array(a, dtype, copy=False, order=order) > C:\Python\lib\site-packages\numpy\core\_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray #### Expected Output No VisibleDeprecationWarning triggered. #### Output of ``pd.show_versions()`` <details> commit : 6302f7b98ad24adda2d5a98fef3956f04f28039d python : 3.8.5.final.0 python-bits : 64 OS : Windows OS-release : 10 Version : 10.0.18362 machine : AMD64 processor : Intel64 Family 6 Model 60 Stepping 3, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : English_United Kingdom.1252 pandas : 1.1.0rc0+8.g6302f7b98 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.0 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.5.2 html5lib : None pymysql : None psycopg2 : None jinja2 : None IPython : None pandas_datareader: None bs4 : 4.9.1 bottleneck : None fsspec : None fastparquet : None gcsfs : None matplotlib : 3.3.0rc1+439.g7e9530338 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None numba : 0.50.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/35434/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35434/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35435
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35435/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35435/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35435/events
https://github.com/pandas-dev/pandas/pull/35435
667,013,846
MDExOlB1bGxSZXF1ZXN0NDU3NzYwODYy
35,435
DOC: 1.1.0 release date
{ "avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4", "events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}", "followers_url": "https://api.github.com/users/TomAugspurger/followers", "following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}", "gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TomAugspurger", "id": 1312546, "login": "TomAugspurger", "node_id": "MDQ6VXNlcjEzMTI1NDY=", "organizations_url": "https://api.github.com/users/TomAugspurger/orgs", "received_events_url": "https://api.github.com/users/TomAugspurger/received_events", "repos_url": "https://api.github.com/users/TomAugspurger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions", "type": "User", "url": "https://api.github.com/users/TomAugspurger" }
[]
closed
false
null
[]
{ "closed_at": "2020-07-28T18:13:47Z", "closed_issues": 2378, "created_at": "2019-12-02T12:52:48Z", "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": "2020-08-01T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/68", "id": 4894670, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels", "node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==", "number": 68, "open_issues": 0, "state": "closed", "title": "1.1", "updated_at": "2021-07-17T17:25:28Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68" }
1
2020-07-28T11:56:29Z
2020-07-28T13:11:31Z
2020-07-28T13:11:27Z
CONTRIBUTOR
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/35435/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35435/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35435.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35435", "merged_at": "2020-07-28T13:11:27Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35435.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35435" }
https://api.github.com/repos/pandas-dev/pandas/issues/35436
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35436/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35436/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35436/events
https://github.com/pandas-dev/pandas/issues/35436
667,026,239
MDU6SXNzdWU2NjcwMjYyMzk=
35,436
BUG: pd.read_parquet with pyarrow fails when row number is 0 and contains Pandas extensions type
{ "avatar_url": "https://avatars.githubusercontent.com/u/6838982?v=4", "events_url": "https://api.github.com/users/Holi0317/events{/privacy}", "followers_url": "https://api.github.com/users/Holi0317/followers", "following_url": "https://api.github.com/users/Holi0317/following{/other_user}", "gists_url": "https://api.github.com/users/Holi0317/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Holi0317", "id": 6838982, "login": "Holi0317", "node_id": "MDQ6VXNlcjY4Mzg5ODI=", "organizations_url": "https://api.github.com/users/Holi0317/orgs", "received_events_url": "https://api.github.com/users/Holi0317/received_events", "repos_url": "https://api.github.com/users/Holi0317/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Holi0317/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Holi0317/subscriptions", "type": "User", "url": "https://api.github.com/users/Holi0317" }
[ { "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": "parquet, feather", "id": 685114413, "name": "IO Parquet", "node_id": "MDU6TGFiZWw2ODUxMTQ0MTM=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Parquet" } ]
open
false
{ "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" }
[ { "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" } ]
null
3
2020-07-28T12:16:53Z
2020-09-02T01:22:22Z
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 of pandas. - [x] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample, a copy-pastable example ```python import pandas as pd df = pd.DataFrame([], columns=["s"]).astype({"s": "string"}) df.to_parquet("out.parquet") df2 = pd.read_parquet("out.parquet") # <- Exception thrown here ``` ```python-traceback Traceback (most recent call last): File "<input>", line 1, in <module> df2 = pd.read_parquet("out.parquet") File "/usr/local/lib/python3.8/site-packages/pandas/io/parquet.py", line 312, in read_parquet return impl.read(path, columns=columns, **kwargs) File "/usr/local/lib/python3.8/site-packages/pandas/io/parquet.py", line 126, in read result = self.api.parquet.read_table( File "pyarrow/array.pxi", line 715, in pyarrow.lib._PandasConvertible.to_pandas File "pyarrow/table.pxi", line 1565, in pyarrow.lib.Table._to_pandas File "/usr/local/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 779, in table_to_blockmanager blocks = _table_to_blocks(options, table, categories, ext_columns_dtypes) File "/usr/local/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 1116, in _table_to_blocks return [_reconstruct_block(item, columns, extension_columns) File "/usr/local/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 1116, in <listcomp> return [_reconstruct_block(item, columns, extension_columns) File "/usr/local/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 738, in _reconstruct_block pd_ext_arr = pandas_dtype.__from_arrow__(arr) File "/usr/local/lib/python3.8/site-packages/pandas/core/arrays/string_.py", line 83, in __from_arrow__ return StringArray._concat_same_type(results) File "/usr/local/lib/python3.8/site-packages/pandas/core/arrays/numpy_.py", line 171, in _concat_same_type return cls(np.concatenate(to_concat)) File "<__array_function__ internals>", line 5, in concatenate ValueError: need at least one array to concatenate ``` #### Problem description All of the code is produced with pyarrow. fastparquet is not affected by this bug as it does not support pandas extension type (See: https://github.com/dask/fastparquet/issues/465). This problem only occurs when the row number is 0 and contains pandas extension type (`Int64`, `string`, etc). It does not happen when there is 1 row. Even if the row contains `pd.NA`. For example, following code works: ```python import pandas as pd df = pd.DataFrame([{"s": pd.NA}], columns=["s"]).astype({"s": "Int64"}) df.to_parquet("out.parquet") pd.read_parquet("out.parquet") ``` The above code will restore the DataFrame correctly. The problem does not occur when the column type is normal type. For example, following code works when the `dtype` is `int64` ```python import pandas as pd df = pd.DataFrame([], columns=["s"]).astype({"s": "int"}) df.to_parquet("out.parquet") pd.read_parquet("out.parquet") ``` When using the pyarrow library to read the parse the output parquet, `.read_table` would fail when converting to pandas DataFrame with similar errors from `pd.read_parquet`. This only occurs on stable. Correct result is produced on environment 1 and environment 2 (See bottom for environment descriptions) ```python import pandas as pd import pyarrow.parquet as pq df = pd.DataFrame([], columns=["s"]).astype({"s": "int"}) df.to_parquet("out.parquet") table = pq.read_table("out.parquet") table.to_pandas() # Exception here on stable. Correct result on env 1 and 2 ``` ```python-traceback Traceback (most recent call last): File "<input>", line 1, in <module> table.to_pandas() File "pyarrow/array.pxi", line 715, in pyarrow.lib._PandasConvertible.to_pandas File "pyarrow/table.pxi", line 1565, in pyarrow.lib.Table._to_pandas File "/usr/local/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 779, in table_to_blockmanager blocks = _table_to_blocks(options, table, categories, ext_columns_dtypes) File "/usr/local/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 1116, in _table_to_blocks return [_reconstruct_block(item, columns, extension_columns) File "/usr/local/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 1116, in <listcomp> return [_reconstruct_block(item, columns, extension_columns) File "/usr/local/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 738, in _reconstruct_block pd_ext_arr = pandas_dtype.__from_arrow__(arr) File "/usr/local/lib/python3.8/site-packages/pandas/core/arrays/integer.py", line 113, in __from_arrow__ return IntegerArray._concat_same_type(results) File "/usr/local/lib/python3.8/site-packages/pandas/core/arrays/masked.py", line 175, in _concat_same_type data = np.concatenate([x._data for x in to_concat]) File "<__array_function__ internals>", line 5, in concatenate ValueError: need at least one array to concatenate ``` However, reading the dataframe with `.read_pandas` would succeed with expected result in all environments. ```python import pandas as pd import pyarrow.parquet as pq df = pd.DataFrame([], columns=["s"]).astype({"s": "int"}) df.to_parquet("out.parquet") table = pq.read_pandas("out.parquet") df2 = table.to_pandas() # No exception here df.equals(df2) # Retruns True ``` The produced DataFrame is as expected with correct column type. This could be used as a workround for now. #### Expected Output The parquet should be read successfuly. #### Output of ``pd.show_versions()`` (The code is run under docker image `python:3.8-slim`) ##### Stable environment All packages installed from pip directly <details> INSTALLED VERSIONS ------------------ commit : None python : 3.8.5.final.0 python-bits : 64 OS : Linux OS-release : 5.7.9-arch1-1 machine : x86_64 processor : byteorder : little LC_ALL : None LANG : C.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.0.5 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.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 fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : 1.0.0 pytables : None pytest : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : None numba : None </details> ##### Environment 1 Pandas and numpy compiled from source. pyarrow from their [nightly channel](https://arrow.apache.org/docs/python/install.html#installing-nightly-packages) <details> INSTALLED VERSIONS ------------------ commit : 6302f7b98ad24adda2d5a98fef3956f04f28039d python : 3.8.5.final.0 python-bits : 64 OS : Linux OS-release : 5.7.9-arch1-1 Version : #1 SMP PREEMPT Thu, 16 Jul 2020 19:34:49 +0000 machine : x86_64 processor : byteorder : little LC_ALL : None LANG : C.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.1.0rc0+8.g6302f7b numpy : 1.20.0.dev0+4690248 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.0 Cython : 0.29.21 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 : 1.1.0.dev19 pytables : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None numba : None </details> ##### Environment 2 Pandas and numpy installed from pip. pyarrow from their [nightly channel](https://arrow.apache.org/docs/python/install.html#installing-nightly-packages) <details> INSTALLED VERSIONS ------------------ commit : None python : 3.8.5.final.0 python-bits : 64 OS : Linux OS-release : 5.7.9-arch1-1 machine : x86_64 processor : byteorder : little LC_ALL : None LANG : C.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.0.5 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.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 fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : 1.1.0.dev19 pytables : None pytest : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : None numba : None </details>
{ "+1": 4, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 4, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/35436/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35436/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35437
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35437/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35437/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35437/events
https://github.com/pandas-dev/pandas/pull/35437
667,139,532
MDExOlB1bGxSZXF1ZXN0NDU3ODY0MzAy
35,437
BUG: tuple-of-tuples indexing results in NumPy VisibleDeprecationWarning
{ "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": "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": "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": "f2f989", "default": false, "description": "Data where the values are collections (lists, sets, dicts, objects, etc.).", "id": 2189479765, "name": "Nested Data", "node_id": "MDU6TGFiZWwyMTg5NDc5NzY1", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Nested%20Data" } ]
closed
false
null
[]
null
2
2020-07-28T14:53:24Z
2020-07-29T19:35:07Z
2020-07-29T19:35:06Z
MEMBER
null
- [ ] closes #35434 - [ ] tests added / passed - [ ] passes `black pandas` - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] 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/35437/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35437/timeline
null
1
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35437.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35437", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35437.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35437" }
https://api.github.com/repos/pandas-dev/pandas/issues/35438
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35438/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35438/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35438/events
https://github.com/pandas-dev/pandas/issues/35438
667,330,187
MDU6SXNzdWU2NjczMzAxODc=
35,438
DOC: Can't find mention of DataFrame accepting namedtuples as input
{ "avatar_url": "https://avatars.githubusercontent.com/u/8833517?v=4", "events_url": "https://api.github.com/users/sjvrijn/events{/privacy}", "followers_url": "https://api.github.com/users/sjvrijn/followers", "following_url": "https://api.github.com/users/sjvrijn/following{/other_user}", "gists_url": "https://api.github.com/users/sjvrijn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sjvrijn", "id": 8833517, "login": "sjvrijn", "node_id": "MDQ6VXNlcjg4MzM1MTc=", "organizations_url": "https://api.github.com/users/sjvrijn/orgs", "received_events_url": "https://api.github.com/users/sjvrijn/received_events", "repos_url": "https://api.github.com/users/sjvrijn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sjvrijn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sjvrijn/subscriptions", "type": "User", "url": "https://api.github.com/users/sjvrijn" }
[ { "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": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
1
2020-07-28T19:54:08Z
2020-08-05T02:27:23Z
2020-08-05T02:27:23Z
CONTRIBUTOR
null
#### Location of the documentation User guide ['Intro to data structures'](https://pandas.pydata.org/docs/dev/user_guide/dsintro.html#dataframe) (alternatively [`DataFrame` API docs](https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.html?highlight=dataframe#pandas.DataFrame)) #### Documentation problem I recently only found out through a [StackOverflow answer](https://stackoverflow.com/a/51173794/) that the `DataFrame` constructor can take a list of namedtuples and automatically infers column names from it. Until then I had only found the [`DataFrame.from_records`](https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.from_records.html#pandas.DataFrame.from_records) constructor, which manually requires specifying `columns=Namedtuple._fields`. After searching the documentation for [namedtuple](https://pandas.pydata.org/docs/dev/search.html?q=namedtuple), I haven't been able to find an explicit mention of constructors accepting namedtuples, while there is apparently explicit code in the constructor to deal with them nicely. Currently it only finds mentions where internal functions return rows as namedtuples. In contrast, searching for e.g. ['dataclass'](https://pandas.pydata.org/docs/dev/search.html?q=dataclass) finds [an explicit paragraph](https://pandas.pydata.org/docs/dev/user_guide/dsintro.html?highlight=dataclass#from-a-list-of-dataclasses) listing the option. #### Suggested fix for documentation I would propose adding an explicit mention and/or example somewhere that these kinds of inputs are accepted/encouraged, such that they can be easily found when searching for the 'namedtuple' keyword. I can write a similar paragraph as for dataclasses in the intro to data structures, if that is indeed the right place for this.
{ "+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/35438/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35438/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35439
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35439/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35439/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35439/events
https://github.com/pandas-dev/pandas/issues/35439
667,401,325
MDU6SXNzdWU2Njc0MDEzMjU=
35,439
BUG: output of df.to_string depends on whether columns is a CategoricalIndex or not
{ "avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4", "events_url": "https://api.github.com/users/topper-123/events{/privacy}", "followers_url": "https://api.github.com/users/topper-123/followers", "following_url": "https://api.github.com/users/topper-123/following{/other_user}", "gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/topper-123", "id": 26364415, "login": "topper-123", "node_id": "MDQ6VXNlcjI2MzY0NDE1", "organizations_url": "https://api.github.com/users/topper-123/orgs", "received_events_url": "https://api.github.com/users/topper-123/received_events", "repos_url": "https://api.github.com/users/topper-123/repos", "site_admin": false, "starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/topper-123/subscriptions", "type": "User", "url": "https://api.github.com/users/topper-123" }
[ { "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": "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" }, { "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": "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
2
2020-07-28T21:44:34Z
2020-08-03T23:48:55Z
2020-08-03T23:48:55Z
CONTRIBUTOR
null
The output of ``df.to_string`` is different if the columns is a ``CategoricalIndex`` rather than a normal ``Index``: ```python >>> data = [[4, 2], [3, 2], [4, 3]] >>> cols = ["aaaaaaaaa", "b"] >>> pd.DataFrame(data, columns=cols) aaaaaaaaa b 0 4 2 1 3 2 2 4 3 >>> pd.DataFrame(data, columns=pd.CategoricalIndex(cols)) aaaaaaaaa b 0 4 2 1 3 2 2 4 3 ``` We can see that the width of the "b" column depends on the width of the "a" column, if the columns are a ``CategoricalIndex``. These two examples should return the same repr.
{ "+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/35439/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35439/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35440
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35440/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35440/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35440/events
https://github.com/pandas-dev/pandas/pull/35440
667,422,468
MDExOlB1bGxSZXF1ZXN0NDU4MDkxNzc3
35,440
BUG: CategoricalIndex.format
{ "avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4", "events_url": "https://api.github.com/users/topper-123/events{/privacy}", "followers_url": "https://api.github.com/users/topper-123/followers", "following_url": "https://api.github.com/users/topper-123/following{/other_user}", "gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/topper-123", "id": 26364415, "login": "topper-123", "node_id": "MDQ6VXNlcjI2MzY0NDE1", "organizations_url": "https://api.github.com/users/topper-123/orgs", "received_events_url": "https://api.github.com/users/topper-123/received_events", "repos_url": "https://api.github.com/users/topper-123/repos", "site_admin": false, "starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/topper-123/subscriptions", "type": "User", "url": "https://api.github.com/users/topper-123" }
[ { "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" }, { "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
4
2020-07-28T22:28:20Z
2020-08-04T09:55:01Z
2020-08-03T23:48:55Z
CONTRIBUTOR
null
- [x] closes #35439 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry I've temporarily put the whatsnewentry in the v.1.1.0 release note, because there isn't a v.1.1.1 version yet. I'll move it, before this is merged.
{ "+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/35440/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35440/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35440.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35440", "merged_at": "2020-08-03T23:48:55Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35440.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35440" }
https://api.github.com/repos/pandas-dev/pandas/issues/35441
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35441/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35441/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35441/events
https://github.com/pandas-dev/pandas/pull/35441
667,435,081
MDExOlB1bGxSZXF1ZXN0NDU4MTAyMTMw
35,441
BUG: GroupBy.apply() throws erroneous ValueError with duplicate axes
{ "avatar_url": "https://avatars.githubusercontent.com/u/3813175?v=4", "events_url": "https://api.github.com/users/smithto1/events{/privacy}", "followers_url": "https://api.github.com/users/smithto1/followers", "following_url": "https://api.github.com/users/smithto1/following{/other_user}", "gists_url": "https://api.github.com/users/smithto1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/smithto1", "id": 3813175, "login": "smithto1", "node_id": "MDQ6VXNlcjM4MTMxNzU=", "organizations_url": "https://api.github.com/users/smithto1/orgs", "received_events_url": "https://api.github.com/users/smithto1/received_events", "repos_url": "https://api.github.com/users/smithto1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/smithto1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/smithto1/subscriptions", "type": "User", "url": "https://api.github.com/users/smithto1" }
[ { "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": "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" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
3
2020-07-28T23:02:37Z
2020-08-07T23:29:39Z
2020-08-06T23:29:22Z
MEMBER
null
- [x] closes #16646 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry *Behavioural Change* `GroupBy.apply` would sometimes throw an erroneous `ValueError: cannot reindex from duplicate axis` because when it checked if the output was mutated from its original shape it would only check the index, when sometimes it should check the columns. *Tests* One new test added on `test_apply.py` which fails on master because of the bug; passes with this PR. One existing test was marked *xfail* but the *xfail* is now removed. One existing test previously had to manipulate the expected index, but that is no longer necessary. All of the copy-pasteable examples from #16646 are fixed with this 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/35441/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35441/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35441.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35441", "merged_at": "2020-08-06T23:29:22Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35441.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35441" }
https://api.github.com/repos/pandas-dev/pandas/issues/35442
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35442/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35442/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35442/events
https://github.com/pandas-dev/pandas/issues/35442
667,462,327
MDU6SXNzdWU2Njc0NjIzMjc=
35,442
BUG: 'something' in pd.Series does not return the True when the object is contained.
{ "avatar_url": "https://avatars.githubusercontent.com/u/3391614?v=4", "events_url": "https://api.github.com/users/sorenwacker/events{/privacy}", "followers_url": "https://api.github.com/users/sorenwacker/followers", "following_url": "https://api.github.com/users/sorenwacker/following{/other_user}", "gists_url": "https://api.github.com/users/sorenwacker/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sorenwacker", "id": 3391614, "login": "sorenwacker", "node_id": "MDQ6VXNlcjMzOTE2MTQ=", "organizations_url": "https://api.github.com/users/sorenwacker/orgs", "received_events_url": "https://api.github.com/users/sorenwacker/received_events", "repos_url": "https://api.github.com/users/sorenwacker/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sorenwacker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sorenwacker/subscriptions", "type": "User", "url": "https://api.github.com/users/sorenwacker" }
[ { "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
1
2020-07-29T00:25:27Z
2020-07-29T00:33:01Z
2020-07-29T00:32:47Z
CONTRIBUTOR
null
```python import pandas as pd df = pd.DataFrame(['Test', '123']) 'test' in df[0] > False ``` I am not sure if this made on purpose, but I think this should return True. False seems a bit strange. Is there a good reason for this?
{ "+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/35442/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35442/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35443
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35443/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35443/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35443/events
https://github.com/pandas-dev/pandas/issues/35443
667,468,514
MDU6SXNzdWU2Njc0Njg1MTQ=
35,443
BUG: Attributes of DataFrameGroupBy when subset to a series
{ "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": "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": "b60205", "default": false, "description": "Internal Consistency of API/Behavior", "id": 1741841389, "name": "API - Consistency", "node_id": "MDU6TGFiZWwxNzQxODQxMzg5", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency" } ]
open
false
null
[]
null
2
2020-07-29T00:46:28Z
2021-08-08T19:14:55Z
null
MEMBER
null
xref #9959 When subsetting the columns of a dataframe after a groupby to a series: df = pd.DataFrame({'a': [1], 'b': [2], 'c': [3]}).set_index('a') g = df.groupby('a')['b'] the public-facing groupby arguments `axis` and `as_index` are not passed on to the resulting `SeriesGroupBy`. I think the following two examples should probably behave the same: g = df.groupby('a', as_index=False)['b'] g2 = df['b'].groupby('a', as_index=False) but the first produces ```` b 0 2 ```` And the 2nd deliberately raises `TypeError: as_index=False only valid with DataFrame`. Note that the arguments `axis` and `as_index` are only meant for DataFrames, and as such, I think a line such as g = df.groupby('a', as_index=False)['b'] should raise.
{ "+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/35443/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35443/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35444
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35444/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35444/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35444/events
https://github.com/pandas-dev/pandas/pull/35444
667,468,615
MDExOlB1bGxSZXF1ZXN0NDU4MTMwMDQw
35,444
BUG: Attributes are lost when subsetting columns in groupby
{ "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": "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" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
15
2020-07-29T00:46:49Z
2020-08-31T22:37:50Z
2020-08-31T22:31:08Z
MEMBER
null
- [x] closes #9959 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry Avoiding the behavior of Series here, e.g. `df.groupby('a')['b']` as I think that will involve some API changes. Will follow up: ref #35443
{ "+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/35444/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35444/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35444.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35444", "merged_at": "2020-08-31T22:31:07Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35444.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35444" }
https://api.github.com/repos/pandas-dev/pandas/issues/35445
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35445/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35445/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35445/events
https://github.com/pandas-dev/pandas/pull/35445
667,543,537
MDExOlB1bGxSZXF1ZXN0NDU4MTg5MDYy
35,445
WIP: ENH: Add numba engine to groupby apply
{ "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" }
[]
closed
false
null
[]
null
1
2020-07-29T04:42:05Z
2020-11-12T05:15:20Z
2020-08-16T07:05:30Z
MEMBER
null
- [x] closes #31845 - [ ] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry Some notes: - The passed function must be a reduction op - The numba engine will drop the grouping column by default - Can only operate on numeric data and will return float64 Preliminary default timing: ``` (pandas-dev) matthewroeschke:pandas-mroeschke matthewroeschke$ ipython Python 3.8.3 | packaged by conda-forge | (default, Jun 1 2020, 17:21:09) Type 'copyright', 'credits' or 'license' for more information IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help. In [1]: df_g = pd.DataFrame({'a': range(10**4), 'b': range(10**4), 'c': range(10**4)}) In [2]: def f(x): ...: return np.sum(x) + 1 ...: In [3]: df_g.groupby('a').apply(f) Out[3]: a b c a 0 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 ... ... ... ... 9995 9996 9996 9996 9996 9997 9997 9997 9997 9998 9998 9998 9998 9999 9999 9999 9999 10000 10000 10000 [10000 rows x 3 columns] In [4]: %timeit df_g.groupby('a').apply(f) 3.07 s ± 57.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) In [5]: df_g.groupby('a').apply(f, engine='numba', engine_kwargs={'parallel': True}) Out[5]: 0 1 0 1.0 1.0 1 2.0 2.0 2 3.0 3.0 3 4.0 4.0 4 5.0 5.0 ... ... ... 9995 9996.0 9996.0 9996 9997.0 9997.0 9997 9998.0 9998.0 9998 9999.0 9999.0 9999 10000.0 10000.0 [10000 rows x 2 columns] In [6]: %timeit df_g.groupby('a').apply(f, engine='numba', engine_kwargs={'parallel': True}) 510 ms ± 3.46 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) ```
{ "+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/35445/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35445/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35445.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35445", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35445.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35445" }
https://api.github.com/repos/pandas-dev/pandas/issues/35446
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35446/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35446/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35446/events
https://github.com/pandas-dev/pandas/issues/35446
667,576,892
MDU6SXNzdWU2Njc1NzY4OTI=
35,446
BUG: pd.testing.assert_frame_equal(..., check_exact=True) raises assertion error if any columns are not numeric
{ "avatar_url": "https://avatars.githubusercontent.com/u/8238804?v=4", "events_url": "https://api.github.com/users/ivirshup/events{/privacy}", "followers_url": "https://api.github.com/users/ivirshup/followers", "following_url": "https://api.github.com/users/ivirshup/following{/other_user}", "gists_url": "https://api.github.com/users/ivirshup/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ivirshup", "id": 8238804, "login": "ivirshup", "node_id": "MDQ6VXNlcjgyMzg4MDQ=", "organizations_url": "https://api.github.com/users/ivirshup/orgs", "received_events_url": "https://api.github.com/users/ivirshup/received_events", "repos_url": "https://api.github.com/users/ivirshup/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ivirshup/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ivirshup/subscriptions", "type": "User", "url": "https://api.github.com/users/ivirshup" }
[ { "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": "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": "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" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
6
2020-07-29T06:08:13Z
2020-08-10T13:30:13Z
2020-08-10T13:30: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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python import pandas as pd a = pd.DataFrame({"a": list("bc"), "b": [1, 2]}) pd.testing.assert_frame_equal(a, a.copy(), check_exact=True) ``` ```pytb ...: a = pd.DataFrame({"a": list("bc"), "b": [1, 2]}) ...: pd.testing.assert_frame_equal(a, a.copy(), check_exact=True) --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-2-bac78c400991> in <module> 1 import pandas as pd 2 a = pd.DataFrame({"a": list("bc"), "b": [1, 2]}) ----> 3 pd.testing.assert_frame_equal(a, a.copy(), check_exact=True) [... skipping hidden 2 frame] AssertionError: check_exact may only be used with numeric Series ``` #### Problem description Previously, the example above would not have thrown an error. It makes it a less useful function if I have to start subdividing dataframes by types just to check that they are equal. Presumably check_exact should either have no effect if called on a non-numeric `Series` or `assert_frame_equal` should not pass `check_exact=True` if the series to be compared isn't numeric. It looks like this was introduced recently, in https://github.com/pandas-dev/pandas/commit/08c65973643b73e877133d1a7391de7092f4b267 #### Expected Output I expected it to work like it did previously, and not throw an error. [Here's an example of test failures this is causing](https://travis-ci.org/github/theislab/anndata/jobs/712782637). #### Output of ``pd.show_versions()`` <details> ``` INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.8.5.final.0 python-bits : 64 OS : Darwin OS-release : 19.5.0 Version : Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/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.1.0 numpy : 1.19.0 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.0 Cython : None pytest : 5.4.3 hypothesis : None sphinx : 3.1.2 blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.11.2 IPython : 7.16.1 pandas_datareader: None bs4 : None bottleneck : None fsspec : 0.7.4 fastparquet : None gcsfs : None matplotlib : 3.3.0 numexpr : 2.7.1 odfpy : None openpyxl : None pandas_gbq : None pyarrow : 0.17.1 pytables : None pyxlsb : None s3fs : None scipy : 1.5.1 sqlalchemy : 1.3.18 tables : 3.6.1 tabulate : None xarray : 0.16.0 xlrd : 1.2.0 xlwt : None numba : 0.50.1 ``` </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/35446/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35446/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35447
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35447/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35447/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35447/events
https://github.com/pandas-dev/pandas/pull/35447
667,655,555
MDExOlB1bGxSZXF1ZXN0NDU4MjgwOTc1
35,447
Updated chunksize docstring for DataFrame.to_csv()
{ "avatar_url": "https://avatars.githubusercontent.com/u/5393746?v=4", "events_url": "https://api.github.com/users/Mandera/events{/privacy}", "followers_url": "https://api.github.com/users/Mandera/followers", "following_url": "https://api.github.com/users/Mandera/following{/other_user}", "gists_url": "https://api.github.com/users/Mandera/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Mandera", "id": 5393746, "login": "Mandera", "node_id": "MDQ6VXNlcjUzOTM3NDY=", "organizations_url": "https://api.github.com/users/Mandera/orgs", "received_events_url": "https://api.github.com/users/Mandera/received_events", "repos_url": "https://api.github.com/users/Mandera/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Mandera/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Mandera/subscriptions", "type": "User", "url": "https://api.github.com/users/Mandera" }
[ { "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
[]
null
0
2020-07-29T08:31:46Z
2020-08-08T11:37:08Z
2020-08-08T11:37:08Z
NONE
null
Added the documentation for what happens if chunksize is left as None. Is there a good way to make this DRY somehow?
{ "+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/35447/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35447/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35447.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35447", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35447.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35447" }
https://api.github.com/repos/pandas-dev/pandas/issues/35448
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35448/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35448/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35448/events
https://github.com/pandas-dev/pandas/issues/35448
667,658,200
MDU6SXNzdWU2Njc2NTgyMDA=
35,448
BUG: unique() casts type `pd.Timestamp` to `numpy.datetime64`
{ "avatar_url": "https://avatars.githubusercontent.com/u/67270366?v=4", "events_url": "https://api.github.com/users/SebastianoX/events{/privacy}", "followers_url": "https://api.github.com/users/SebastianoX/followers", "following_url": "https://api.github.com/users/SebastianoX/following{/other_user}", "gists_url": "https://api.github.com/users/SebastianoX/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/SebastianoX", "id": 67270366, "login": "SebastianoX", "node_id": "MDQ6VXNlcjY3MjcwMzY2", "organizations_url": "https://api.github.com/users/SebastianoX/orgs", "received_events_url": "https://api.github.com/users/SebastianoX/received_events", "repos_url": "https://api.github.com/users/SebastianoX/repos", "site_admin": false, "starred_url": "https://api.github.com/users/SebastianoX/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SebastianoX/subscriptions", "type": "User", "url": "https://api.github.com/users/SebastianoX" }
[ { "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": "AD7FA8", "default": false, "description": null, "id": 35818298, "name": "API Design", "node_id": "MDU6TGFiZWwzNTgxODI5OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design" }, { "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" } ]
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" }
10
2020-07-29T08:35:47Z
2020-07-29T09:40:33Z
2020-07-29T09:04:28Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample: ```python import pandas as pd df = pd.DataFrame({"date": ["2019-02-10", "2019-02-10", "2019-02-11"]}) df["date"] = pd.to_datetime(df["date"]) print("Type before the for cycle:") print(type(df["date"][0])) # pandas._libs.tslibs.timestamps.Timestamp for day in df["date"].unique(): print("Type in the loop:") print(type(day)) # here is a numpy.datetime64 ``` which returns: ``` Type before the for cycle: <class 'pandas._libs.tslibs.timestamps.Timestamp'> Type in the loop: <class 'numpy.datetime64'> Type in the loop: <class 'numpy.datetime64'> ``` #### Problem description The function `unique()` should not cast the data type. #### Expected Output types of `df_target["date"].unique()` should be the same as in ` set(df_target["date"].to_list())`. E.g. ```python import pandas as pd df = pd.DataFrame({"date": ["2019-02-10", "2019-02-10", "2019-02-11"]}) df["date"] = pd.to_datetime(df["date"]) print("Type before the for cycle:") print(type(df["date"][0])) for day in set(df["date"].to_list()): print("Type in the loop:") print(type(day)) ``` Returning: ``` Type before the for cycle: <class 'pandas._libs.tslibs.timestamps.Timestamp'> Type in the loop: <class 'pandas._libs.tslibs.timestamps.Timestamp'> Type in the loop: <class 'pandas._libs.tslibs.timestamps.Timestamp'> ``` #### Output of ``pd.show_versions()`` ``` INSTALLED VERSIONS ------------------ commit : None python : 3.7.7.final.0 python-bits : 64 OS : Darwin OS-release : 19.5.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_GB.UTF-8 LOCALE : en_GB.UTF-8 pandas : 1.0.5 numpy : 1.19.0 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 47.3.1 Cython : None pytest : 5.4.1 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.11.2 IPython : 7.16.1 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.2.2 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pytest : 5.4.1 pyxlsb : None s3fs : None scipy : 1.5.2 sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/35448/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35448/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35449
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35449/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35449/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35449/events
https://github.com/pandas-dev/pandas/issues/35449
667,700,671
MDU6SXNzdWU2Njc3MDA2NzE=
35,449
BUG: unique() casts its types' elements from `pd.Timestamp` to `numpy.datetime64`
{ "avatar_url": "https://avatars.githubusercontent.com/u/67270366?v=4", "events_url": "https://api.github.com/users/SebastianoX/events{/privacy}", "followers_url": "https://api.github.com/users/SebastianoX/followers", "following_url": "https://api.github.com/users/SebastianoX/following{/other_user}", "gists_url": "https://api.github.com/users/SebastianoX/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/SebastianoX", "id": 67270366, "login": "SebastianoX", "node_id": "MDQ6VXNlcjY3MjcwMzY2", "organizations_url": "https://api.github.com/users/SebastianoX/orgs", "received_events_url": "https://api.github.com/users/SebastianoX/received_events", "repos_url": "https://api.github.com/users/SebastianoX/repos", "site_admin": false, "starred_url": "https://api.github.com/users/SebastianoX/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SebastianoX/subscriptions", "type": "User", "url": "https://api.github.com/users/SebastianoX" }
[ { "color": "e10c02", "default": false, "description": null, "id": 76811, "name": "Bug", "node_id": "MDU6TGFiZWw3NjgxMQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug" } ]
closed
false
null
[]
null
3
2020-07-29T09:39:11Z
2021-08-08T19:27:32Z
2021-08-08T19:27:31Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample ```python import pandas as pd df = pd.DataFrame({"date": ["2019-02-10", "2019-02-11"]}) df["date"] = pd.to_datetime(df["date"]) print("Date Types in column date:") for day in df["date"]: print(type(day)) # pandas._libs.tslibs.timestamps.Timestamp print("Unique date Types in column date:") for day in df["date"].unique(): print(type(day)) # np.datetime64 ``` The code above results in: ``` Date Types in column date: <class 'pandas._libs.tslibs.timestamps.Timestamp'> <class 'pandas._libs.tslibs.timestamps.Timestamp'> Unique date Types in column date: <class 'numpy.datetime64'> <class 'numpy.datetime64'> ``` #### Problem description The class method `unique()` should not change the type of the elements in the original column. #### Expected Output ``` Date Types in column date: <class 'pandas._libs.tslibs.timestamps.Timestamp'> <class 'pandas._libs.tslibs.timestamps.Timestamp'> Unique date Types in column date: <class 'pandas._libs.tslibs.timestamps.Timestamp'> <class 'pandas._libs.tslibs.timestamps.Timestamp'> ``` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.7.final.0 python-bits : 64 OS : Darwin OS-release : 19.5.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_GB.UTF-8 LOCALE : en_GB.UTF-8 pandas : 1.0.5 numpy : 1.19.0 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 47.3.1 Cython : None pytest : 5.4.1 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.11.2 IPython : 7.16.1 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.2.2 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pytest : 5.4.1 pyxlsb : None s3fs : None scipy : 1.5.2 sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : None numba : None </details> #### Note Issue related to #35448, where in the thread I have been asked to re-create it with a clearer OP.
{ "+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/35449/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35449/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35450
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35450/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35450/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35450/events
https://github.com/pandas-dev/pandas/issues/35450
667,753,795
MDU6SXNzdWU2Njc3NTM3OTU=
35,450
BUG: dataframe.any() method behaves differently for empty rows and columns
{ "avatar_url": "https://avatars.githubusercontent.com/u/60076143?v=4", "events_url": "https://api.github.com/users/simplyrucha/events{/privacy}", "followers_url": "https://api.github.com/users/simplyrucha/followers", "following_url": "https://api.github.com/users/simplyrucha/following{/other_user}", "gists_url": "https://api.github.com/users/simplyrucha/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/simplyrucha", "id": 60076143, "login": "simplyrucha", "node_id": "MDQ6VXNlcjYwMDc2MTQz", "organizations_url": "https://api.github.com/users/simplyrucha/orgs", "received_events_url": "https://api.github.com/users/simplyrucha/received_events", "repos_url": "https://api.github.com/users/simplyrucha/repos", "site_admin": false, "starred_url": "https://api.github.com/users/simplyrucha/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/simplyrucha/subscriptions", "type": "User", "url": "https://api.github.com/users/simplyrucha" }
[ { "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": "006b75", "default": false, "description": "Arithmetic, Comparison, and Logical operations", "id": 47223669, "name": "Numeric Operations", "node_id": "MDU6TGFiZWw0NzIyMzY2OQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Numeric%20Operations" }, { "color": "b60205", "default": false, "description": "Internal Consistency of API/Behavior", "id": 1741841389, "name": "API - Consistency", "node_id": "MDU6TGFiZWwxNzQxODQxMzg5", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency" }, { "color": "547c03", "default": false, "description": "sum, mean, min, max, etc.", "id": 2365504383, "name": "Reduction Operations", "node_id": "MDU6TGFiZWwyMzY1NTA0Mzgz", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reduction%20Operations" } ]
closed
false
null
[]
{ "closed_at": "2021-07-02T07:59:17Z", "closed_issues": 2396, "created_at": "2020-11-11T19:05:43Z", "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": "on-merge: backport to 1.3.x", "due_on": "2021-06-30T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/80", "id": 6095818, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80/labels", "node_id": "MDk6TWlsZXN0b25lNjA5NTgxOA==", "number": 80, "open_issues": 1, "state": "closed", "title": "1.3", "updated_at": "2021-08-25T20:34:06Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/80" }
8
2020-07-29T11:01:47Z
2021-05-06T10:13:34Z
2021-05-06T01:35:18Z
NONE
null
- [ ] I have checked that this issue has not already been reported. - [ ] I have confirmed this bug exists on the latest version of pandas. - [x] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python import pandas as pd import numpy as np df1 = pd.DataFrame(data = {"A" : [np.nan, 1], "B": [np.nan, 2], "C": [np.nan, np.nan]}) df2 = pd.DataFrame(data = [[np.nan, 1], [np.nan, 2], [np.nan, np.nan]], columns = ["A", "B"]) # dataframe created with mixed values of bool and numeric with shape - 4,4 df3 = pd.DataFrame(data = [[1, np.nan, np.nan, True], [np.nan, 2, np.nan, True], [np.nan, np.nan, np.nan, False], [np.nan, np.nan, np.nan, np.nan]], columns = ["col1", "col2", "col3", "col4"]) ``` #### Problem description The [documentation](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.any.html) for any() method states that for empty row/column, **np.nan is treated as True**. So if the parameter "skipna = False", then the empty row should result in True for either, axis = 0/ index or 1/columns. The dataframe.any(skipna = False, axis = {1 or 0}) method works as documented for df1 and df2. However, it behaves differently for df3. (Similar output is obtained for df1 as well hence not included here) The obtained output for df2 is like this: ``` # df2.any(axis = 1, skipna = False) # df2.any(axis = "columns", skipna = False) 0 True 1 True 2 True dtype: bool # df2.any(axis = 0, skipna = False) # df2.any(axis = "index", skipna = False) A True B True dtype: bool ``` The obtained output for df3 is like this: ``` # df3.any(axis = 1, skipna = False) # df3.any(axis = "columns", skipna = False) 0 1 1 NaN 2 NaN 3 NaN dtype: object # df3.any(axis = 0, skipna = False) # df3.any(axis = "index", skipna = False) col1 1 col2 NaN col3 NaN col4 True dtype: object ``` #### Expected Output ``` # The expected output for df3 should be, similar to df2's output, and like this: # df3.any(axis = 1, skipna = False) # df3.any(axis = "columns", skipna = False) 0 True 1 True 2 True 3 True dtype: object # df3.any(axis = 0, skipna = False) # df3.any(axis = "index", skipna = False) Col1 True Col2 True Col3 True Col4 True dtype: object ``` #### Output of ``pd.show_versions()`` <details> [INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 142 Stepping 9, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 1.0.4 numpy : 1.16.5 pytz : 2019.3 dateutil : 2.8.0 pip : 19.2.3 setuptools : 41.4.0 Cython : 0.29.13 pytest : 5.2.1 hypothesis : None sphinx : 2.2.0 blosc : None feather : None xlsxwriter : 1.2.1 lxml.etree : 4.4.1 html5lib : 1.0.1 pymysql : None psycopg2 : 2.8.4 (dt dec pq3 ext lo64) jinja2 : 2.11.2 IPython : 7.8.0 pandas_datareader: None bs4 : 4.8.0 bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : 4.4.1 matplotlib : 3.2.1 numexpr : 2.7.0 odfpy : None openpyxl : 3.0.0 pandas_gbq : None pyarrow : None pytables : None pytest : 5.2.1 pyxlsb : None s3fs : None scipy : 1.4.1 sqlalchemy : 1.3.9 tables : 3.5.2 tabulate : None xarray : None xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : 1.2.1 numba : 0.45.1] </details> I am not sure where exactly I am going wrong with df3. I also thought of appending this issue with the open issue related to "bool_only" parameter [here](https://github.com/pandas-dev/pandas/issues/32432). But then before reporting this confusion/error I tried the dataframe.any()method on df1 and df2, without using parameter "bool_only" and it gives the correct result. However, it again behaves very differently for df3. Since I might have already crossed, the threshold of a minimal bug report, my experiments with the bool_only parameter are in the attached "Any_Experiments.ipynb" file. [Any_Experiments.zip](https://github.com/pandas-dev/pandas/files/4994395/Any_Experiments.zip) This is my first issue/ bug/ query to Pandas. Apologies for typos and/or any violations of reporting guidelines.
{ "+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/35450/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35450/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35451
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35451/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35451/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35451/events
https://github.com/pandas-dev/pandas/pull/35451
667,761,552
MDExOlB1bGxSZXF1ZXN0NDU4MzY5MDgw
35,451
WEB: Fixing whatsnew link in the home page (version was hardcoded)
{ "avatar_url": "https://avatars.githubusercontent.com/u/10058240?v=4", "events_url": "https://api.github.com/users/datapythonista/events{/privacy}", "followers_url": "https://api.github.com/users/datapythonista/followers", "following_url": "https://api.github.com/users/datapythonista/following{/other_user}", "gists_url": "https://api.github.com/users/datapythonista/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/datapythonista", "id": 10058240, "login": "datapythonista", "node_id": "MDQ6VXNlcjEwMDU4MjQw", "organizations_url": "https://api.github.com/users/datapythonista/orgs", "received_events_url": "https://api.github.com/users/datapythonista/received_events", "repos_url": "https://api.github.com/users/datapythonista/repos", "site_admin": false, "starred_url": "https://api.github.com/users/datapythonista/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/datapythonista/subscriptions", "type": "User", "url": "https://api.github.com/users/datapythonista" }
[ { "color": "23ef97", "default": false, "description": "pandas website", "id": 1508144531, "name": "Web", "node_id": "MDU6TGFiZWwxNTA4MTQ0NTMx", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Web" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
3
2020-07-29T11:14:06Z
2020-08-04T15:21:03Z
2020-08-04T15:20:56Z
MEMBER
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/35451/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35451/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35451.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35451", "merged_at": "2020-08-04T15:20:56Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35451.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35451" }
https://api.github.com/repos/pandas-dev/pandas/issues/35452
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35452/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35452/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35452/events
https://github.com/pandas-dev/pandas/pull/35452
667,782,182
MDExOlB1bGxSZXF1ZXN0NDU4Mzg2NTU4
35,452
DOC: Start 1.1.1
{ "avatar_url": "https://avatars.githubusercontent.com/u/1312546?v=4", "events_url": "https://api.github.com/users/TomAugspurger/events{/privacy}", "followers_url": "https://api.github.com/users/TomAugspurger/followers", "following_url": "https://api.github.com/users/TomAugspurger/following{/other_user}", "gists_url": "https://api.github.com/users/TomAugspurger/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/TomAugspurger", "id": 1312546, "login": "TomAugspurger", "node_id": "MDQ6VXNlcjEzMTI1NDY=", "organizations_url": "https://api.github.com/users/TomAugspurger/orgs", "received_events_url": "https://api.github.com/users/TomAugspurger/received_events", "repos_url": "https://api.github.com/users/TomAugspurger/repos", "site_admin": false, "starred_url": "https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TomAugspurger/subscriptions", "type": "User", "url": "https://api.github.com/users/TomAugspurger" }
[ { "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
2
2020-07-29T11:48:02Z
2020-07-29T13:45:52Z
2020-07-29T13:45:33Z
CONTRIBUTOR
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/35452/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35452/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35452.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35452", "merged_at": "2020-07-29T13:45:33Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35452.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35452" }
https://api.github.com/repos/pandas-dev/pandas/issues/35453
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35453/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35453/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35453/events
https://github.com/pandas-dev/pandas/pull/35453
667,783,787
MDExOlB1bGxSZXF1ZXN0NDU4Mzg3ODky
35,453
DOC: Add 1.1.1 whatsnew
{ "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" }
[]
closed
false
null
[]
null
2
2020-07-29T11:50:48Z
2020-07-29T14:11:54Z
2020-07-29T11:51:07Z
MEMBER
null
- [ ] closes #xxxx - [ ] tests added / passed - [ ] passes `black pandas` - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] 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/35453/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35453/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35453.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35453", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35453.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35453" }
https://api.github.com/repos/pandas-dev/pandas/issues/35454
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35454/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35454/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35454/events
https://github.com/pandas-dev/pandas/pull/35454
667,806,384
MDExOlB1bGxSZXF1ZXN0NDU4NDA2ODk1
35,454
DOC: update Python support policy
{ "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": "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": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
1
2020-07-29T12:28:46Z
2020-07-29T18:06:02Z
2020-07-29T15:43:11Z
MEMBER
null
xref https://github.com/pandas-dev/pandas/issues/34472#issuecomment-660695759
{ "+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/35454/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35454/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35454.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35454", "merged_at": "2020-07-29T15:43:11Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35454.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35454" }
https://api.github.com/repos/pandas-dev/pandas/issues/35455
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35455/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35455/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35455/events
https://github.com/pandas-dev/pandas/issues/35455
667,809,198
MDU6SXNzdWU2Njc4MDkxOTg=
35,455
REGR: DataFrame.to_numpy(dtype=str) raises RuntimeError in pandas 1.1.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/22963691?v=4", "events_url": "https://api.github.com/users/aciba90/events{/privacy}", "followers_url": "https://api.github.com/users/aciba90/followers", "following_url": "https://api.github.com/users/aciba90/following{/other_user}", "gists_url": "https://api.github.com/users/aciba90/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/aciba90", "id": 22963691, "login": "aciba90", "node_id": "MDQ6VXNlcjIyOTYzNjkx", "organizations_url": "https://api.github.com/users/aciba90/orgs", "received_events_url": "https://api.github.com/users/aciba90/received_events", "repos_url": "https://api.github.com/users/aciba90/repos", "site_admin": false, "starred_url": "https://api.github.com/users/aciba90/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/aciba90/subscriptions", "type": "User", "url": "https://api.github.com/users/aciba90" }
[ { "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" }, { "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" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
3
2020-07-29T12:33:12Z
2020-08-08T09:43:11Z
2020-08-08T09:43:10Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python import pandas as pd df = pd.DataFrame(data=[[pd.Timestamp('2011-07-03 00:00:00'), 6628480.0]]) print(df.to_numpy(dtype=str)) ``` #### Problem description I try to convert the DataFrame to a Numpy array with dtype equal to str and I got the next error. ```python-traceback Traceback (most recent call last): File "/main.py", line 4, in <module> df.to_numpy(dtype=str) File "/venv/lib/python3.7/site-packages/pandas/core/frame.py", line 1371, in to_numpy transpose=self._AXIS_REVERSED, dtype=dtype, copy=copy, na_value=na_value File "/venv/lib/python3.7/site-packages/pandas/core/internals/managers.py", line 826, in as_array arr = self._interleave(dtype=dtype, na_value=na_value) File "/venv/lib/python3.7/site-packages/pandas/core/internals/managers.py", line 864, in _interleave result[rl.indexer] = arr RuntimeError: The string provided for NumPy ISO datetime formatting was too short, with length 1 ``` #### Expected Output ```python [['2011-07-03 00:00:00' '6628480.0']] ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.7.6.final.0 python-bits : 64 OS : Linux OS-release : 4.19.104-microsoft-standard Version : #1 SMP Wed Feb 19 06:37:35 UTC 2020 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : C.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.1.0 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 19.2.3 setuptools : 41.2.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 pytables : 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/35455/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35455/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35456
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35456/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35456/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35456/events
https://github.com/pandas-dev/pandas/pull/35456
667,832,696
MDExOlB1bGxSZXF1ZXN0NDU4NDI4OTg4
35,456
Add note about limited propagation of attrs
{ "avatar_url": "https://avatars.githubusercontent.com/u/32569096?v=4", "events_url": "https://api.github.com/users/RobertRosca/events{/privacy}", "followers_url": "https://api.github.com/users/RobertRosca/followers", "following_url": "https://api.github.com/users/RobertRosca/following{/other_user}", "gists_url": "https://api.github.com/users/RobertRosca/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/RobertRosca", "id": 32569096, "login": "RobertRosca", "node_id": "MDQ6VXNlcjMyNTY5MDk2", "organizations_url": "https://api.github.com/users/RobertRosca/orgs", "received_events_url": "https://api.github.com/users/RobertRosca/received_events", "repos_url": "https://api.github.com/users/RobertRosca/repos", "site_admin": false, "starred_url": "https://api.github.com/users/RobertRosca/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RobertRosca/subscriptions", "type": "User", "url": "https://api.github.com/users/RobertRosca" }
[ { "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": "7fcce8", "default": false, "description": "", "id": 2347992045, "name": "Stale", "node_id": "MDU6TGFiZWwyMzQ3OTkyMDQ1", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Stale" } ]
closed
false
null
[]
null
7
2020-07-29T13:09:59Z
2020-11-30T05:57:06Z
2020-11-30T05:57:05Z
NONE
null
Explicitly mention that `attrs` are not retained once a series is placed into a dataframe, related to issue #35425
{ "+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/35456/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35456/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35456.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35456", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35456.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35456" }
https://api.github.com/repos/pandas-dev/pandas/issues/35457
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35457/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35457/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35457/events
https://github.com/pandas-dev/pandas/issues/35457
667,834,512
MDU6SXNzdWU2Njc4MzQ1MTI=
35,457
BUG: Empty dataframe with `.astype` raises Exception
{ "avatar_url": "https://avatars.githubusercontent.com/u/26224290?v=4", "events_url": "https://api.github.com/users/eliasmistler/events{/privacy}", "followers_url": "https://api.github.com/users/eliasmistler/followers", "following_url": "https://api.github.com/users/eliasmistler/following{/other_user}", "gists_url": "https://api.github.com/users/eliasmistler/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eliasmistler", "id": 26224290, "login": "eliasmistler", "node_id": "MDQ6VXNlcjI2MjI0Mjkw", "organizations_url": "https://api.github.com/users/eliasmistler/orgs", "received_events_url": "https://api.github.com/users/eliasmistler/received_events", "repos_url": "https://api.github.com/users/eliasmistler/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eliasmistler/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eliasmistler/subscriptions", "type": "User", "url": "https://api.github.com/users/eliasmistler" }
[ { "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": "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" } ]
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" }
1
2020-07-29T13:12:49Z
2020-07-29T13:54:37Z
2020-07-29T13:53:56Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample, a copy-pastable example ```python import pandas as pd pd.DataFrame([]).astype({}) ``` #### Problem description I've got some generic code handling a large number of DataFrames, and among other things, forcing the data types of certain columns. Some of these DataFrames can be empty - however, that should not stop the calculations. My expectation would be that I can run any operation that is conceptually a `nop` on a DataFrame without causing an issue. In this case, I can run `.astype({})` on any DataFrame (empty or not) that has columns - so far, so good. However, on a DataFrame with 0 columns, the function fails with a `ValueError`: "No objects to concatenate" #### Expected Output Empty DataFrame #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.4.final.0 python-bits : 64 OS : Darwin OS-release : 19.5.0 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : None LOCALE : en_GB.UTF-8 pandas : 1.0.4 numpy : 1.18.5 pytz : 2020.1 dateutil : 2.8.1 pip : 19.3.1 setuptools : 42.0.2 Cython : None pytest : 5.4.3 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : None IPython : 7.15.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pytest : 5.4.3 pyxlsb : None s3fs : None scipy : None sqlalchemy : 1.3.17 tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : 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/35457/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35457/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35458
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35458/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35458/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35458/events
https://github.com/pandas-dev/pandas/pull/35458
667,858,509
MDExOlB1bGxSZXF1ZXN0NDU4NDUwNzYw
35,458
Backport PR #35452 on branch 1.1.x (DOC: Start 1.1.1)
{ "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" }
[]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
2
2020-07-29T13:46:11Z
2020-07-29T14:46:57Z
2020-07-29T14:35:14Z
NONE
null
Backport PR #35452: DOC: Start 1.1.1
{ "+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/35458/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35458/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35458.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35458", "merged_at": "2020-07-29T14:35:13Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35458.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35458" }
https://api.github.com/repos/pandas-dev/pandas/issues/35459
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35459/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35459/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35459/events
https://github.com/pandas-dev/pandas/pull/35459
667,909,684
MDExOlB1bGxSZXF1ZXN0NDU4NDkzNDE5
35,459
CI: activate github actions on 1.1.x (PR only) - DO NOT MERGE
{ "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
[]
null
1
2020-07-29T14:54:36Z
2020-07-29T18:16:00Z
2020-07-29T18:14:29Z
MEMBER
null
IIUC without changes to other scripts, activating GitHub actions for merge would push the docs. so this is only for PRs If works. will open PR against master instead. and backport. xref https://github.com/pandas-dev/pandas/pull/34800#issuecomment-644669496
{ "+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/35459/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35459/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35459.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35459", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35459.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35459" }
https://api.github.com/repos/pandas-dev/pandas/issues/35460
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35460/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35460/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35460/events
https://github.com/pandas-dev/pandas/issues/35460
667,909,950
MDU6SXNzdWU2Njc5MDk5NTA=
35,460
BUG: AssertionError: Number of Block dimensions (1) must equal number of axes (2) when typing a column
{ "avatar_url": "https://avatars.githubusercontent.com/u/56838676?v=4", "events_url": "https://api.github.com/users/frd-glovo/events{/privacy}", "followers_url": "https://api.github.com/users/frd-glovo/followers", "following_url": "https://api.github.com/users/frd-glovo/following{/other_user}", "gists_url": "https://api.github.com/users/frd-glovo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/frd-glovo", "id": 56838676, "login": "frd-glovo", "node_id": "MDQ6VXNlcjU2ODM4Njc2", "organizations_url": "https://api.github.com/users/frd-glovo/orgs", "received_events_url": "https://api.github.com/users/frd-glovo/received_events", "repos_url": "https://api.github.com/users/frd-glovo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/frd-glovo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/frd-glovo/subscriptions", "type": "User", "url": "https://api.github.com/users/frd-glovo" }
[ { "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": "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": "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
[]
{ "closed_at": "2020-09-09T09:07:44Z", "closed_issues": 94, "created_at": "2020-08-17T19:11:56Z", "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.1.x", "due_on": "2020-09-08T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/76", "id": 5781056, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/76/labels", "node_id": "MDk6TWlsZXN0b25lNTc4MTA1Ng==", "number": 76, "open_issues": 0, "state": "closed", "title": "1.1.2", "updated_at": "2020-10-02T11:57:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/76" }
3
2020-07-29T14:54:57Z
2020-09-06T16:58:33Z
2020-09-06T16:58:33Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python import pandas as pd df = pd.DataFrame( {"e1_timestamp": [], "e2_timestamp": [] } ) # The problematic code. Remove this and there are no exceptions. for timefield in [ "e1_timestamp", "e2_timestamp", ]: df[timefield] = pd.to_datetime(df[timefield], utc=True) # df = df.append({ "orderId": 1, "e1_timestamp": pd.to_datetime(pd.NaT, utc=True), "e2_timestamp": pd.to_datetime(pd.NaT, utc=True), },ignore_index=True,) df ``` #### Problem description Why initializing an empty dataframe, defining its type as shown in the example and then appending a value, there is an ```AssertionError: Number of Block dimensions (1) must equal number of axes (2)``` exception. If we remove the for loop, it does work: ``` df = pd.DataFrame( {"e1_timestamp": [], "e2_timestamp": [] } ) df = df.append({ "e1_timestamp": pd.to_datetime(pd.NaT, utc=True), "e2_timestamp": pd.to_datetime(pd.NaT, utc=True), },ignore_index=True,) df ``` We see that we could do ```df = df.astype({"e1_timestamp": 'datetime64[ns]', "e1_timestamp": 'datetime64[ns]'})``` instead of that for loop, but there seems to be a bug in this new version. With pandas==1.0.5 the for loop does not raise an exception. #### Expected Output There should be no assertion error #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.7.5.final.0 python-bits : 64 OS : Linux OS-release : 4.9.184-linuxkit Version : #1 SMP Tue Jul 2 22:58:16 UTC 2019 machine : x86_64 processor : byteorder : little LC_ALL : None LANG : C.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.1.0 numpy : 1.16.0 pytz : 2019.1 dateutil : 2.8.1 pip : 19.3.1 setuptools : 41.4.0 Cython : None pytest : 4.1.1 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : 0.9.3 psycopg2 : 2.8.2 (dt dec pq3 ext lo64) jinja2 : 2.10.1 IPython : 7.11.1 pandas_datareader: None bs4 : None bottleneck : None fsspec : None fastparquet : None gcsfs : None matplotlib : 3.1.1 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pyxlsb : None s3fs : None scipy : 1.2.0 sqlalchemy : 1.2.16 tables : None tabulate : 0.8.3 xarray : None xlrd : None xlwt : None numba : None </details>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 1, "total_count": 1, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/35460/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35460/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35461
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35461/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35461/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35461/events
https://github.com/pandas-dev/pandas/pull/35461
667,930,090
MDExOlB1bGxSZXF1ZXN0NDU4NTEwNDgw
35,461
CI: activate azure pipelines on 1.1.x - DO NOT MERGE
{ "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
[]
null
1
2020-07-29T15:21:32Z
2020-07-29T18:19:27Z
2020-07-29T18:19:26Z
MEMBER
null
Azure pipelines worked for 1.0.x since #32706 which specified which branches to run on was not backported If works. will open PR against master instead. and backport.
{ "+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/35461/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35461/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35461.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35461", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35461.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35461" }
https://api.github.com/repos/pandas-dev/pandas/issues/35462
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35462/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35462/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35462/events
https://github.com/pandas-dev/pandas/issues/35462
667,930,415
MDU6SXNzdWU2Njc5MzA0MTU=
35,462
BUG: dataframe.apply() loops on first row when applied method attempts to modify the row
{ "avatar_url": "https://avatars.githubusercontent.com/u/16897168?v=4", "events_url": "https://api.github.com/users/nicolasrozain/events{/privacy}", "followers_url": "https://api.github.com/users/nicolasrozain/followers", "following_url": "https://api.github.com/users/nicolasrozain/following{/other_user}", "gists_url": "https://api.github.com/users/nicolasrozain/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nicolasrozain", "id": 16897168, "login": "nicolasrozain", "node_id": "MDQ6VXNlcjE2ODk3MTY4", "organizations_url": "https://api.github.com/users/nicolasrozain/orgs", "received_events_url": "https://api.github.com/users/nicolasrozain/received_events", "repos_url": "https://api.github.com/users/nicolasrozain/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nicolasrozain/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nicolasrozain/subscriptions", "type": "User", "url": "https://api.github.com/users/nicolasrozain" }
[ { "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": "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": "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" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
5
2020-07-29T15:21:58Z
2020-08-11T00:01:58Z
2020-08-11T00:01:58Z
NONE
null
With pandas 1.1.0 on Python 3.6.8: ``` >>> import pandas as pd >>> df = pd.DataFrame({'a': list(range(0,100)), 'b': list(range(100,200))}) >>> def func(row): ... row.loc['a'] += 1 ... return row ... >>> df a b 0 0 100 1 1 101 2 2 102 3 3 103 4 4 104 .. .. ... 95 95 195 96 96 196 97 97 197 98 98 198 99 99 199 [100 rows x 2 columns] >>> df.apply(func, axis=1) a b 0 100 100 1 100 100 2 100 100 3 100 100 4 100 100 .. ... ... 95 100 100 96 100 100 97 100 100 98 100 100 99 100 100 [100 rows x 2 columns] >>> df a b 0 100 100 1 1 101 2 2 102 3 3 103 4 4 104 .. ... ... 95 95 195 96 96 196 97 97 197 98 98 198 99 99 199 [100 rows x 2 columns] >>> pd.show_versions() INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.6.8.final.0 python-bits : 64 OS : Windows OS-release : 10 Version : 10.0.17763 machine : AMD64 processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 1.1.0 numpy : 1.18.2 pytz : 2019.3 dateutil : 2.8.1 pip : 20.0.2 setuptools : 42.0.2 Cython : None pytest : 5.4.1 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.5.0 html5lib : 1.0.1 pymysql : None psycopg2 : None jinja2 : None IPython : None pandas_datareader: None bs4 : 4.9.1 bottleneck : 1.3.2 fsspec : None fastparquet : None gcsfs : None matplotlib : 3.2.1 numexpr : 2.7.1 odfpy : None openpyxl : 2.5.14 pandas_gbq : None pyarrow : None pytables : None pyxlsb : None s3fs : None scipy : 1.3.3 sqlalchemy : None tables : None tabulate : None xarray : None xlrd : 1.2.0 xlwt : 1.3.0 numba : None ``` With pandas 1.0.5: ``` >>> import pandas as pd >>> df = pd.DataFrame({'a': list(range(0,100)), 'b': list(range(100,200))}) >>> def func(row): ... row.loc['a'] += 1 ... return row ... >>> df a b 0 0 100 1 1 101 2 2 102 3 3 103 4 4 104 .. .. ... 95 95 195 96 96 196 97 97 197 98 98 198 99 99 199 [100 rows x 2 columns] >>> df.apply(func, axis=1) a b 0 1 100 1 2 101 2 3 102 3 4 103 4 5 104 .. ... ... 95 96 195 96 97 196 97 98 197 98 99 198 99 100 199 [100 rows x 2 columns] >>> df a b 0 1 100 1 2 101 2 3 102 3 4 103 4 5 104 .. ... ... 95 96 195 96 97 196 97 98 197 98 99 198 99 100 199 [100 rows x 2 columns] >>> pd.show_versions() INSTALLED VERSIONS ------------------ commit : None python : 3.6.8.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 1.0.5 numpy : 1.18.2 pytz : 2019.3 dateutil : 2.8.1 pip : 20.0.2 setuptools : 42.0.2 Cython : None pytest : 5.4.1 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.5.0 html5lib : 1.0.1 pymysql : None psycopg2 : None jinja2 : None IPython : None pandas_datareader: None bs4 : 4.9.1 bottleneck : 1.3.2 fastparquet : None gcsfs : None lxml.etree : 4.5.0 matplotlib : 3.2.1 numexpr : 2.7.1 odfpy : None openpyxl : 2.5.14 pandas_gbq : None pyarrow : None pytables : None pytest : 5.4.1 pyxlsb : None s3fs : None scipy : 1.3.3 sqlalchemy : None tables : None tabulate : None xarray : None xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : None numba : None ``` I expected the behavior of 1.0.5 in 1.1.0, did I misunderstood the apply method? Thank you for your help.
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/35462/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35462/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35463
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35463/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35463/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35463/events
https://github.com/pandas-dev/pandas/issues/35463
667,943,015
MDU6SXNzdWU2Njc5NDMwMTU=
35,463
Question/bug: How to get rid of "0 days" in timedelta64[s]
{ "avatar_url": "https://avatars.githubusercontent.com/u/2090236?v=4", "events_url": "https://api.github.com/users/pllim/events{/privacy}", "followers_url": "https://api.github.com/users/pllim/followers", "following_url": "https://api.github.com/users/pllim/following{/other_user}", "gists_url": "https://api.github.com/users/pllim/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pllim", "id": 2090236, "login": "pllim", "node_id": "MDQ6VXNlcjIwOTAyMzY=", "organizations_url": "https://api.github.com/users/pllim/orgs", "received_events_url": "https://api.github.com/users/pllim/received_events", "repos_url": "https://api.github.com/users/pllim/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pllim/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pllim/subscriptions", "type": "User", "url": "https://api.github.com/users/pllim" }
[ { "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" }, { "color": "5319e7", "default": false, "description": "Timedelta data type", "id": 49597148, "name": "Timedelta", "node_id": "MDU6TGFiZWw0OTU5NzE0OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta" } ]
closed
false
null
[]
null
7
2020-07-29T15:40:00Z
2020-07-30T16:22:12Z
2020-07-30T16:19:15Z
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 of pandas. -- I can't tell if this is a feature or a bug. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python >>> import pandas as pd >>> import numpy as np >>> dt = pd.Series(np.array([1, 300], dtype='timedelta64[s]')) >>> df = pd.DataFrame({'dt': dt}) ``` ```python >>> pd.__version__ '1.0.5' >>> df dt 0 00:00:01 1 00:05:00 ``` ```python >>> pd.__version__ '1.1.0' >>> df dt 0 0 days 00:00:01 1 0 days 00:05:00 ``` #### Problem description "0 days" started to appear when DataFrame contains `timedelta64[s]`. #### Expected Output See "Code Sample" for `pandas` 1.0.5. #### Output of ``pd.show_versions()`` See "Code Sample" for `pandas` 1.1.0. #### Further readings astropy/astropy#10608 and astropy/astropy#10609
{ "+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/35463/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35463/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35464
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35464/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35464/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35464/events
https://github.com/pandas-dev/pandas/issues/35464
668,015,053
MDU6SXNzdWU2NjgwMTUwNTM=
35,464
BUG: Type mismatch in read_json
{ "avatar_url": "https://avatars.githubusercontent.com/u/2353212?v=4", "events_url": "https://api.github.com/users/rohan-gt/events{/privacy}", "followers_url": "https://api.github.com/users/rohan-gt/followers", "following_url": "https://api.github.com/users/rohan-gt/following{/other_user}", "gists_url": "https://api.github.com/users/rohan-gt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rohan-gt", "id": 2353212, "login": "rohan-gt", "node_id": "MDQ6VXNlcjIzNTMyMTI=", "organizations_url": "https://api.github.com/users/rohan-gt/orgs", "received_events_url": "https://api.github.com/users/rohan-gt/received_events", "repos_url": "https://api.github.com/users/rohan-gt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rohan-gt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rohan-gt/subscriptions", "type": "User", "url": "https://api.github.com/users/rohan-gt" }
[ { "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": "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
[]
{ "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" }
2
2020-07-29T17:29:04Z
2020-08-30T22:35:04Z
null
NONE
null
Tested on Pandas v1.1.0 I'm trying to import a JSON file containing the following: **test.json** ````json {"file_path": null} ```` If I run the following code, ````python pd.read_json("test.json", typ='series').to_dict() ```` I get this output: ````python {'file_path': NaT} ```` Why is `null` getting converted to `NaT` instead of `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/35464/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35464/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35465
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35465/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35465/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35465/events
https://github.com/pandas-dev/pandas/issues/35465
668,015,640
MDU6SXNzdWU2NjgwMTU2NDA=
35,465
BUG: Inconsistent initialization of `timedelta64` between Series vs numpy & pd.TimeDelta
{ "avatar_url": "https://avatars.githubusercontent.com/u/11664259?v=4", "events_url": "https://api.github.com/users/galipremsagar/events{/privacy}", "followers_url": "https://api.github.com/users/galipremsagar/followers", "following_url": "https://api.github.com/users/galipremsagar/following{/other_user}", "gists_url": "https://api.github.com/users/galipremsagar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/galipremsagar", "id": 11664259, "login": "galipremsagar", "node_id": "MDQ6VXNlcjExNjY0MjU5", "organizations_url": "https://api.github.com/users/galipremsagar/orgs", "received_events_url": "https://api.github.com/users/galipremsagar/received_events", "repos_url": "https://api.github.com/users/galipremsagar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/galipremsagar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/galipremsagar/subscriptions", "type": "User", "url": "https://api.github.com/users/galipremsagar" }
[ { "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": "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": "5319e7", "default": false, "description": "Timedelta data type", "id": 49597148, "name": "Timedelta", "node_id": "MDU6TGFiZWw0OTU5NzE0OA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta" }, { "color": "d4c5f9", "default": false, "description": "Series/DataFrame/Index/pd.array Constructors", "id": 1465286368, "name": "Constructors", "node_id": "MDU6TGFiZWwxNDY1Mjg2MzY4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Constructors" } ]
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" }
3
2020-07-29T17:30:02Z
2020-07-30T15:09:27Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. The creation of a pandas Series with any dtype other than `timedelta64[ns]` is discarding values and setting the entire series to `0`'s. Whereas `numpy.array` and `pd.TimeDelta` are correctly instantiating and preserving the passed values which can be retrieved by a type-cast too. #### Code Sample, a copy-pastable example ```python >>> import pandas as pd >>> pd.__version__ '1.1.0' >>> pd.Series([1000000, 200000, 3000000], dtype='timedelta64[ns]') 0 0 days 00:00:00.001000 1 0 days 00:00:00.000200 2 0 days 00:00:00.003000 dtype: timedelta64[ns] >>> pd.Series([1000000, 200000, 3000000], dtype='timedelta64[s]') 0 0 days 1 0 days 2 0 days dtype: timedelta64[ns] >>> pd.Series([1000000, 200000, 3000000], dtype='timedelta64[s]').astype('int') 0 0 1 0 2 0 dtype: int64 >>> pd.Series([1000000, 200000, 3000000], dtype='timedelta64[ns]').astype('int') 0 1000000 1 200000 2 3000000 dtype: int64 >>> import numpy as np >>> np.array([1000000, 200000, 3000000], dtype='timedelta64[ns]') array([1000000, 200000, 3000000], dtype='timedelta64[ns]') >>> np.array([1000000, 200000, 3000000], dtype='timedelta64[s]') array([1000000, 200000, 3000000], dtype='timedelta64[s]') >>> np.array([1000000, 200000, 3000000], dtype='timedelta64[s]').astype('int') array([1000000, 200000, 3000000]) >>> pd.Timedelta(10) Timedelta('0 days 00:00:00.000000010') >>> pd.Timedelta(10, unit='s') Timedelta('0 days 00:00:10') >>> pd.Timedelta(10, unit='ns') Timedelta('0 days 00:00:00.000000010') ``` #### Problem description The expected behaviour is Series initialization must be in-line with numpy array initialization in this case. #### Expected Output #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.7.3.final.0 python-bits : 64 OS : Darwin OS-release : 19.6.0 Version : Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : None LOCALE : en_US.UTF-8 pandas : 1.1.0 numpy : 1.19.0 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.1.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 : 2.11.2 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 pytables : 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/35465/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35465/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35466
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35466/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35466/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35466/events
https://github.com/pandas-dev/pandas/issues/35466
668,025,203
MDU6SXNzdWU2NjgwMjUyMDM=
35,466
BUG: Date objects cannot be compared against a DatetimeIndex
{ "avatar_url": "https://avatars.githubusercontent.com/u/1223213?v=4", "events_url": "https://api.github.com/users/knabben/events{/privacy}", "followers_url": "https://api.github.com/users/knabben/followers", "following_url": "https://api.github.com/users/knabben/following{/other_user}", "gists_url": "https://api.github.com/users/knabben/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/knabben", "id": 1223213, "login": "knabben", "node_id": "MDQ6VXNlcjEyMjMyMTM=", "organizations_url": "https://api.github.com/users/knabben/orgs", "received_events_url": "https://api.github.com/users/knabben/received_events", "repos_url": "https://api.github.com/users/knabben/repos", "site_admin": false, "starred_url": "https://api.github.com/users/knabben/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/knabben/subscriptions", "type": "User", "url": "https://api.github.com/users/knabben" }
[ { "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": "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": "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" }, { "color": "bfd4f2", "default": false, "description": "stdlib datetime.date support", "id": 3059772828, "name": "datetime.date", "node_id": "MDU6TGFiZWwzMDU5NzcyODI4", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/datetime.date" } ]
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" }
7
2020-07-29T17:46:54Z
2021-06-05T19:08:30Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example Version 1.0.5 ```python holidays = USFederalHolidayCalendar().holidays() >>> datetime.datetime(2018, 7, 4) in holidays True >>> datetime.date(2018, 7, 4) in holidays True >>> pd.__version__ '1.0.5' ``` Version 1.1.0 ```python holidays = USFederalHolidayCalendar().holidays() >>> datetime.datetime(2018, 7, 4) in holidays True >>> datetime.date(2018, 7, 4) in holidays False >>> pd.__version__ '1.1.0' >>> ``` #### Problem description On version 1.0.5 it was possible to compare via __contains__ a *datetime.date* object against a DatetimeIndex, this behavior is not true anymore for the 1.1.0, is this an expected behavior to allow only recognized scalars objects? #### Expected Output Allow dates to be compared with 00:00:00 time. #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.6 OS : Darwin pandas : 1.1.0 numpy : 1.19.1 Cython : None </details>
{ "+1": 0, "-1": 0, "confused": 1, "eyes": 1, "heart": 2, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 4, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/35466/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35466/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35467
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35467/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35467/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35467/events
https://github.com/pandas-dev/pandas/pull/35467
668,040,604
MDExOlB1bGxSZXF1ZXN0NDU4NjAwNjk4
35,467
CI: activate github actions on 1.1.x (PR only)
{ "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
7
2020-07-29T18:13:16Z
2020-08-04T08:28:34Z
2020-08-04T08:24:29Z
MEMBER
null
same as #35459 against master. so should be OK when backported.
{ "+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/35467/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35467/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35467.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35467", "merged_at": "2020-08-04T08:24:29Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35467.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35467" }
https://api.github.com/repos/pandas-dev/pandas/issues/35468
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35468/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35468/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35468/events
https://github.com/pandas-dev/pandas/pull/35468
668,046,119
MDExOlB1bGxSZXF1ZXN0NDU4NjA1MjM0
35,468
CI: activate azure pipelines on 1.1.x
{ "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
2
2020-07-29T18:22:16Z
2020-08-04T08:26:58Z
2020-08-03T23:40:27Z
MEMBER
null
same as #35461 against master. so should be OK when backported.
{ "+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/35468/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35468/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35468.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35468", "merged_at": "2020-08-03T23:40:27Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35468.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35468" }
https://api.github.com/repos/pandas-dev/pandas/issues/35469
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35469/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35469/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35469/events
https://github.com/pandas-dev/pandas/pull/35469
668,050,906
MDExOlB1bGxSZXF1ZXN0NDU4NjA5MDEy
35,469
Backport PR #35272 on branch 1.1.x (CI: Unpin pytest)
{ "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" }
[]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
0
2020-07-29T18:29:47Z
2020-07-30T11:56:38Z
2020-07-30T11:56:38Z
NONE
null
Backport PR #35272: CI: Unpin pytest
{ "+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/35469/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35469/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35469.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35469", "merged_at": "2020-07-30T11:56:38Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35469.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35469" }
https://api.github.com/repos/pandas-dev/pandas/issues/35470
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35470/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35470/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35470/events
https://github.com/pandas-dev/pandas/pull/35470
668,101,515
MDExOlB1bGxSZXF1ZXN0NDU4NjUwOTQ5
35,470
CI: unpin isort 5 (#35134)
{ "avatar_url": "https://avatars.githubusercontent.com/u/7614606?v=4", "events_url": "https://api.github.com/users/fangchenli/events{/privacy}", "followers_url": "https://api.github.com/users/fangchenli/followers", "following_url": "https://api.github.com/users/fangchenli/following{/other_user}", "gists_url": "https://api.github.com/users/fangchenli/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fangchenli", "id": 7614606, "login": "fangchenli", "node_id": "MDQ6VXNlcjc2MTQ2MDY=", "organizations_url": "https://api.github.com/users/fangchenli/orgs", "received_events_url": "https://api.github.com/users/fangchenli/received_events", "repos_url": "https://api.github.com/users/fangchenli/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fangchenli/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fangchenli/subscriptions", "type": "User", "url": "https://api.github.com/users/fangchenli" }
[ { "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": "eb6420", "default": false, "description": "Code style, linting, code_checks", "id": 106935113, "name": "Code Style", "node_id": "MDU6TGFiZWwxMDY5MzUxMTM=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
5
2020-07-29T19:49:12Z
2020-08-01T13:24:54Z
2020-08-01T08:43:02Z
MEMBER
null
- [x] closes #35134 - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
{ "+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/35470/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35470/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35470.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35470", "merged_at": "2020-08-01T08:43:01Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35470.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35470" }
https://api.github.com/repos/pandas-dev/pandas/issues/35471
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35471/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35471/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35471/events
https://github.com/pandas-dev/pandas/issues/35471
668,165,942
MDU6SXNzdWU2NjgxNjU5NDI=
35,471
BUG: astype ignore errors not working for categorical/StringArray
{ "avatar_url": "https://avatars.githubusercontent.com/u/10537808?v=4", "events_url": "https://api.github.com/users/traubms/events{/privacy}", "followers_url": "https://api.github.com/users/traubms/followers", "following_url": "https://api.github.com/users/traubms/following{/other_user}", "gists_url": "https://api.github.com/users/traubms/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/traubms", "id": 10537808, "login": "traubms", "node_id": "MDQ6VXNlcjEwNTM3ODA4", "organizations_url": "https://api.github.com/users/traubms/orgs", "received_events_url": "https://api.github.com/users/traubms/received_events", "repos_url": "https://api.github.com/users/traubms/repos", "site_admin": false, "starred_url": "https://api.github.com/users/traubms/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/traubms/subscriptions", "type": "User", "url": "https://api.github.com/users/traubms" }
[ { "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" }, { "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": "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": "2020-09-09T09:07:44Z", "closed_issues": 94, "created_at": "2020-08-17T19:11:56Z", "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.1.x", "due_on": "2020-09-08T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/76", "id": 5781056, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/76/labels", "node_id": "MDk6TWlsZXN0b25lNTc4MTA1Ng==", "number": 76, "open_issues": 0, "state": "closed", "title": "1.1.2", "updated_at": "2020-10-02T11:57:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/76" }
2
2020-07-29T21:18:27Z
2020-09-06T17:07:54Z
2020-09-06T17:07:54Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Problem description It seems to be ignoring `errors='ignore'` kwarg. The behavior in 0.25.3 is expected. #### Code Sample, a copy-pastable example ```python import pandas as pd pd.__version__ # '1.0.5' pd.Series(pd.Categorical(['A', 'B'])).astype(float, errors='ignore') # --------------------------------------------------------------------------- # ValueError Traceback (most recent call last) # <ipython-input-4-3d39cd9c1cdd> in <module> # ----> 1 pd.Series(pd.Categorical(['A', 'B'])).astype(float, errors='ignore') # # ... # ValueError: could not convert string to float: 'A' ``` #### Expected Output ```python import pandas as pd pd.__version__ # '0.25.3' pd.Series(pd.Categorical(['A', 'B'])).astype(float, errors='ignore') # 0 A # 1 B # dtype: category # Categories (2, object): [A, B] ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : None python : 3.7.7.final.0 python-bits : 64 OS : Linux OS-release : 3.10.0-1062.4.1.el7.x86_64 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.0.5 numpy : 1.18.5 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 49.2.0.post20200714 Cython : None pytest : 6.0.0 hypothesis : None sphinx : 3.1.2 blosc : None feather : None xlsxwriter : 1.2.9 lxml.etree : 4.5.2 html5lib : None pymysql : None psycopg2 : 2.8.5 (dt dec pq3 ext lo64) jinja2 : 2.11.2 IPython : 7.16.1 pandas_datareader: None bs4 : None bottleneck : 1.3.2 fastparquet : 0.3.2 gcsfs : None lxml.etree : 4.5.2 matplotlib : 3.2.2 numexpr : 2.7.1 odfpy : None openpyxl : 3.0.4 pandas_gbq : None pyarrow : 0.15.1 pytables : None pytest : 6.0.0 pyxlsb : None s3fs : None scipy : 1.3.1 sqlalchemy : 1.3.18 tables : None tabulate : 0.8.7 xarray : None xlrd : None xlwt : None xlsxwriter : 1.2.9 numba : 0.50.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/35471/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35471/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35472
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35472/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35472/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35472/events
https://github.com/pandas-dev/pandas/issues/35472
668,210,353
MDU6SXNzdWU2NjgyMTAzNTM=
35,472
ENH: Method on pd.Period to find the nth weekday in a period.
{ "avatar_url": "https://avatars.githubusercontent.com/u/3813175?v=4", "events_url": "https://api.github.com/users/smithto1/events{/privacy}", "followers_url": "https://api.github.com/users/smithto1/followers", "following_url": "https://api.github.com/users/smithto1/following{/other_user}", "gists_url": "https://api.github.com/users/smithto1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/smithto1", "id": 3813175, "login": "smithto1", "node_id": "MDQ6VXNlcjM4MTMxNzU=", "organizations_url": "https://api.github.com/users/smithto1/orgs", "received_events_url": "https://api.github.com/users/smithto1/received_events", "repos_url": "https://api.github.com/users/smithto1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/smithto1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/smithto1/subscriptions", "type": "User", "url": "https://api.github.com/users/smithto1" }
[ { "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
[]
null
2
2020-07-29T22:28:44Z
2020-08-21T17:04:42Z
2020-07-30T05:57:18Z
MEMBER
null
#### Is your feature request related to a problem? It should be easy to find the nth weekday of period (usually a month). This kind of operation comes up all the time in financial contracts (i.e. futures and options expiring on the 3rd Wed of the month) and other use-cases (i.e. US election dates). #### Describe the solution you'd like Add an `nth_weekday` method to the `pd.Period` object to handle this operation. It could then be extended to the `PeriodArray`. `nth_weekday` should work forward and backwards with Pythonic-indexing (n=0 gives you date of first weekday, n=-1 gives you date of last weekday) `nth_weekday` should have a flag to to enforce that the returned date has to be inside the period, or if you let it go outside the period bounds. It should default to enforcing the period bounds. #### API breaking implications This will add a new method to the `pd.Period` and the `PeriodArray`. Proposed name is `nth_weekday` but that can be changed. It shouldn't have any other impact on the API. #### Describe alternatives you've considered A general search of the internet did not find any convenient solution for this in all of Python. These looked like the best solutions available, and they're not great: https://stackoverflow.com/questions/11883058/nth-weekday-calculation-in-python-whats-wrong-with-this-code https://stackoverflow.com/questions/61106105/python-how-to-find-the-nth-weekday-of-the-year #### Additional context Below is a quick mock-up of the method (unoptimised, undocumented, but illustrates the functionality). ```python import pandas as pd class Period_(pd.Period): def nth_weekday(self, n:int, weekday:int, within_period:bool=True) -> pd.Timestamp : assert weekday >= 0 assert weekday <= 6 if n >= 0: diff = weekday - self.start_time.weekday() diff += 7 if diff < 0 else 0 diff = diff + n * 7 res = self.start_time + pd.Timedelta(days=diff) if within_period: if res > self.end_time: res = pd.NaT return res if n < 0: diff = weekday - self.end_time.weekday() diff -= 7 if diff > 0 else 0 diff = diff + (n+1) * 7 res = self.end_time.normalize() + pd.Timedelta(days=diff) if within_period: if res < self.start_time: res = pd.NaT return res ``` Some examples of use: ``` # third Wednesday Period_('2020-09', 'M').nth_weekday(n=2, weekday=2) # first Friday Period_('2020-09', 'M').nth_weekday(n=0, weekday=4) # last Monday Period_('2020-09', 'M').nth_weekday(n=-1, weekday=0) # sixth Tuesday --> returns NaT when within_period=True Period_('2020-09', 'M').nth_weekday(n=6, weekday=1) # sixth Tuesday --> returns a date in the next month if user explicitly # specifies within_period=False Period_('2020-09', 'M').nth_weekday(n=6, weekday=1, within_period=False) ``` Some details would need to be ironed out on how to handle frequencies less than one day (i.e. an Hour). The mock example has some protection because `within_period` defaults to `True`, so any op that goes to a different day (not the day the hour occurrs on), it will return `NaT`. ``` # Trying to shift from a smaller freq can return NaT Period_('2020-01-01 15:00', 'H').nth_weekday(n=0, weekday=3) Period_('2020-01-01 15:00', 'H').nth_weekday(n=1, weekday=2) ``` The mock still needs handling of corner cases: if you ask for the `n=0` instance of the day that the hour occurs on, you get the start_time back (rather than `NaT`). Will need to put in some thought for handling these corner cases. ``` # This hour period occurs on a Wed. If I ask for the n=0 Wed of that Period, it gives me the start_time back. Period_('2020-01-01 15:00', 'H').nth_weekday(n=0, weekday=2) ``` I'm happy to work on this but wanted to raise an issue for discussion in case there already exists such a function somewhere (couldn't find one in the pandas docs) or if it has already been proposed and decided against.
{ "+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/35472/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35472/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35473
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35473/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35473/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35473/events
https://github.com/pandas-dev/pandas/pull/35473
668,278,161
MDExOlB1bGxSZXF1ZXN0NDU4ODAxMjcx
35,473
REGR: Fix conversion of mixed dtype DataFrame to numpy str
{ "avatar_url": "https://avatars.githubusercontent.com/u/2658661?v=4", "events_url": "https://api.github.com/users/dsaxton/events{/privacy}", "followers_url": "https://api.github.com/users/dsaxton/followers", "following_url": "https://api.github.com/users/dsaxton/following{/other_user}", "gists_url": "https://api.github.com/users/dsaxton/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dsaxton", "id": 2658661, "login": "dsaxton", "node_id": "MDQ6VXNlcjI2NTg2NjE=", "organizations_url": "https://api.github.com/users/dsaxton/orgs", "received_events_url": "https://api.github.com/users/dsaxton/received_events", "repos_url": "https://api.github.com/users/dsaxton/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dsaxton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dsaxton/subscriptions", "type": "User", "url": "https://api.github.com/users/dsaxton" }
[ { "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": "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
3
2020-07-30T01:20:16Z
2020-08-08T01:14:35Z
2020-08-07T23:17:15Z
MEMBER
null
- [x] closes https://github.com/pandas-dev/pandas/issues/35455 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [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/35473/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35473/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35473.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35473", "merged_at": "2020-08-07T23:17:15Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35473.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35473" }
https://api.github.com/repos/pandas-dev/pandas/issues/35474
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35474/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35474/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35474/events
https://github.com/pandas-dev/pandas/issues/35474
668,336,003
MDU6SXNzdWU2NjgzMzYwMDM=
35,474
ENH: data frame min/max and idxmin/idxmax
{ "avatar_url": "https://avatars.githubusercontent.com/u/2670100?v=4", "events_url": "https://api.github.com/users/chrisvoncsefalvay/events{/privacy}", "followers_url": "https://api.github.com/users/chrisvoncsefalvay/followers", "following_url": "https://api.github.com/users/chrisvoncsefalvay/following{/other_user}", "gists_url": "https://api.github.com/users/chrisvoncsefalvay/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/chrisvoncsefalvay", "id": 2670100, "login": "chrisvoncsefalvay", "node_id": "MDQ6VXNlcjI2NzAxMDA=", "organizations_url": "https://api.github.com/users/chrisvoncsefalvay/orgs", "received_events_url": "https://api.github.com/users/chrisvoncsefalvay/received_events", "repos_url": "https://api.github.com/users/chrisvoncsefalvay/repos", "site_admin": false, "starred_url": "https://api.github.com/users/chrisvoncsefalvay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chrisvoncsefalvay/subscriptions", "type": "User", "url": "https://api.github.com/users/chrisvoncsefalvay" }
[ { "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": "Clarification about behavior needed to assess issue", "id": 307649777, "name": "Needs Info", "node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info" } ]
closed
false
null
[]
null
3
2020-07-30T03:29:06Z
2021-01-27T12:12:10Z
2021-01-27T12:12:10Z
NONE
null
#### Is your feature request related to a problem? I wish I could use an idxmax-like function to obtain the row and column coordinates of the minimum or maximum value. #### Describe the solution you'd like For a `DataFrame` object `df`, the proposed function `df.dfmin` would yield a tuple `(idx, col)` where `idx` would be the index of the minimum value (or a tuple of the hierarchical index's levels) and `col` the name of the column. For multiple equal values, a tuple of values could be returned. #### API breaking implications 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/35474/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35474/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35475
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35475/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35475/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35475/events
https://github.com/pandas-dev/pandas/issues/35475
668,490,194
MDU6SXNzdWU2Njg0OTAxOTQ=
35,475
BUG: Inconsistent return types for PandasArray and Series reductions
{ "avatar_url": "https://avatars.githubusercontent.com/u/57095103?v=4", "events_url": "https://api.github.com/users/marco-neumann-by/events{/privacy}", "followers_url": "https://api.github.com/users/marco-neumann-by/followers", "following_url": "https://api.github.com/users/marco-neumann-by/following{/other_user}", "gists_url": "https://api.github.com/users/marco-neumann-by/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/marco-neumann-by", "id": 57095103, "login": "marco-neumann-by", "node_id": "MDQ6VXNlcjU3MDk1MTAz", "organizations_url": "https://api.github.com/users/marco-neumann-by/orgs", "received_events_url": "https://api.github.com/users/marco-neumann-by/received_events", "repos_url": "https://api.github.com/users/marco-neumann-by/repos", "site_admin": false, "starred_url": "https://api.github.com/users/marco-neumann-by/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/marco-neumann-by/subscriptions", "type": "User", "url": "https://api.github.com/users/marco-neumann-by" }
[ { "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": "b60205", "default": false, "description": "Internal Consistency of API/Behavior", "id": 1741841389, "name": "API - Consistency", "node_id": "MDU6TGFiZWwxNzQxODQxMzg5", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/API%20-%20Consistency" }, { "color": "547c03", "default": false, "description": "sum, mean, min, max, etc.", "id": 2365504383, "name": "Reduction Operations", "node_id": "MDU6TGFiZWwyMzY1NTA0Mzgz", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reduction%20Operations" } ]
open
false
null
[]
null
2
2020-07-30T08:30:41Z
2021-08-08T19:29:50Z
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 of pandas (`1.1.0`) - [X] (optional) I have confirmed this bug exists on the master branch of pandas. (`3b1d4f1eef46a45b7d32694bb263a2e40a933e74`) --- #### Code Sample, a copy-pastable example ```python import numpy as np import pandas as pd from pandas.arrays import PandasArray # ==== array: empty case ==== # The following could also be archived with public-only APIs: # array_empty = pd.Series([], dtype=float).array array_empty = PandasArray._from_sequence([], dtype=float) assert type(array_empty.mean()) == float assert type(array_empty.median()) == float assert type(array_empty.sum()) == np.float64 assert type(array_empty.min()) == type(pd.NA) assert type(array_empty.max()) == type(pd.NA) # ==== array: single value case ==== # The following could also be archived with public-only APIs: # array_single = pd.Series([1.0], dtype=float).array array_single = PandasArray._from_sequence([1.0], dtype=float) if pd.__version__ == "1.1.0": assert type(array_single.mean()) == np.float64 assert type(array_single.median()) == np.float64 else: # master (3b1d4f1eef46a45b7d32694bb263a2e40a933e74) assert type(array_single.mean()) == float assert type(array_single.median()) == float assert type(array_single.sum()) == np.float64 assert type(array_single.min()) == np.float64 assert type(array_single.max()) == np.float64 # ==== series: empty case ==== series_empty = pd.Series([], dtype=float) assert type(series_empty.mean()) == float assert type(series_empty.median()) == float assert type(series_empty.sum()) == np.float64 assert type(series_empty.min()) == float assert type(series_empty.max()) == float # ==== series: single value case ==== series_single = pd.Series([1.0], dtype=float) if pd.__version__ == "1.1.0": assert type(series_single.mean()) == np.float64 assert type(series_single.median()) == np.float64 else: # master (3b1d4f1eef46a45b7d32694bb263a2e40a933e74) assert type(series_single.mean()) == float assert type(series_single.median()) == float assert type(series_single.sum()) == np.float64 if pd.__version__ == "1.1.0": assert type(series_single.min()) == np.float64 assert type(series_single.max()) == np.float64 else: # master (3b1d4f1eef46a45b7d32694bb263a2e40a933e74) assert type(series_single.min()) == float assert type(series_single.max()) == float ``` #### Problem description As shown above, the return types for `PandasArray`s is highly inconsistent within the case as well as compared to the non-empty case. This also extends to the `Series` cases, where I don't understand the behavior at all, especially when looking the outputs from `master`. #### Expected Output A single output type (either `np.float64`) or `pd.NA`? To be honest, I am not sure what the expected outcome is, but it would be good to clarify that because other extension arrays should probably implement the same behavior. #### Output of ``pd.show_versions()`` <details> ```text INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.8.5.final.0 python-bits : 64 OS : Darwin OS-release : 19.6.0 Version : Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 machine : x86_64 processor : i386 byteorder : little LC_ALL : en_US.UTF-8 LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.1.0 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 47.1.0 Cython : None pytest : 6.0.0 hypothesis : None sphinx : 3.1.2 blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.11.2 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 pytables : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None numba : 0.50.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/35475/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35475/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35476
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35476/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35476/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35476/events
https://github.com/pandas-dev/pandas/issues/35476
668,752,044
MDU6SXNzdWU2Njg3NTIwNDQ=
35,476
BUG: Bug with Alpine installation
{ "avatar_url": "https://avatars.githubusercontent.com/u/32329685?v=4", "events_url": "https://api.github.com/users/AminovE99/events{/privacy}", "followers_url": "https://api.github.com/users/AminovE99/followers", "following_url": "https://api.github.com/users/AminovE99/following{/other_user}", "gists_url": "https://api.github.com/users/AminovE99/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AminovE99", "id": 32329685, "login": "AminovE99", "node_id": "MDQ6VXNlcjMyMzI5Njg1", "organizations_url": "https://api.github.com/users/AminovE99/orgs", "received_events_url": "https://api.github.com/users/AminovE99/received_events", "repos_url": "https://api.github.com/users/AminovE99/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AminovE99/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AminovE99/subscriptions", "type": "User", "url": "https://api.github.com/users/AminovE99" }
[ { "color": "75507B", "default": false, "description": "Library building on various platforms", "id": 129350, "name": "Build", "node_id": "MDU6TGFiZWwxMjkzNTA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Build" } ]
closed
false
null
[]
null
5
2020-07-30T13:53:11Z
2020-09-04T17:03:34Z
2020-07-30T15:59:54Z
NONE
null
- [ ] I have checked that this issue has not already been reported. - [ ] I have confirmed this bug exists on the latest version of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python # Your code here ``` #### Problem description I work on frappe framework and I have `docker-erpnext` to deploy application. When I tried to install pandas library on my linux (alpine) system, I received error: https://travis-ci.org/github/Monogramm/docker-erpnext/jobs/713250724#L4417 By the way, this library can be installed on debian and debian-slim, but cannot be installed on alpine. I already checked problem #7512 but it did not helped to me. #### Expected Output Pandas should be installed #### Output of ``pd.show_versions()`` `pandas==0.24.2` version of python: 3.7 <details> [paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag] </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/35476/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35476/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35477
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35477/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35477/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35477/events
https://github.com/pandas-dev/pandas/pull/35477
668,766,204
MDExOlB1bGxSZXF1ZXN0NDU5MjEzNjg4
35,477
MAINT: Use float arange when required or intended
{ "avatar_url": "https://avatars.githubusercontent.com/u/5585221?v=4", "events_url": "https://api.github.com/users/bashtage/events{/privacy}", "followers_url": "https://api.github.com/users/bashtage/followers", "following_url": "https://api.github.com/users/bashtage/following{/other_user}", "gists_url": "https://api.github.com/users/bashtage/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bashtage", "id": 5585221, "login": "bashtage", "node_id": "MDQ6VXNlcjU1ODUyMjE=", "organizations_url": "https://api.github.com/users/bashtage/orgs", "received_events_url": "https://api.github.com/users/bashtage/received_events", "repos_url": "https://api.github.com/users/bashtage/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bashtage/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bashtage/subscriptions", "type": "User", "url": "https://api.github.com/users/bashtage" }
[ { "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": "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": "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": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
5
2020-07-30T14:05:09Z
2020-08-01T08:46:01Z
2020-07-30T18:45:46Z
CONTRIBUTOR
null
Ensure arange is float when intened or required by NumPy - [X] passes `black pandas` - [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [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/35477/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35477/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35477.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35477", "merged_at": "2020-07-30T18:45:46Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35477.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35477" }
https://api.github.com/repos/pandas-dev/pandas/issues/35478
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35478/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35478/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35478/events
https://github.com/pandas-dev/pandas/pull/35478
668,855,598
MDExOlB1bGxSZXF1ZXN0NDU5Mjk0Mjkz
35,478
DatetimeIndex get_loc validates date object
{ "avatar_url": "https://avatars.githubusercontent.com/u/1223213?v=4", "events_url": "https://api.github.com/users/knabben/events{/privacy}", "followers_url": "https://api.github.com/users/knabben/followers", "following_url": "https://api.github.com/users/knabben/following{/other_user}", "gists_url": "https://api.github.com/users/knabben/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/knabben", "id": 1223213, "login": "knabben", "node_id": "MDQ6VXNlcjEyMjMyMTM=", "organizations_url": "https://api.github.com/users/knabben/orgs", "received_events_url": "https://api.github.com/users/knabben/received_events", "repos_url": "https://api.github.com/users/knabben/repos", "site_admin": false, "starred_url": "https://api.github.com/users/knabben/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/knabben/subscriptions", "type": "User", "url": "https://api.github.com/users/knabben" }
[ { "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": "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": "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
[]
null
15
2020-07-30T15:17:43Z
2020-11-04T16:55:11Z
2020-11-04T16:55:11Z
CONTRIBUTOR
null
- [ ] closes #35466 - [ ] tests added / passed - [ ] passes `black pandas` - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry Adding the date object try cast in get_loc.
{ "+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/35478/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35478/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35478.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35478", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35478.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35478" }
https://api.github.com/repos/pandas-dev/pandas/issues/35479
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35479/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35479/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35479/events
https://github.com/pandas-dev/pandas/issues/35479
668,939,597
MDU6SXNzdWU2Njg5Mzk1OTc=
35,479
BUG: Nonintuitive behaviour when indexing with a constant boolean function
{ "avatar_url": "https://avatars.githubusercontent.com/u/21868012?v=4", "events_url": "https://api.github.com/users/onnoeberhard/events{/privacy}", "followers_url": "https://api.github.com/users/onnoeberhard/followers", "following_url": "https://api.github.com/users/onnoeberhard/following{/other_user}", "gists_url": "https://api.github.com/users/onnoeberhard/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/onnoeberhard", "id": 21868012, "login": "onnoeberhard", "node_id": "MDQ6VXNlcjIxODY4MDEy", "organizations_url": "https://api.github.com/users/onnoeberhard/orgs", "received_events_url": "https://api.github.com/users/onnoeberhard/received_events", "repos_url": "https://api.github.com/users/onnoeberhard/repos", "site_admin": false, "starred_url": "https://api.github.com/users/onnoeberhard/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/onnoeberhard/subscriptions", "type": "User", "url": "https://api.github.com/users/onnoeberhard" }
[ { "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
[]
{ "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
2020-07-30T16:29:25Z
2020-07-30T20:46:41Z
2020-07-30T20:46:30Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample, a copy-pastable example ```python import pandas as pd series = pd.Series([1, 2, 3]) x = series[lambda s: s > 2] # Indexing with a boolean function, works like a charm y = series[lambda s: True] # Indexing with a constant boolean function --> results in KeyError: True ``` #### Problem description I would expect `y` to be equal to `series` in this example, because the callable function passed to `__getitem__` returns True for all items in the Series. The same error arises when using a DataFrame. I know in this example, it seems like the function would be useless, because it would just return `series`, but in my use case the function that is passed to `__getitem__` is actually a 'filter' function argument, and it would be very convenient to just turn off the filter by passing `lambda df: True` as the filter function. A quick workaround I found useful is: ```python import numpy as np y = series[lambda s: np.full(len(s), True)] ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.8.3.final.0 python-bits : 64 OS : Linux OS-release : 5.3.0-1030-aws Version : #32~18.04.1-Ubuntu SMP Tue Jun 30 23:04:16 UTC 2020 machine : x86_64 processor : byteorder : little LC_ALL : en_US.UTF-8 LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.1.0 numpy : 1.19.0 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 47.1.1 Cython : 0.29.21 pytest : 5.4.3 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : 1.2.9 lxml.etree : None html5lib : None pymysql : 0.9.3 psycopg2 : 2.8.5 (dt dec pq3 ext lo64) jinja2 : 2.11.2 IPython : 7.16.1 pandas_datareader: None bs4 : 4.9.1 bottleneck : None fsspec : 0.7.4 fastparquet : None gcsfs : None matplotlib : 3.2.2 numexpr : 2.7.1 odfpy : None openpyxl : 3.0.4 pandas_gbq : None pyarrow : 0.17.1 pytables : None pyxlsb : None s3fs : 0.4.2 scipy : 1.4.1 sqlalchemy : 1.3.13 tables : 3.6.1 tabulate : 0.8.7 xarray : 0.15.1 xlrd : 1.2.0 xlwt : None numba : 0.50.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/35479/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35479/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35480
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35480/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35480/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35480/events
https://github.com/pandas-dev/pandas/issues/35480
668,982,753
MDU6SXNzdWU2Njg5ODI3NTM=
35,480
BUG:weekofyear error,The last three days of 2008 are considered the first week
{ "avatar_url": "https://avatars.githubusercontent.com/u/508885?v=4", "events_url": "https://api.github.com/users/princelai/events{/privacy}", "followers_url": "https://api.github.com/users/princelai/followers", "following_url": "https://api.github.com/users/princelai/following{/other_user}", "gists_url": "https://api.github.com/users/princelai/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/princelai", "id": 508885, "login": "princelai", "node_id": "MDQ6VXNlcjUwODg4NQ==", "organizations_url": "https://api.github.com/users/princelai/orgs", "received_events_url": "https://api.github.com/users/princelai/received_events", "repos_url": "https://api.github.com/users/princelai/repos", "site_admin": false, "starred_url": "https://api.github.com/users/princelai/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/princelai/subscriptions", "type": "User", "url": "https://api.github.com/users/princelai" }
[ { "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
1
2020-07-30T17:09:09Z
2021-02-07T08:07:44Z
2020-07-30T19:01:55Z
NONE
null
- [Yes ] I have checked that this issue has not already been reported. - [ No] I have confirmed this bug exists on the latest version of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python y = pd.Series(pd.date_range(start='2008-12-27',periods=7,freq='D')) y.dt.isocalendar().week ``` #### Problem description This is an obvious mistake, isn't it? | | d | w | |---:|:--------------------|----:| | 0 | 2008-12-27 00:00:00 | 52 | | 1 | 2008-12-28 00:00:00 | 52 | | 2 | 2008-12-29 00:00:00 | 1 | | 3 | 2008-12-30 00:00:00 | 1 | | 4 | 2008-12-31 00:00:00 | 1 | | 5 | 2009-01-01 00:00:00 | 1 | | 6 | 2009-01-02 00:00:00 | 1 | #### Expected Output | | d | w | |---:|:--------------------|----:| | 0 | 2008-12-27 00:00:00 | 52 | | 1 | 2008-12-28 00:00:00 | 52 | | 2 | 2008-12-29 00:00:00 | 52 | | 3 | 2008-12-30 00:00:00 | 52 | | 4 | 2008-12-31 00:00:00 | 52 | | 5 | 2009-01-01 00:00:00 | 1 | | 6 | 2009-01-02 00:00:00 | 1 | #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.8.3.final.0 python-bits : 64 OS : Linux OS-release : 5.4.53-1-MANJARO Version : #1 SMP PREEMPT Wed Jul 22 15:04:56 UTC 2020 machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.1.0 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 20.2 setuptools : 49.2.0 Cython : 0.29.21 pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.5.2 html5lib : None pymysql : 0.10.0 psycopg2 : 2.8.5 (dt dec pq3 ext lo64) jinja2 : 2.11.2 IPython : 7.16.1 pandas_datareader: None bs4 : 4.9.1 bottleneck : None fsspec : None fastparquet : None gcsfs : None matplotlib : 3.3.0 numexpr : 2.7.1 odfpy : None openpyxl : 3.0.4 pandas_gbq : None pyarrow : 1.0.0 pytables : None pyxlsb : None s3fs : None scipy : 1.5.2 sqlalchemy : 1.3.18 tables : 3.6.1 tabulate : 0.8.7 xarray : None xlrd : 1.2.0 xlwt : None numba : 0.50.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/35480/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35480/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35481
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35481/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35481/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35481/events
https://github.com/pandas-dev/pandas/issues/35481
669,094,727
MDU6SXNzdWU2NjkwOTQ3Mjc=
35,481
Numpydev CI Failures
{ "avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4", "events_url": "https://api.github.com/users/WillAyd/events{/privacy}", "followers_url": "https://api.github.com/users/WillAyd/followers", "following_url": "https://api.github.com/users/WillAyd/following{/other_user}", "gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/WillAyd", "id": 609873, "login": "WillAyd", "node_id": "MDQ6VXNlcjYwOTg3Mw==", "organizations_url": "https://api.github.com/users/WillAyd/orgs", "received_events_url": "https://api.github.com/users/WillAyd/received_events", "repos_url": "https://api.github.com/users/WillAyd/repos", "site_admin": false, "starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions", "type": "User", "url": "https://api.github.com/users/WillAyd" }
[ { "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": "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
[]
null
27
2020-07-30T19:05:35Z
2021-08-08T19:34:55Z
2021-08-08T19:34:54Z
MEMBER
null
It looks like some `.intersection` tests are failing. AFAICT this traces back to here: https://github.com/pandas-dev/pandas/blob/bdcc5bffaadb7488474b65554c4e8e96a00aa4af/pandas/_libs/lib.pyx#L685 Which on numpy dev during test execution isn't raising an `OverflowError` and instead performs a wraparound. Interestingly enough, running: ```python np.asarray([2 ** 63, 2**63 + 1], dtype="int64") ``` With numpydev does overflow in the Python space, so perhaps a Cython issue?
{ "+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/35481/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35481/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35482
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35482/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35482/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35482/events
https://github.com/pandas-dev/pandas/issues/35482
669,159,970
MDU6SXNzdWU2NjkxNTk5NzA=
35,482
ENH: add tseries.offsets prefix_mapping to public API
{ "avatar_url": "https://avatars.githubusercontent.com/u/2574498?v=4", "events_url": "https://api.github.com/users/machow/events{/privacy}", "followers_url": "https://api.github.com/users/machow/followers", "following_url": "https://api.github.com/users/machow/following{/other_user}", "gists_url": "https://api.github.com/users/machow/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/machow", "id": 2574498, "login": "machow", "node_id": "MDQ6VXNlcjI1NzQ0OTg=", "organizations_url": "https://api.github.com/users/machow/orgs", "received_events_url": "https://api.github.com/users/machow/received_events", "repos_url": "https://api.github.com/users/machow/repos", "site_admin": false, "starred_url": "https://api.github.com/users/machow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/machow/subscriptions", "type": "User", "url": "https://api.github.com/users/machow" }
[ { "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": "0052cc", "default": false, "description": "DateOffsets", "id": 53181044, "name": "Frequency", "node_id": "MDU6TGFiZWw1MzE4MTA0NA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency" } ]
open
false
null
[]
null
2
2020-07-30T20:19:32Z
2021-08-08T19:35:59Z
null
NONE
null
#### Is your feature request related to a problem? Currently, a user can use the abbreviation for an offset (e.g. "W" for week) in various methods, and will see offsets used in the docs, but the mapping from abbreviation to offset (pandas._libs.tslibs.offsets.prefix_mappings) is not public. It doesn't seem possible to answer through the public API: "what offset does this abbreviation correspond to?" I noticed that there is a [table in the user guide](https://github.com/pandas-dev/pandas/blob/master/doc/source/user_guide/timeseries.rst#dateoffset-objects) that seems to summarize the info contained in prefix_mapping, which is really helpful! However, it would be useful to access it programmatically (e.g. for programmatically listing options to a user). #### Describe the solution you'd like What do you think about moving `prefix_mapping` back into pandas.tseries.offsets.prefix_mapping, and making it part of the public API? Based on the docs, it sounds like including it in the "Date offsets" section of the API docs would be sufficient for it to be considered public. #### API breaking implications It seems like this action would carry the same risk of API breaking as using the abbreviations in methods like `to_period()` and `as_freq()`, so shouldn't create additional risk (but could be totally wrong here :). #### Describe alternatives you've considered The other option would be to put the abbreviation info onto the offset classes themselves, so that the mappings emerge from the classes, but that seems like it'd be a much bigger change!
{ "+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/35482/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35482/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35483
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35483/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35483/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35483/events
https://github.com/pandas-dev/pandas/issues/35483
669,235,701
MDU6SXNzdWU2NjkyMzU3MDE=
35,483
QST: is the new behavior of df.apply(my_func, axis=1) in v1.1.0 intended?
{ "avatar_url": "https://avatars.githubusercontent.com/u/15459064?v=4", "events_url": "https://api.github.com/users/manihamidi/events{/privacy}", "followers_url": "https://api.github.com/users/manihamidi/followers", "following_url": "https://api.github.com/users/manihamidi/following{/other_user}", "gists_url": "https://api.github.com/users/manihamidi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/manihamidi", "id": 15459064, "login": "manihamidi", "node_id": "MDQ6VXNlcjE1NDU5MDY0", "organizations_url": "https://api.github.com/users/manihamidi/orgs", "received_events_url": "https://api.github.com/users/manihamidi/received_events", "repos_url": "https://api.github.com/users/manihamidi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/manihamidi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/manihamidi/subscriptions", "type": "User", "url": "https://api.github.com/users/manihamidi" }
[ { "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" } ]
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
2020-07-30T22:10:51Z
2020-07-31T13:12:38Z
2020-07-31T13:12:09Z
NONE
null
- [x] I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) on StackOverflow for similar questions. - [x] I have asked my usage related question on [StackOverflow](https://stackoverflow.com). --- #### Question about pandas ```python import pandas as pd def test_func(row): row['c'] = str(row['a']) + str(row['b']) row['d'] = row['a'] + 1 return row df = pd.DataFrame({'a': [1,2,3], 'b': ['i','j', 'k']}) df.apply(test_func, axis=1) ``` The above code ran on pandas 1.1.0 returns: ``` a b c d 0 1 i 1i 2 1 1 i 1i 2 2 1 i 1i 2 ``` While in pandas 1.0.5 it returns: ``` a b c d 0 1 i 1i 2 1 2 j 2j 3 2 3 k 3k 4 ``` Using python 3.8.3 and IPython 7.16.1. ## The Question: :question: What is the right way of getting the v1.0.5 behavior in v1.1.0? I did see this release note but honestly can't figure out if this is an intended/unintended side effect of it: https://pandas.pydata.org/pandas-docs/stable/whatsnew/v1.1.0.html#apply-and-applymap-on-dataframe-evaluates-first-row-column-only-once thanks
{ "+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/35483/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35483/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35484
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35484/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35484/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35484/events
https://github.com/pandas-dev/pandas/issues/35484
669,239,940
MDU6SXNzdWU2NjkyMzk5NDA=
35,484
BUG: read_sql no longer works simply with SqlAlchemy selectables and a quick fix
{ "avatar_url": "https://avatars.githubusercontent.com/u/2574498?v=4", "events_url": "https://api.github.com/users/machow/events{/privacy}", "followers_url": "https://api.github.com/users/machow/followers", "following_url": "https://api.github.com/users/machow/following{/other_user}", "gists_url": "https://api.github.com/users/machow/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/machow", "id": 2574498, "login": "machow", "node_id": "MDQ6VXNlcjI1NzQ0OTg=", "organizations_url": "https://api.github.com/users/machow/orgs", "received_events_url": "https://api.github.com/users/machow/received_events", "repos_url": "https://api.github.com/users/machow/repos", "site_admin": false, "starred_url": "https://api.github.com/users/machow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/machow/subscriptions", "type": "User", "url": "https://api.github.com/users/machow" }
[ { "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": "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" }, { "color": "cdea3c", "default": false, "description": "Unit test(s) needed to prevent regressions", "id": 986278782, "name": "Needs Tests", "node_id": "MDU6TGFiZWw5ODYyNzg3ODI=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Tests" } ]
open
false
null
[]
null
3
2020-07-30T22:15:00Z
2021-08-08T19:38:03Z
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 of pandas. - [x] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample, a copy-pastable example Hey--I noticed while running [siuba's](https://github.com/machow/siuba) SQL unit tests that queries using the modulo operator are failing. The issue is due to a recent change for issue #34211 in pandas setting the [no_parameters](https://github.com/pandas-dev/pandas/blame/5507452c4a675ad5453bc5f02cd68b65fe3977df/pandas/io/sql.py#L1161) argument before executing via a sqlalchemy engine. This was done to allow queries like `SELECT 1 % 2`, but causes SqlAlchemy expressions handling `%` to not always work with `read_sql`. **Solution**. Rather than executing in a special way (`no_parameters`), I think you want to wrap a string query in SqlAlchemy.sql.text ([see here](https://docs.sqlalchemy.org/en/13/core/tutorial.html#using-textual-sql)). This will allow both queries with `%` and the full range of SqlAlchemy expressions. WDYT? ```python from sqlalchemy import sql, create_engine import pandas as pd engine = create_engine('postgresql://postgres:@localhost:5433/postgres', echo=False) #engine = create_engine('postgresql://USERNAME:PASSWORD@localhost:PORT/DBNAME', echo=False) # doesn't work, original issue in pandas: 'dict' object does not support indexing engine.execute("SELECT 1 % 2") # works, ideal solution engine.execute(sql.text("SELECT 1 % 2" )) # queries below broken by no_parameters change ---- pd.read_sql(sql.text("SELECT 1 % 2"), engine) pd.read_sql(sql.select([sql.literal(1) % sql.literal(2)]), engine) ``` Here's a gist of the error for the last two queries... ``` ProgrammingError: (psycopg2.errors.UndefinedFunction) operator does not exist: integer %% integer LINE 1: SELECT 1 %% 2 ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts. [SQL: SELECT 1 %% 2] (Background on this error at: http://sqlalche.me/e/13/f405) ``` Full traceback in the details <details> ``` --------------------------------------------------------------------------- UndefinedFunction Traceback (most recent call last) ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _execute_context(self, dialect, constructor, statement, parameters, *args) 1267 self.dialect.do_execute_no_params( -> 1268 cursor, statement, context 1269 ) ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/engine/default.py in do_execute_no_params(self, cursor, statement, context) 595 def do_execute_no_params(self, cursor, statement, context=None): --> 596 cursor.execute(statement) 597 UndefinedFunction: operator does not exist: integer %% integer LINE 1: SELECT 1 %% 2 ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts. The above exception was the direct cause of the following exception: ProgrammingError Traceback (most recent call last) <ipython-input-6-5831ea4e198c> in <module> ----> 1 pd.read_sql(sql.text("SELECT 1 % 2"), engine) ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/pandas/io/sql.py in read_sql(sql, con, index_col, coerce_float, params, parse_dates, columns, chunksize) 513 coerce_float=coerce_float, 514 parse_dates=parse_dates, --> 515 chunksize=chunksize, 516 ) 517 ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/pandas/io/sql.py in read_query(self, sql, index_col, coerce_float, parse_dates, params, chunksize) 1293 args = _convert_params(sql, params) 1294 -> 1295 result = self.execute(*args) 1296 columns = result.keys() 1297 ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/pandas/io/sql.py in execute(self, *args, **kwargs) 1160 """Simple passthrough to SQLAlchemy connectable""" 1161 return self.connectable.execution_options(no_parameters=True).execute( -> 1162 *args, **kwargs 1163 ) 1164 ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py in execute(self, statement, *multiparams, **params) 2236 2237 connection = self._contextual_connect(close_with_result=True) -> 2238 return connection.execute(statement, *multiparams, **params) 2239 2240 def scalar(self, statement, *multiparams, **params): ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py in execute(self, object_, *multiparams, **params) 1012 ) 1013 else: -> 1014 return meth(self, multiparams, params) 1015 1016 def _execute_function(self, func, multiparams, params): ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/sql/elements.py in _execute_on_connection(self, connection, multiparams, params) 296 def _execute_on_connection(self, connection, multiparams, params): 297 if self.supports_execution: --> 298 return connection._execute_clauseelement(self, multiparams, params) 299 else: 300 raise exc.ObjectNotExecutableError(self) ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _execute_clauseelement(self, elem, multiparams, params) 1131 distilled_params, 1132 compiled_sql, -> 1133 distilled_params, 1134 ) 1135 if self._has_events or self.engine._has_events: ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _execute_context(self, dialect, constructor, statement, parameters, *args) 1316 except BaseException as e: 1317 self._handle_dbapi_exception( -> 1318 e, statement, parameters, cursor, context 1319 ) 1320 ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _handle_dbapi_exception(self, e, statement, parameters, cursor, context) 1510 elif should_wrap: 1511 util.raise_( -> 1512 sqlalchemy_exception, with_traceback=exc_info[2], from_=e 1513 ) 1514 else: ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/util/compat.py in raise_(***failed resolving arguments***) 176 177 try: --> 178 raise exception 179 finally: 180 # credit to ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _execute_context(self, dialect, constructor, statement, parameters, *args) 1266 if not evt_handled: 1267 self.dialect.do_execute_no_params( -> 1268 cursor, statement, context 1269 ) 1270 else: ~/Dropbox/Repo/siuba/env/lib/python3.6/site-packages/sqlalchemy/engine/default.py in do_execute_no_params(self, cursor, statement, context) 594 595 def do_execute_no_params(self, cursor, statement, context=None): --> 596 cursor.execute(statement) 597 598 def is_disconnect(self, e, connection, cursor): ProgrammingError: (psycopg2.errors.UndefinedFunction) operator does not exist: integer %% integer LINE 1: SELECT 1 %% 2 ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts. [SQL: SELECT 1 %% 2] (Background on this error at: http://sqlalche.me/e/13/f405) ``` </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/35484/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35484/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35485
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35485/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35485/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35485/events
https://github.com/pandas-dev/pandas/pull/35485
669,250,276
MDExOlB1bGxSZXF1ZXN0NDU5NjQ3NjIy
35,485
MAINT: Fix broadcasting of arrays
{ "avatar_url": "https://avatars.githubusercontent.com/u/5585221?v=4", "events_url": "https://api.github.com/users/bashtage/events{/privacy}", "followers_url": "https://api.github.com/users/bashtage/followers", "following_url": "https://api.github.com/users/bashtage/following{/other_user}", "gists_url": "https://api.github.com/users/bashtage/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bashtage", "id": 5585221, "login": "bashtage", "node_id": "MDQ6VXNlcjU1ODUyMjE=", "organizations_url": "https://api.github.com/users/bashtage/orgs", "received_events_url": "https://api.github.com/users/bashtage/received_events", "repos_url": "https://api.github.com/users/bashtage/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bashtage/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bashtage/subscriptions", "type": "User", "url": "https://api.github.com/users/bashtage" }
[]
closed
false
null
[]
null
4
2020-07-30T22:29:36Z
2020-08-03T15:12:40Z
2020-08-03T15:12:40Z
CONTRIBUTOR
null
Prevent empty object arrays from being broadcast - [X] closes #35481 - [X] tests added / passed - [X] passes `black pandas` - [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] 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/35485/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35485/timeline
null
1
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35485.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35485", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35485.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35485" }
https://api.github.com/repos/pandas-dev/pandas/issues/35486
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35486/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35486/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35486/events
https://github.com/pandas-dev/pandas/issues/35486
669,391,946
MDU6SXNzdWU2NjkzOTE5NDY=
35,486
QST: is the new behavior of GroupByRolling in v1.1.0 intended?
{ "avatar_url": "https://avatars.githubusercontent.com/u/44108233?v=4", "events_url": "https://api.github.com/users/itholic/events{/privacy}", "followers_url": "https://api.github.com/users/itholic/followers", "following_url": "https://api.github.com/users/itholic/following{/other_user}", "gists_url": "https://api.github.com/users/itholic/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/itholic", "id": 44108233, "login": "itholic", "node_id": "MDQ6VXNlcjQ0MTA4MjMz", "organizations_url": "https://api.github.com/users/itholic/orgs", "received_events_url": "https://api.github.com/users/itholic/received_events", "repos_url": "https://api.github.com/users/itholic/repos", "site_admin": false, "starred_url": "https://api.github.com/users/itholic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/itholic/subscriptions", "type": "User", "url": "https://api.github.com/users/itholic" }
[ { "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": "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": "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" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
2
2020-07-31T04:13:37Z
2020-08-06T17:45:20Z
2020-08-06T17:45:20Z
NONE
null
#### Question about pandas Let's say we have a `DataFrame` like the below. ```python >>> pdf = pd.DataFrame({"a": [1, 2, 3, 2], "b": [4.0, 2.0, 3.0, 1.0], "c": [10, 20, 30, 20]}) >>> pdf a b c 0 1 4.0 10 1 2 2.0 20 2 3 3.0 30 3 2 1.0 20 ``` Then, when I use `GroupByRolling`, In the version of pandas <= 1.0.5 shows result as below. ```python >>> pdf.groupby('a')[['b']].rolling(2).max() b a 1 0 NaN 3 2 NaN 2 1 NaN 3 2.0 ``` However, In the pandas 1.1.0, the result seems different from the previous version as below. ```python >>> pdf.groupby('a')[['b']].rolling(2).max() a b c a 1 0 NaN NaN NaN 2 1 NaN NaN NaN 3 2.0 2.0 20.0 3 2 NaN NaN NaN ``` Could someone let me know Is it intended? or unexpected behavior (maybe kind of bug) ? Thanks :)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 1, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/35486/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35486/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35487
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35487/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35487/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35487/events
https://github.com/pandas-dev/pandas/issues/35487
669,496,322
MDU6SXNzdWU2Njk0OTYzMjI=
35,487
ENH: Add different reference epochs for to_julian_date() as an argument
{ "avatar_url": "https://avatars.githubusercontent.com/u/1121668?v=4", "events_url": "https://api.github.com/users/ioshchepkov/events{/privacy}", "followers_url": "https://api.github.com/users/ioshchepkov/followers", "following_url": "https://api.github.com/users/ioshchepkov/following{/other_user}", "gists_url": "https://api.github.com/users/ioshchepkov/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ioshchepkov", "id": 1121668, "login": "ioshchepkov", "node_id": "MDQ6VXNlcjExMjE2Njg=", "organizations_url": "https://api.github.com/users/ioshchepkov/orgs", "received_events_url": "https://api.github.com/users/ioshchepkov/received_events", "repos_url": "https://api.github.com/users/ioshchepkov/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ioshchepkov/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ioshchepkov/subscriptions", "type": "User", "url": "https://api.github.com/users/ioshchepkov" }
[ { "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" } ]
open
false
null
[]
null
1
2020-07-31T07:13:26Z
2021-08-08T19:38:30Z
null
NONE
null
There are a lot of starting points (epochs), which leads to different modifications of the Julian date. It can help save memory and disk space in a very long time-series, because it will use less digits in the representation. Good list: [https://en.wikipedia.org/wiki/Julian_day#Variants](https://en.wikipedia.org/wiki/Julian_day#Variants) The use case will be something like this: ```python tm = pd.Timestamp('2018-01-05') tm_jd = tm.to_julian_date() # Julian Date tm_mjd = tm.to_julian_date(kind='MJD') # Modified Julian Date tm_tjd = tm.to_julian_date(kind='TJD') # Truncated Julian Date ``` I'm not sure about the name `kind=` and is it necessary to add arbitrary epoch as `pandas.Timestamp` object.
{ "+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/35487/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35487/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35488
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35488/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35488/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35488/events
https://github.com/pandas-dev/pandas/issues/35488
669,526,998
MDU6SXNzdWU2Njk1MjY5OTg=
35,488
BUG: Shift on DataFrame which has more than 1 block creates wrong result
{ "avatar_url": "https://avatars.githubusercontent.com/u/357506?v=4", "events_url": "https://api.github.com/users/qinxuye/events{/privacy}", "followers_url": "https://api.github.com/users/qinxuye/followers", "following_url": "https://api.github.com/users/qinxuye/following{/other_user}", "gists_url": "https://api.github.com/users/qinxuye/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qinxuye", "id": 357506, "login": "qinxuye", "node_id": "MDQ6VXNlcjM1NzUwNg==", "organizations_url": "https://api.github.com/users/qinxuye/orgs", "received_events_url": "https://api.github.com/users/qinxuye/received_events", "repos_url": "https://api.github.com/users/qinxuye/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qinxuye/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qinxuye/subscriptions", "type": "User", "url": "https://api.github.com/users/qinxuye" }
[ { "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": "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": "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" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
1
2020-07-31T07:49:59Z
2020-08-07T11:45:49Z
2020-08-07T11:45:49Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python # Your code here In [1]: import pandas as pd In [2]: import numpy as np In [3]: df1 = pd.DataFrame(np.random.randint(1000, size=(5, 3))) In [4]: df2 = pd.DataFrame(np.random.randint(1000, size=(5, 2))) In [5]: df3 = pd.concat([df1, df2], axis=1) In [6]: df3 Out[6]: 0 1 2 0 1 0 61 536 154 766 179 1 484 18 15 787 766 2 391 171 715 836 654 3 914 969 765 824 950 4 169 414 759 16 666 In [7]: len(df3._data.blocks) Out[7]: 2 In [9]: df3.shift(2, axis=1) Out[9]: 0 1 2 0 1 0 NaN NaN 61.0 NaN NaN 1 NaN NaN 484.0 NaN NaN 2 NaN NaN 391.0 NaN NaN 3 NaN NaN 914.0 NaN NaN 4 NaN NaN 169.0 NaN NaN ``` #### Problem description [this should explain **why** the current behaviour is a problem and why the expected output is a better solution] I guess `shift` is applied to both of the internal blocks. #### Expected Output I forced consolidate, the result is right. ``` In [12]: df3._data._consolidate_inplace() In [13]: df3.shift(2, axis=1) Out[13]: 0 1 2 0 1 0 NaN NaN 61.0 536.0 154.0 1 NaN NaN 484.0 18.0 15.0 2 NaN NaN 391.0 171.0 715.0 3 NaN NaN 914.0 969.0 765.0 4 NaN NaN 169.0 414.0 759.0 ``` #### Output of ``pd.show_versions()`` <details> In [14]: pd.show_versions() /Users/qinxuye/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/setuptools/distutils_patch.py:26: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first. "Distutils was imported before Setuptools. This usage is discouraged " --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-14-3d232a07e144> in <module> ----> 1 pd.show_versions() ~/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/pandas/util/_print_versions.py in show_versions(as_json) 104 """ 105 sys_info = _get_sys_info() --> 106 deps = _get_dependency_info() 107 108 if as_json: ~/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/pandas/util/_print_versions.py in _get_dependency_info() 82 for modname in deps: 83 mod = import_optional_dependency( ---> 84 modname, raise_on_missing=False, on_version="ignore" 85 ) 86 result[modname] = _get_version(mod) if mod else None ~/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/pandas/compat/_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version) 97 minimum_version = VERSIONS.get(name) 98 if minimum_version: ---> 99 version = _get_version(module) 100 if distutils.version.LooseVersion(version) < minimum_version: 101 assert on_version in {"warn", "raise", "ignore"} ~/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/pandas/compat/_optional.py in _get_version(module) 42 43 if version is None: ---> 44 raise ImportError(f"Can't determine version for {module.__name__}") 45 return version 46 ImportError: Can't determine version for numba </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/35488/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35488/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35489
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35489/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35489/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35489/events
https://github.com/pandas-dev/pandas/issues/35489
669,616,546
MDU6SXNzdWU2Njk2MTY1NDY=
35,489
RLS: 1.1.1
{ "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": "006b75", "default": false, "description": null, "id": 131473665, "name": "Release", "node_id": "MDU6TGFiZWwxMzE0NzM2NjU=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Release" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
35
2020-07-31T09:31:19Z
2020-08-25T11:21:57Z
2020-08-25T06:31:23Z
MEMBER
null
Tracking issue for the 1.1.1 release. https://github.com/pandas-dev/pandas/milestone/75 Please do not remove/change milestones from these issues without a note explaining the reasoning (changing milestones doesn't trigger notification) All issues raised that are regressions from 1.0.5 should be milestoned 1.1.1. Post 1.1.1 release, unclosed issues from this list can be changed to 1.1.2 to maintain the tracking or reviewed.
{ "+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/35489/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35489/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35490
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35490/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35490/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35490/events
https://github.com/pandas-dev/pandas/issues/35490
669,618,716
MDU6SXNzdWU2Njk2MTg3MTY=
35,490
BUG: DataFrame.agg with multiple cum functions creates wrong result
{ "avatar_url": "https://avatars.githubusercontent.com/u/357506?v=4", "events_url": "https://api.github.com/users/qinxuye/events{/privacy}", "followers_url": "https://api.github.com/users/qinxuye/followers", "following_url": "https://api.github.com/users/qinxuye/following{/other_user}", "gists_url": "https://api.github.com/users/qinxuye/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qinxuye", "id": 357506, "login": "qinxuye", "node_id": "MDQ6VXNlcjM1NzUwNg==", "organizations_url": "https://api.github.com/users/qinxuye/orgs", "received_events_url": "https://api.github.com/users/qinxuye/received_events", "repos_url": "https://api.github.com/users/qinxuye/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qinxuye/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qinxuye/subscriptions", "type": "User", "url": "https://api.github.com/users/qinxuye" }
[ { "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": "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": "Blocking issue or pull request for an upcoming release", "id": 77550281, "name": "Blocker", "node_id": "MDU6TGFiZWw3NzU1MDI4MQ==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Blocker" }, { "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" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
8
2020-07-31T09:33:45Z
2020-08-14T20:59:10Z
2020-08-14T20:59:10Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python # Your code here In [1]: import pandas as pd In [2]: df1 = pd.DataFrame({ ...: 'a': [3, 4, 5, 3, 5, 4, 1, 2, 3], ...: 'b': [1, 3, 4, 5, 6, 5, 4, 4, 4], ...: 'c': list('aabaaddce'), ...: 'd': [3, 4, 5, 3, 5, 4, 1, 2, 3], ...: 'e': [1, 3, 4, 5, 6, 5, 4, 4, 4], ...: 'f': list('aabaaddce'), ...: }) In [3]: df1.groupby('b').agg(['cummax', 'cumsum']) Out[3]: a d e cummax cumsum cummax cumsum cummax cumsum b 1 4 4 4 4 3 3 3 3 3 3 3 5 5 4 5 5 5 5 6 6 5 4 7 4 7 5 10 6 5 6 5 6 4 8 ``` Cumulative functions should generate the DataFrame with the same length. #### Problem description [this should explain **why** the current behaviour is a problem and why the expected output is a better solution] In pandas 1.0.5, the result is ```python In [1]: import pandas as pd In [2]: df1 = pd.DataFrame({ ...: 'a': [3, 4, 5, 3, 5, 4, 1, 2, 3], ...: 'b': [1, 3, 4, 5, 6, 5, 4, 4, 4], ...: 'c': list('aabaaddce'), ...: 'd': [3, 4, 5, 3, 5, 4, 1, 2, 3], ...: 'e': [1, 3, 4, 5, 6, 5, 4, 4, 4], ...: 'f': list('aabaaddce'), ...: }) In [3]: df1.groupby('b').agg(['cummax', 'cumsum']) Out[3]: a d e cummax cumsum cummax cumsum cummax cumsum 0 3 3 3 3 1 1 1 4 4 4 4 3 3 2 5 5 5 5 4 4 3 3 3 3 3 5 5 4 5 5 5 5 6 6 5 4 7 4 7 5 10 6 5 6 5 6 4 8 7 5 8 5 8 4 12 8 5 11 5 11 4 16 ``` #### Expected Output #### Output of ``pd.show_versions()`` <details> In [5]: pd.show_versions() /Users/qinxuye/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/setuptools/distutils_patch.py:26: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first. "Distutils was imported before Setuptools. This usage is discouraged " --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-5-3d232a07e144> in <module> ----> 1 pd.show_versions() ~/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/pandas/util/_print_versions.py in show_versions(as_json) 104 """ 105 sys_info = _get_sys_info() --> 106 deps = _get_dependency_info() 107 108 if as_json: ~/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/pandas/util/_print_versions.py in _get_dependency_info() 82 for modname in deps: 83 mod = import_optional_dependency( ---> 84 modname, raise_on_missing=False, on_version="ignore" 85 ) 86 result[modname] = _get_version(mod) if mod else None ~/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/pandas/compat/_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version) 97 minimum_version = VERSIONS.get(name) 98 if minimum_version: ---> 99 version = _get_version(module) 100 if distutils.version.LooseVersion(version) < minimum_version: 101 assert on_version in {"warn", "raise", "ignore"} ~/miniconda3/envs/test_pandas_1.1/lib/python3.7/site-packages/pandas/compat/_optional.py in _get_version(module) 42 43 if version is None: ---> 44 raise ImportError(f"Can't determine version for {module.__name__}") 45 return version 46 ImportError: Can't determine version for numba </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/35490/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35490/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35491
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35491/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35491/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35491/events
https://github.com/pandas-dev/pandas/issues/35491
669,628,748
MDU6SXNzdWU2Njk2Mjg3NDg=
35,491
DOC: Add note to DataFrame.compare about only able to compare identically-labeled DataFrame objects
{ "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": "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
{ "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" }
[ { "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" } ]
{ "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
2020-07-31T09:44:52Z
2020-09-24T06:49:09Z
2020-09-24T06:49:09Z
CONTRIBUTOR
null
#### Location of the documentation `pandas.core.frame::compare` #### Documentation problem Right now there is not a note/warning that you can only compare dataframes with the same shape and index labels. #### Suggested fix for documentation Add note: > Note: the method can only compare identically-labeled DataFrame objects, this means DataFrames with identical row and column labels.
{ "+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/35491/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35491/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35492
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35492/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35492/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35492/events
https://github.com/pandas-dev/pandas/pull/35492
669,639,719
MDExOlB1bGxSZXF1ZXN0NDU5OTg1NTcx
35,492
DOC: Add note to docstring DataFrame.compare about identical labels
{ "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": "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": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
10
2020-07-31T09:57:01Z
2020-09-24T08:07:01Z
2020-09-24T06:49:10Z
CONTRIBUTOR
null
- [x] closes #35491 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
{ "+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/35492/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35492/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35492.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35492", "merged_at": "2020-09-24T06:49:09Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35492.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35492" }
https://api.github.com/repos/pandas-dev/pandas/issues/35493
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35493/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35493/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35493/events
https://github.com/pandas-dev/pandas/issues/35493
669,640,174
MDU6SXNzdWU2Njk2NDAxNzQ=
35,493
BUG: use_inf_as_na options raises value error for read_csv
{ "avatar_url": "https://avatars.githubusercontent.com/u/20536514?v=4", "events_url": "https://api.github.com/users/mhaselsteiner/events{/privacy}", "followers_url": "https://api.github.com/users/mhaselsteiner/followers", "following_url": "https://api.github.com/users/mhaselsteiner/following{/other_user}", "gists_url": "https://api.github.com/users/mhaselsteiner/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mhaselsteiner", "id": 20536514, "login": "mhaselsteiner", "node_id": "MDQ6VXNlcjIwNTM2NTE0", "organizations_url": "https://api.github.com/users/mhaselsteiner/orgs", "received_events_url": "https://api.github.com/users/mhaselsteiner/received_events", "repos_url": "https://api.github.com/users/mhaselsteiner/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mhaselsteiner/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mhaselsteiner/subscriptions", "type": "User", "url": "https://api.github.com/users/mhaselsteiner" }
[ { "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": "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": "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
2
2020-07-31T09:57:30Z
2020-08-03T23:29:32Z
2020-08-03T23:29:32Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample to Reproduce Error ```python import pandas as pd import numpy as np pd.set_option('use_inf_as_na', True) pd.DataFrame({'test_data':[1,3,4,np.nan]}).to_csv('test_data.csv', na_rep='NaN') pd.read_csv('test_data.csv',sep=',' ,na_values='NaN') ``` Causes `ValueError`: ```python-traceback Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/io/parsers.py", line 686, in read_csv return _read(filepath_or_buffer, kwds) File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/io/parsers.py", line 458, in _read data = parser.read(nrows) File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/io/parsers.py", line 1201, in read df = DataFrame(col_dict, columns=columns, index=index) File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/core/frame.py", line 467, in __init__ mgr = init_dict(data, index, columns, dtype=dtype) File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/core/internals/construction.py", line 250, in init_dict missing = arrays.isna() File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/core/series.py", line 4795, in isna return super().isna() File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/core/generic.py", line 7109, in isna return isna(self).__finalize__(self, method="isna") File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/core/dtypes/missing.py", line 124, in isna return _isna(obj) File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/core/dtypes/missing.py", line 157, in _isna return _isna_ndarraylike(obj, inf_as_na=inf_as_na) File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/core/dtypes/missing.py", line 218, in _isna_ndarraylike result = _isna_string_dtype(values, dtype, inf_as_na=inf_as_na) File "/home/lena/anaconda3/envs/pandas_pip2/lib/python3.8/site-packages/pandas/core/dtypes/missing.py", line 246, in _isna_string_dtype vec = libmissing.isnaobj_old(values.ravel()) File "pandas/_libs/missing.pyx", line 160, in pandas._libs.missing.isnaobj_old ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() ``` #### Problem description Nans are not recognized as expected anymore if pandas option `use_inf_as_na`is set to True. Occurred first after upgrading to pandas 1.1.0 #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.8.5.final.0 python-bits : 64 OS : Linux OS-release : 5.4.0-42-generic Version : #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.1.0 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 20.2 setuptools : 49.2.0.post20200712 Cython : None pytest : 6.0.1 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : 1.1 pymysql : None psycopg2 : None jinja2 : 2.11.2 IPython : None pandas_datareader: None bs4 : None bottleneck : None fsspec : None fastparquet : None gcsfs : None matplotlib : 3.3.0 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pyxlsb : None s3fs : None scipy : 1.5.2 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/35493/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35493/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35494
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35494/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35494/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35494/events
https://github.com/pandas-dev/pandas/pull/35494
669,679,587
MDExOlB1bGxSZXF1ZXN0NDYwMDIxNzE3
35,494
TST: GroupBy on 2 rows of MultiIndex returns correct group indices
{ "avatar_url": "https://avatars.githubusercontent.com/u/3813175?v=4", "events_url": "https://api.github.com/users/smithto1/events{/privacy}", "followers_url": "https://api.github.com/users/smithto1/followers", "following_url": "https://api.github.com/users/smithto1/following{/other_user}", "gists_url": "https://api.github.com/users/smithto1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/smithto1", "id": 3813175, "login": "smithto1", "node_id": "MDQ6VXNlcjM4MTMxNzU=", "organizations_url": "https://api.github.com/users/smithto1/orgs", "received_events_url": "https://api.github.com/users/smithto1/received_events", "repos_url": "https://api.github.com/users/smithto1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/smithto1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/smithto1/subscriptions", "type": "User", "url": "https://api.github.com/users/smithto1" }
[ { "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": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "color": "207de5", "default": false, "description": null, "id": 71268330, "name": "MultiIndex", "node_id": "MDU6TGFiZWw3MTI2ODMzMA==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
1
2020-07-31T10:42:08Z
2020-08-03T23:46:31Z
2020-08-03T23:46:23Z
MEMBER
null
- [x] closes #18451 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` There was previously a bug where grouping on precisely two rows of a MultiIndex would return a wrongly formatted index. This PR is adding a test to enforce this correct behaviour. The new test fails on 0.20.3 but passes on >=1.0.5.
{ "+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/35494/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35494/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35494.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35494", "merged_at": "2020-08-03T23:46:23Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35494.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35494" }
https://api.github.com/repos/pandas-dev/pandas/issues/35495
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35495/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35495/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35495/events
https://github.com/pandas-dev/pandas/issues/35495
669,684,061
MDU6SXNzdWU2Njk2ODQwNjE=
35,495
DOC: pd.read_sql() connection disposal for str type connections
{ "avatar_url": "https://avatars.githubusercontent.com/u/16326083?v=4", "events_url": "https://api.github.com/users/AdamSpannbauer/events{/privacy}", "followers_url": "https://api.github.com/users/AdamSpannbauer/followers", "following_url": "https://api.github.com/users/AdamSpannbauer/following{/other_user}", "gists_url": "https://api.github.com/users/AdamSpannbauer/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AdamSpannbauer", "id": 16326083, "login": "AdamSpannbauer", "node_id": "MDQ6VXNlcjE2MzI2MDgz", "organizations_url": "https://api.github.com/users/AdamSpannbauer/orgs", "received_events_url": "https://api.github.com/users/AdamSpannbauer/received_events", "repos_url": "https://api.github.com/users/AdamSpannbauer/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AdamSpannbauer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AdamSpannbauer/subscriptions", "type": "User", "url": "https://api.github.com/users/AdamSpannbauer" }
[ { "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
[]
null
1
2020-07-31T10:47:13Z
2020-08-21T17:04:42Z
2020-08-01T17:05:55Z
CONTRIBUTOR
null
This is in between a documentation issue and a general question. #### Location of the documentation [`pd.read_sql()`](https://github.com/pandas-dev/pandas/blob/v1.1.0/pandas/io/sql.py#L441-L443) #### Documentation problem The documentation notes that if the `con` is a `SQLAlchemy connectable` that the user is responsible for disposing/closing. The documentation doesn't note whether the connection is closed if the user provides a `str` to the `con` parameter. In my quick search, I couldn't find a reference to `.dispose()`/`.close()` in the source code when the user provides a `str` type `con`. Is this connection being closed? Is it being left up to garbage collection as noted in [SQLAlchemy docs](https://docs.sqlalchemy.org/en/13/core/connections.html#engine-disposal)? #### Suggested fix for documentation I think a note about connection closure for `str` type `con`s would be a nice addition. Right now, if I'm understanding correctly, the connection is being garbage collected and the user needs to infer from the docs that they don't need to worry about an open connection. Current wording: > The user is responsible for engine disposal and connection closure for the SQLAlchemy connectable. Potential wording: > The user is responsible for engine disposal and connection closure for the SQLAlchemy connectable; str connections are closed automatically.
{ "+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/35495/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35495/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35496
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35496/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35496/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35496/events
https://github.com/pandas-dev/pandas/pull/35496
670,116,473
MDExOlB1bGxSZXF1ZXN0NDYwNDA4MzA3
35,496
Fix numpydev CI failure
{ "avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4", "events_url": "https://api.github.com/users/WillAyd/events{/privacy}", "followers_url": "https://api.github.com/users/WillAyd/followers", "following_url": "https://api.github.com/users/WillAyd/following{/other_user}", "gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/WillAyd", "id": 609873, "login": "WillAyd", "node_id": "MDQ6VXNlcjYwOTg3Mw==", "organizations_url": "https://api.github.com/users/WillAyd/orgs", "received_events_url": "https://api.github.com/users/WillAyd/received_events", "repos_url": "https://api.github.com/users/WillAyd/repos", "site_admin": false, "starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions", "type": "User", "url": "https://api.github.com/users/WillAyd" }
[ { "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": "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
5
2020-07-31T18:58:27Z
2020-08-03T19:01:34Z
2020-08-03T19:01:34Z
MEMBER
null
- [ ] closes #xxxx - [ ] tests added / passed - [ ] passes `black pandas` - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] 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/35496/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35496/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35496.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35496", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35496.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35496" }
https://api.github.com/repos/pandas-dev/pandas/issues/35497
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35497/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35497/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35497/events
https://github.com/pandas-dev/pandas/issues/35497
670,128,545
MDU6SXNzdWU2NzAxMjg1NDU=
35,497
BUG: Issue with latest version (1.1.0) of pandas when imported
{ "avatar_url": "https://avatars.githubusercontent.com/u/22142158?v=4", "events_url": "https://api.github.com/users/rakekris/events{/privacy}", "followers_url": "https://api.github.com/users/rakekris/followers", "following_url": "https://api.github.com/users/rakekris/following{/other_user}", "gists_url": "https://api.github.com/users/rakekris/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rakekris", "id": 22142158, "login": "rakekris", "node_id": "MDQ6VXNlcjIyMTQyMTU4", "organizations_url": "https://api.github.com/users/rakekris/orgs", "received_events_url": "https://api.github.com/users/rakekris/received_events", "repos_url": "https://api.github.com/users/rakekris/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rakekris/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rakekris/subscriptions", "type": "User", "url": "https://api.github.com/users/rakekris" }
[ { "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": "Clarification about behavior needed to assess issue", "id": 307649777, "name": "Needs Info", "node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
9
2020-07-31T19:14:29Z
2021-09-15T22:24:39Z
2020-08-16T14:55:14Z
NONE
null
- [Y ] I have checked that this issue has not already been reported. - [ Y] I have confirmed this bug exists on the latest version of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python # Your code here ``` #### Problem description [this should explain **why** the current behaviour is a problem and why the expected output is a better solution] We are using latest version of pandas in project . We are getting following issue when we import pandas import pandas as pd File "/usr/local/lib64/python3.6/site-packages/pandas/__init__.py", line 22, in <module> from pandas.compat.numpy import ( File "/usr/local/lib64/python3.6/site-packages/pandas/compat/numpy/__init__.py", line 21, in <module> "this version of pandas is incompatible with numpy < 1.15.4\n" ImportError: this version of pandas is incompatible with numpy < 1.15.4 your numpy version is 1.14.5. Please upgrade numpy to >= 1.15.4 to use this pandas version #### Expected Output #### Output of ``pd.show_versions()`` <details> [paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag] 1.1.0 </details>
{ "+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/35497/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35497/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35498
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35498/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35498/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35498/events
https://github.com/pandas-dev/pandas/pull/35498
670,137,817
MDExOlB1bGxSZXF1ZXN0NDYwNDI3NTEx
35,498
BUG: Index.get_indexer_non_unique misbehaves with multiple nan
{ "avatar_url": "https://avatars.githubusercontent.com/u/24970830?v=4", "events_url": "https://api.github.com/users/alexhlim/events{/privacy}", "followers_url": "https://api.github.com/users/alexhlim/followers", "following_url": "https://api.github.com/users/alexhlim/following{/other_user}", "gists_url": "https://api.github.com/users/alexhlim/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alexhlim", "id": 24970830, "login": "alexhlim", "node_id": "MDQ6VXNlcjI0OTcwODMw", "organizations_url": "https://api.github.com/users/alexhlim/orgs", "received_events_url": "https://api.github.com/users/alexhlim/received_events", "repos_url": "https://api.github.com/users/alexhlim/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alexhlim/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alexhlim/subscriptions", "type": "User", "url": "https://api.github.com/users/alexhlim" }
[ { "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": "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" } ]
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" }
28
2020-07-31T19:24:51Z
2021-08-05T13:07:53Z
2021-08-05T11:51:18Z
MEMBER
null
- [x] closes #35392 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry Looking at the implementation in index.pyx, I notice that when `[np.nan]` is passed to `get_indexer_non_unique`, the code was not able to get passed the `__contains__` method for stargets (line 314). Further testing (python=3.7.7, numpy=1.18.5): ``` import numpy as np # Case 1: Does not work -> prints nothing # nan dtype: np.float64, ndarray dtype: np.float64 targets = np.array([np.nan]) # Case 2: Works -> prints 0, 1, 2 # nan dtype: U3, ndarray dtype: <U32 targets = np.array([np.nan, 'var1']) values = np.array([np.nan, 'var1', np.nan]) stargets = set(targets) for i, v in enumerate(values): if v in stargets: print(i) ``` Case 1 and 2 results differ because of the dtype of nan (U3 vs float64). Upon further research, I figured out that np.nan != np.nan as per IEEE (when it is a float) and creating a set from a np.array could lead to some bizarre results (https://github.com/numpy/numpy/issues/9358). Also, since a dictionary is the main data structure in this method to keep track of the targets indices, I don't think it is ideal to use nans as keys (https://stackoverflow.com/questions/6441857/nans-as-key-in-dictionaries). I thought it would be appropriate to replace nans (with 0s) in the targets and values arrays in order to avoid the problems stated above. When considering where to replace the nans, I thought of two places where it could potentially happen: 1. In `get_indexer_non_unique` (/pandas/core/indexes/base.py) 2. In `get_indexer_non_unique` (/pandas/_libs/index.pyx) Including the changes in 1. would mean overwriting the the Index object's properties, so I decided to include the changes in 2. FYI -- I wasn't sure if the test I included was in the correct file. Please let me know if you would like this test to be in another file.
{ "+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/35498/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35498/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35498.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35498", "merged_at": "2021-08-05T11:51:18Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35498.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35498" }
https://api.github.com/repos/pandas-dev/pandas/issues/35499
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35499/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35499/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35499/events
https://github.com/pandas-dev/pandas/issues/35499
670,293,102
MDU6SXNzdWU2NzAyOTMxMDI=
35,499
BUG: pandas 1.1.0 MemoryError using .astype("string") which worked using pandas 1.0.5
{ "avatar_url": "https://avatars.githubusercontent.com/u/12517855?v=4", "events_url": "https://api.github.com/users/ldacey/events{/privacy}", "followers_url": "https://api.github.com/users/ldacey/followers", "following_url": "https://api.github.com/users/ldacey/following{/other_user}", "gists_url": "https://api.github.com/users/ldacey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ldacey", "id": 12517855, "login": "ldacey", "node_id": "MDQ6VXNlcjEyNTE3ODU1", "organizations_url": "https://api.github.com/users/ldacey/orgs", "received_events_url": "https://api.github.com/users/ldacey/received_events", "repos_url": "https://api.github.com/users/ldacey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ldacey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ldacey/subscriptions", "type": "User", "url": "https://api.github.com/users/ldacey" }
[ { "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": "a10c02", "default": false, "description": "Memory or execution speed performance", "id": 8935311, "name": "Performance", "node_id": "MDU6TGFiZWw4OTM1MzEx", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Performance" }, { "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": "5319e7", "default": false, "description": "String extension data type and string data", "id": 57522093, "name": "Strings", "node_id": "MDU6TGFiZWw1NzUyMjA5Mw==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Strings" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
9
2020-07-31T22:24:41Z
2020-08-17T14:35:00Z
2020-08-17T14:35:00Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample, a copy-pastable example I tried to pinpoint the specific row which causes the error. The column has HTML data like this: ` '''<div class="comment" dir="auto"><p dir="auto">Request <a href="/agent/tickets/test" target="_blank" rel="ticket">#test</a> "RE: ** M ..." Last comment in request </a>:</p> <p dir="auto"></p> <p dir="auto">Thank you</p> <p dir="auto">Stuff.</p> <p dir="auto">We will keep you posted .</p> <p dir="auto">Regards,</p> <p dir="auto">Name</p></div>'''` ```python #This fails (memory error below): df['event_html_body'].astype("string") #Filtering the dataframe to only convert rows which are not null for this field **works** x = df[~df.event_html_body.isnull()][['event_html_body']] x['event_html_body'].astype("string") #Filling NAs with another value fails: df['event_html_body'].fillna('-').astype("string") ``` #### Problem description I have code which has been converting columns to the "string" dtype and this has worked up until pandas 1.1.0 For example, I tried to process a file which I successfully processed in April and it works when I use .astype(str), but it fails when I use .astype("string") event though this worked in pandas 1.0.5. The column does not **need** to be the new "string" type, but I wanted to raise this issue anyways. Rows: 201368 Empty/null rows for the column in question: 189014 / 201368 So this column is quite sparse, and as I mentioned below if I filtered the nulls and then do .astype("string") then it will run fine. I am not sure why this worked before (same server, 64 GB of RAM), and this file was previous processed as a "string" before the update. Error: ``` MemoryError Traceback (most recent call last) <ipython-input-38-939f88862e64> in <module> ----> 1 df['event_html_body'].astype("string") /opt/conda/lib/python3.7/site-packages/pandas/core/generic.py in astype(self, dtype, copy, errors) 5535 else: 5536 # else, only a single dtype is given -> 5537 new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors,) 5538 return self._constructor(new_data).__finalize__(self, method="astype") 5539 /opt/conda/lib/python3.7/site-packages/pandas/core/internals/managers.py in astype(self, dtype, copy, errors) 565 self, dtype, copy: bool = False, errors: str = "raise" 566 ) -> "BlockManager": --> 567 return self.apply("astype", dtype=dtype, copy=copy, errors=errors) 568 569 def convert( /opt/conda/lib/python3.7/site-packages/pandas/core/internals/managers.py in apply(self, f, align_keys, **kwargs) 394 applied = b.apply(f, **kwargs) 395 else: --> 396 applied = getattr(b, f)(**kwargs) 397 result_blocks = _extend_blocks(applied, result_blocks) 398 /opt/conda/lib/python3.7/site-packages/pandas/core/internals/blocks.py in astype(self, dtype, copy, errors) 588 vals1d = values.ravel() 589 try: --> 590 values = astype_nansafe(vals1d, dtype, copy=True) 591 except (ValueError, TypeError): 592 # e.g. astype_nansafe can fail on object-dtype of strings /opt/conda/lib/python3.7/site-packages/pandas/core/dtypes/cast.py in astype_nansafe(arr, dtype, copy, skipna) 911 # dispatch on extension dtype if needed 912 if is_extension_array_dtype(dtype): --> 913 return dtype.construct_array_type()._from_sequence(arr, dtype=dtype, copy=copy) 914 915 if not isinstance(dtype, np.dtype): /opt/conda/lib/python3.7/site-packages/pandas/core/arrays/string_.py in _from_sequence(cls, scalars, dtype, copy) 215 216 # convert to str, then to object to avoid dtype like '<U3', then insert na_value --> 217 result = np.asarray(result, dtype=str) 218 result = np.asarray(result, dtype="object") 219 if has_nans: /opt/conda/lib/python3.7/site-packages/numpy/core/_asarray.py in asarray(a, dtype, order) 83 84 """ ---> 85 return array(a, dtype, copy=False, order=order) 86 87 MemoryError: Unable to allocate array with shape (201368,) and data type <U131880 ``` #### Expected Output #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.7.4.final.0 python-bits : 64 OS : Linux OS-release : 5.3.0-1028-azure Version : #29~18.04.1-Ubuntu SMP Fri Jun 5 14:32:34 UTC 2020 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : en_US.UTF-8 LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.1.0 numpy : 1.17.5 pytz : 2019.3 dateutil : 2.8.1 pip : 20.0.2 setuptools : 45.2.0 Cython : 0.29.14 pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : 2.8.4 (dt dec pq3 ext lo64) jinja2 : 2.10.3 IPython : 7.11.1 pandas_datareader: None bs4 : 4.8.2 bottleneck : None fsspec : 0.6.2 fastparquet : None gcsfs : None matplotlib : 3.1.2 numexpr : 2.7.1 odfpy : None openpyxl : 3.0.4 pandas_gbq : None pyarrow : 1.0.0 pytables : None pyxlsb : 1.0.6 s3fs : None scipy : 1.4.1 sqlalchemy : 1.3.13 tables : None tabulate : 0.8.6 xarray : None xlrd : 1.2.0 xlwt : None numba : 0.48.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/35499/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35499/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35500
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35500/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35500/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35500/events
https://github.com/pandas-dev/pandas/pull/35500
670,671,180
MDExOlB1bGxSZXF1ZXN0NDYwOTIzMDYw
35,500
Backport PR #35477 on branch 1.1.x (MAINT: Use float arange when required or intended)
{ "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" }
[]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
1
2020-08-01T08:46:48Z
2020-08-01T09:23:36Z
2020-08-01T09:23:36Z
NONE
null
Backport PR #35477: MAINT: Use float arange when required or intended
{ "+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/35500/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35500/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35500.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35500", "merged_at": "2020-08-01T09:23:36Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35500.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35500" }
https://api.github.com/repos/pandas-dev/pandas/issues/35501
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35501/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35501/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35501/events
https://github.com/pandas-dev/pandas/pull/35501
670,671,334
MDExOlB1bGxSZXF1ZXN0NDYwOTIzMjEw
35,501
Backport PR #35470 on branch 1.1.x (CI: unpin isort 5 (#35134))
{ "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" }
[]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
0
2020-08-01T08:47:01Z
2020-08-01T09:39:28Z
2020-08-01T09:39:28Z
NONE
null
Backport PR #35470: CI: unpin isort 5 (#35134)
{ "+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/35501/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35501/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35501.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35501", "merged_at": "2020-08-01T09:39:28Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35501.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35501" }
https://api.github.com/repos/pandas-dev/pandas/issues/35502
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35502/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35502/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35502/events
https://github.com/pandas-dev/pandas/pull/35502
670,792,006
MDExOlB1bGxSZXF1ZXN0NDYxMDM3ODgx
35,502
CI: xfail 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" }, { "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
2
2020-08-01T11:39:06Z
2020-08-04T09:03:32Z
2020-08-01T12:46:27Z
MEMBER
null
xref #35481
{ "+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/35502/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35502/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35502.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35502", "merged_at": "2020-08-01T12:46:27Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35502.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35502" }
https://api.github.com/repos/pandas-dev/pandas/issues/35503
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35503/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35503/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35503/events
https://github.com/pandas-dev/pandas/pull/35503
670,844,871
MDExOlB1bGxSZXF1ZXN0NDYxMDg4MTE4
35,503
DOC: add note on str cons to read_sql
{ "avatar_url": "https://avatars.githubusercontent.com/u/16326083?v=4", "events_url": "https://api.github.com/users/AdamSpannbauer/events{/privacy}", "followers_url": "https://api.github.com/users/AdamSpannbauer/followers", "following_url": "https://api.github.com/users/AdamSpannbauer/following{/other_user}", "gists_url": "https://api.github.com/users/AdamSpannbauer/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AdamSpannbauer", "id": 16326083, "login": "AdamSpannbauer", "node_id": "MDQ6VXNlcjE2MzI2MDgz", "organizations_url": "https://api.github.com/users/AdamSpannbauer/orgs", "received_events_url": "https://api.github.com/users/AdamSpannbauer/received_events", "repos_url": "https://api.github.com/users/AdamSpannbauer/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AdamSpannbauer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AdamSpannbauer/subscriptions", "type": "User", "url": "https://api.github.com/users/AdamSpannbauer" }
[ { "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": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
1
2020-08-01T12:50:57Z
2020-08-01T17:05:55Z
2020-08-01T17:05:55Z
CONTRIBUTOR
null
- [x] closes #35495 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] 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/35503/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35503/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35503.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35503", "merged_at": "2020-08-01T17:05:55Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35503.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35503" }
https://api.github.com/repos/pandas-dev/pandas/issues/35504
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35504/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35504/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35504/events
https://github.com/pandas-dev/pandas/pull/35504
670,852,264
MDExOlB1bGxSZXF1ZXN0NDYxMDk1MTU1
35,504
TST: ensure that DataFrameGroupBy.apply does not convert datetime.date to pd.Timestamp
{ "avatar_url": "https://avatars.githubusercontent.com/u/3813175?v=4", "events_url": "https://api.github.com/users/smithto1/events{/privacy}", "followers_url": "https://api.github.com/users/smithto1/followers", "following_url": "https://api.github.com/users/smithto1/following{/other_user}", "gists_url": "https://api.github.com/users/smithto1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/smithto1", "id": 3813175, "login": "smithto1", "node_id": "MDQ6VXNlcjM4MTMxNzU=", "organizations_url": "https://api.github.com/users/smithto1/orgs", "received_events_url": "https://api.github.com/users/smithto1/received_events", "repos_url": "https://api.github.com/users/smithto1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/smithto1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/smithto1/subscriptions", "type": "User", "url": "https://api.github.com/users/smithto1" }
[ { "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": "729FCF", "default": false, "description": null, "id": 233160, "name": "Groupby", "node_id": "MDU6TGFiZWwyMzMxNjA=", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby" }, { "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" } ]
closed
false
null
[]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
1
2020-08-01T13:01:04Z
2020-08-03T23:19:31Z
2020-08-03T23:19:27Z
MEMBER
null
- [x] closes #29617 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` Previously, there was a bug in `DataFrameGroupBy.apply` where a column of `datetime.date` would raise a `ValueError` if it was included as column in a multi-column grouping. Somewhere in the grouping the values would be converted to `pd.Timestamp` and then when the `pd.Timestamp` couldn't be found in the index of `datetime.date`s it would throw an error. This bug persisted until 1.0.5 but was fixed in 1.1.0 (not sure which change fixed it). In 1.1.0 the `datetime.date` are not converted to `pd.Timestamp`, so they are treated like any other dtype=object and left unchanged. This PR adds a test to enforce this behaviour to make sure the bug does not arise again.
{ "+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/35504/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35504/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35504.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35504", "merged_at": "2020-08-03T23:19:27Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35504.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35504" }
https://api.github.com/repos/pandas-dev/pandas/issues/35505
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35505/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35505/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35505/events
https://github.com/pandas-dev/pandas/issues/35505
670,918,367
MDU6SXNzdWU2NzA5MTgzNjc=
35,505
DOC: ExcelWriter constructor types
{ "avatar_url": "https://avatars.githubusercontent.com/u/7901364?v=4", "events_url": "https://api.github.com/users/alexhtn/events{/privacy}", "followers_url": "https://api.github.com/users/alexhtn/followers", "following_url": "https://api.github.com/users/alexhtn/following{/other_user}", "gists_url": "https://api.github.com/users/alexhtn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alexhtn", "id": 7901364, "login": "alexhtn", "node_id": "MDQ6VXNlcjc5MDEzNjQ=", "organizations_url": "https://api.github.com/users/alexhtn/orgs", "received_events_url": "https://api.github.com/users/alexhtn/received_events", "repos_url": "https://api.github.com/users/alexhtn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alexhtn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alexhtn/subscriptions", "type": "User", "url": "https://api.github.com/users/alexhtn" }
[ { "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": "bfe5bf", "default": false, "description": "read_excel, to_excel", "id": 49254273, "name": "IO Excel", "node_id": "MDU6TGFiZWw0OTI1NDI3Mw==", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Excel" } ]
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/7901364?v=4", "events_url": "https://api.github.com/users/alexhtn/events{/privacy}", "followers_url": "https://api.github.com/users/alexhtn/followers", "following_url": "https://api.github.com/users/alexhtn/following{/other_user}", "gists_url": "https://api.github.com/users/alexhtn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alexhtn", "id": 7901364, "login": "alexhtn", "node_id": "MDQ6VXNlcjc5MDEzNjQ=", "organizations_url": "https://api.github.com/users/alexhtn/orgs", "received_events_url": "https://api.github.com/users/alexhtn/received_events", "repos_url": "https://api.github.com/users/alexhtn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alexhtn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alexhtn/subscriptions", "type": "User", "url": "https://api.github.com/users/alexhtn" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/7901364?v=4", "events_url": "https://api.github.com/users/alexhtn/events{/privacy}", "followers_url": "https://api.github.com/users/alexhtn/followers", "following_url": "https://api.github.com/users/alexhtn/following{/other_user}", "gists_url": "https://api.github.com/users/alexhtn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alexhtn", "id": 7901364, "login": "alexhtn", "node_id": "MDQ6VXNlcjc5MDEzNjQ=", "organizations_url": "https://api.github.com/users/alexhtn/orgs", "received_events_url": "https://api.github.com/users/alexhtn/received_events", "repos_url": "https://api.github.com/users/alexhtn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alexhtn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alexhtn/subscriptions", "type": "User", "url": "https://api.github.com/users/alexhtn" } ]
{ "closed_at": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
12
2020-08-01T14:29:29Z
2020-09-13T23:07:21Z
2020-09-13T23:07:21Z
CONTRIBUTOR
null
#### Location of the documentation [https://pandas.pydata.org/docs/dev/reference/api/pandas.ExcelWriter.html?highlight=excelwriter](https://pandas.pydata.org/docs/dev/reference/api/pandas.ExcelWriter.html?highlight=excelwriter) or [https://github.com/pandas-dev/pandas/blob/d9fff2792bf16178d4e450fe7384244e50635733/pandas/io/excel/_base.py#L544](https://github.com/pandas-dev/pandas/blob/d9fff2792bf16178d4e450fe7384244e50635733/pandas/io/excel/_base.py#L544) #### Documentation problem Parameter `path` has type `str`, but based on this feature [https://github.com/pandas-dev/pandas/issues/7074](url) I can pass `io.BytesIO`. #### Suggested fix for documentation Change type description to `str | io.BytesIO`.
{ "+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/35505/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35505/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35506
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35506/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35506/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35506/events
https://github.com/pandas-dev/pandas/pull/35506
671,010,949
MDExOlB1bGxSZXF1ZXN0NDYxMjQ0MDE3
35,506
Added alignable boolean series and its example to `.loc` docs.
{ "avatar_url": "https://avatars.githubusercontent.com/u/3872947?v=4", "events_url": "https://api.github.com/users/MJafarMashhadi/events{/privacy}", "followers_url": "https://api.github.com/users/MJafarMashhadi/followers", "following_url": "https://api.github.com/users/MJafarMashhadi/following{/other_user}", "gists_url": "https://api.github.com/users/MJafarMashhadi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MJafarMashhadi", "id": 3872947, "login": "MJafarMashhadi", "node_id": "MDQ6VXNlcjM4NzI5NDc=", "organizations_url": "https://api.github.com/users/MJafarMashhadi/orgs", "received_events_url": "https://api.github.com/users/MJafarMashhadi/received_events", "repos_url": "https://api.github.com/users/MJafarMashhadi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MJafarMashhadi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MJafarMashhadi/subscriptions", "type": "User", "url": "https://api.github.com/users/MJafarMashhadi" }
[ { "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": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
2
2020-08-01T16:37:53Z
2020-08-02T10:18:22Z
2020-08-02T10:18:02Z
CONTRIBUTOR
null
- [x] closes #31054 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry I'm just not sure if I needed to add `IndexingError` to raises section. Added it to be safe, will remove if it's unnecessary. Also, when someone uses `df.loc[df['col'] > 0]` it really is the same under the hood, `df['col'] > 0` is a boolean series with an alignable index. So there might be some overlap?
{ "+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/35506/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35506/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35506.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35506", "merged_at": "2020-08-02T10:18:01Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35506.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35506" }
https://api.github.com/repos/pandas-dev/pandas/issues/35507
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35507/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35507/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35507/events
https://github.com/pandas-dev/pandas/pull/35507
671,106,252
MDExOlB1bGxSZXF1ZXN0NDYxMzMzNjgz
35,507
Added paragraph on creating DataFrame from list of namedtuples
{ "avatar_url": "https://avatars.githubusercontent.com/u/8833517?v=4", "events_url": "https://api.github.com/users/sjvrijn/events{/privacy}", "followers_url": "https://api.github.com/users/sjvrijn/followers", "following_url": "https://api.github.com/users/sjvrijn/following{/other_user}", "gists_url": "https://api.github.com/users/sjvrijn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sjvrijn", "id": 8833517, "login": "sjvrijn", "node_id": "MDQ6VXNlcjg4MzM1MTc=", "organizations_url": "https://api.github.com/users/sjvrijn/orgs", "received_events_url": "https://api.github.com/users/sjvrijn/received_events", "repos_url": "https://api.github.com/users/sjvrijn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sjvrijn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sjvrijn/subscriptions", "type": "User", "url": "https://api.github.com/users/sjvrijn" }
[ { "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": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
3
2020-08-01T18:53:17Z
2020-08-05T09:38:25Z
2020-08-05T02:27:23Z
CONTRIBUTOR
null
- [x] closes #35438 Is a whatsnew entry necessary for this 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/35507/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35507/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35507.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35507", "merged_at": "2020-08-05T02:27:23Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35507.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35507" }
https://api.github.com/repos/pandas-dev/pandas/issues/35508
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35508/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35508/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35508/events
https://github.com/pandas-dev/pandas/issues/35508
671,129,564
MDU6SXNzdWU2NzExMjk1NjQ=
35,508
BUG: DataFrame saved in Pickle under v1.1.0 cannot be read under v1.0.3
{ "avatar_url": "https://avatars.githubusercontent.com/u/31154974?v=4", "events_url": "https://api.github.com/users/Alalalalaki/events{/privacy}", "followers_url": "https://api.github.com/users/Alalalalaki/followers", "following_url": "https://api.github.com/users/Alalalalaki/following{/other_user}", "gists_url": "https://api.github.com/users/Alalalalaki/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Alalalalaki", "id": 31154974, "login": "Alalalalaki", "node_id": "MDQ6VXNlcjMxMTU0OTc0", "organizations_url": "https://api.github.com/users/Alalalalaki/orgs", "received_events_url": "https://api.github.com/users/Alalalalaki/received_events", "repos_url": "https://api.github.com/users/Alalalalaki/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Alalalalaki/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Alalalalaki/subscriptions", "type": "User", "url": "https://api.github.com/users/Alalalalaki" }
[]
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" }
1
2020-08-01T19:26:11Z
2020-08-02T07:42:22Z
2020-08-01T19:54:30Z
NONE
null
I find any DataFrame saved in v1.1.0 by `to_pickle` is not readable under v1.0.3. Any functions on the DataFrame will throw `AttributeError: 'DataFrame' object has no attribute '_data'` or `RecursionError: maximum recursion depth exceeded while calling a Python object`. I use pip to install pandas.
{ "+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/35508/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35508/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35509
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35509/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35509/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35509/events
https://github.com/pandas-dev/pandas/issues/35509
671,136,053
MDU6SXNzdWU2NzExMzYwNTM=
35,509
BUG: Possible Regression in DatetimeIndex Slicing
{ "avatar_url": "https://avatars.githubusercontent.com/u/24376333?v=4", "events_url": "https://api.github.com/users/stefmolin/events{/privacy}", "followers_url": "https://api.github.com/users/stefmolin/followers", "following_url": "https://api.github.com/users/stefmolin/following{/other_user}", "gists_url": "https://api.github.com/users/stefmolin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stefmolin", "id": 24376333, "login": "stefmolin", "node_id": "MDQ6VXNlcjI0Mzc2MzMz", "organizations_url": "https://api.github.com/users/stefmolin/orgs", "received_events_url": "https://api.github.com/users/stefmolin/received_events", "repos_url": "https://api.github.com/users/stefmolin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stefmolin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stefmolin/subscriptions", "type": "User", "url": "https://api.github.com/users/stefmolin" }
[ { "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": "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": "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" } ]
closed
false
null
[]
{ "closed_at": "2020-10-31T15:14:04Z", "closed_issues": 94, "created_at": "2020-09-26T01:36:01Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-10-30T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/78", "id": 5919858, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/78/labels", "node_id": "MDk6TWlsZXN0b25lNTkxOTg1OA==", "number": 78, "open_issues": 0, "state": "closed", "title": "1.1.4", "updated_at": "2020-11-25T22:43:27Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/78" }
6
2020-08-01T19:35:41Z
2020-10-26T14:51:58Z
2020-10-26T14:51:58Z
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 of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python >>> import pandas as pd >>> df = pd.DataFrame( ... {'col1': ['a', 'b', 'c'], 'col2': [1, 2, 3]}, ... index=pd.to_datetime(['2020-08-01', '2020-07-02', '2020-08-05']) ... ) >>> df['2020-08'] --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-82-c8d0440364af> in <module> ----> 1 df['2020-08'] ~/book_env/lib/python3.7/site-packages/pandas/core/frame.py in __getitem__(self, key) 2880 # either we have a slice or we have a string that can be converted 2881 # to a slice for partial-string date indexing -> 2882 return self._slice(indexer, axis=0) 2883 2884 # Do we have a (boolean) DataFrame? ~/book_env/lib/python3.7/site-packages/pandas/core/generic.py in _slice(self, slobj, axis) 3546 Slicing with this method is *always* positional. 3547 """ -> 3548 assert isinstance(slobj, slice), type(slobj) 3549 axis = self._get_block_manager_axis(axis) 3550 result = self._constructor(self._mgr.get_slice(slobj, axis=axis)) AssertionError: <class 'numpy.ndarray'> ``` You now have to run `sort_index()` before slicing: ```python >>> df.sort_index()['2020-08'] col1 col2 2020-08-01 a 1 2020-08-05 c 3 ``` #### Problem description Before 1.1.0, you didn't have to sort the index before slicing. Now, you have to run `sort_index()` and the error message is not helpful at all. #### Expected Output ```python >>> df['2020-08'] col1 col2 2020-08-01 a 1 2020-08-05 c 3 ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : d9fff2792bf16178d4e450fe7384244e50635733 python : 3.7.3.final.0 python-bits : 64 OS : Linux OS-release : 5.4.40-04224-g891a6cce2d44 Version : #1 SMP PREEMPT Tue Jun 23 20:21:29 PDT 2020 machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.1.0 numpy : 1.19.1 pytz : 2020.1 dateutil : 2.8.1 pip : 18.1 setuptools : 40.8.0 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.5.2 html5lib : None pymysql : None psycopg2 : None jinja2 : 2.11.2 IPython : 7.16.1 pandas_datareader: 0.9.0 bs4 : None bottleneck : None fsspec : None fastparquet : None gcsfs : None matplotlib : 3.3.0 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pyxlsb : None s3fs : None scipy : 1.5.2 sqlalchemy : 1.3.18 tables : None tabulate : None xarray : None xlrd : None xlwt : None numba : None </details>
{ "+1": 8, "-1": 0, "confused": 0, "eyes": 1, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 9, "url": "https://api.github.com/repos/pandas-dev/pandas/issues/35509/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35509/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35510
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35510/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35510/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35510/events
https://github.com/pandas-dev/pandas/pull/35510
671,232,722
MDExOlB1bGxSZXF1ZXN0NDYxNDUzODI1
35,510
REGR: Check for float in isnaobj_old
{ "avatar_url": "https://avatars.githubusercontent.com/u/2658661?v=4", "events_url": "https://api.github.com/users/dsaxton/events{/privacy}", "followers_url": "https://api.github.com/users/dsaxton/followers", "following_url": "https://api.github.com/users/dsaxton/following{/other_user}", "gists_url": "https://api.github.com/users/dsaxton/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dsaxton", "id": 2658661, "login": "dsaxton", "node_id": "MDQ6VXNlcjI2NTg2NjE=", "organizations_url": "https://api.github.com/users/dsaxton/orgs", "received_events_url": "https://api.github.com/users/dsaxton/received_events", "repos_url": "https://api.github.com/users/dsaxton/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dsaxton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dsaxton/subscriptions", "type": "User", "url": "https://api.github.com/users/dsaxton" }
[ { "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": "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": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
5
2020-08-01T21:55:55Z
2020-08-04T09:55:53Z
2020-08-03T23:29:32Z
MEMBER
null
- [x] closes #35493 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry Looks like we lost an isinstance check that caused this regression.
{ "+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/35510/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35510/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35510.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35510", "merged_at": "2020-08-03T23:29:32Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35510.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35510" }
https://api.github.com/repos/pandas-dev/pandas/issues/35511
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35511/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35511/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35511/events
https://github.com/pandas-dev/pandas/issues/35511
671,311,234
MDU6SXNzdWU2NzEzMTEyMzQ=
35,511
BUG: Unexpected behavior of sort_values
{ "avatar_url": "https://avatars.githubusercontent.com/u/66256893?v=4", "events_url": "https://api.github.com/users/bhagyakjain/events{/privacy}", "followers_url": "https://api.github.com/users/bhagyakjain/followers", "following_url": "https://api.github.com/users/bhagyakjain/following{/other_user}", "gists_url": "https://api.github.com/users/bhagyakjain/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bhagyakjain", "id": 66256893, "login": "bhagyakjain", "node_id": "MDQ6VXNlcjY2MjU2ODkz", "organizations_url": "https://api.github.com/users/bhagyakjain/orgs", "received_events_url": "https://api.github.com/users/bhagyakjain/received_events", "repos_url": "https://api.github.com/users/bhagyakjain/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bhagyakjain/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bhagyakjain/subscriptions", "type": "User", "url": "https://api.github.com/users/bhagyakjain" }
[ { "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
2
2020-08-01T23:53:04Z
2020-08-02T15:31:20Z
2020-08-02T15:31:20Z
NONE
null
df.sort_values(by=[col]) - If column(=col) has some values occurring multiple times then it orders them randomly. Instead, it should inherit the order in the DataFrame for the rows having same value for column.
{ "+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/35511/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35511/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35512
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35512/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35512/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35512/events
https://github.com/pandas-dev/pandas/issues/35512
671,325,737
MDU6SXNzdWU2NzEzMjU3Mzc=
35,512
BUG: Unexpected/undocumented behaviour of sum and mean aggregations on object dtypes
{ "avatar_url": "https://avatars.githubusercontent.com/u/3872947?v=4", "events_url": "https://api.github.com/users/MJafarMashhadi/events{/privacy}", "followers_url": "https://api.github.com/users/MJafarMashhadi/followers", "following_url": "https://api.github.com/users/MJafarMashhadi/following{/other_user}", "gists_url": "https://api.github.com/users/MJafarMashhadi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MJafarMashhadi", "id": 3872947, "login": "MJafarMashhadi", "node_id": "MDQ6VXNlcjM4NzI5NDc=", "organizations_url": "https://api.github.com/users/MJafarMashhadi/orgs", "received_events_url": "https://api.github.com/users/MJafarMashhadi/received_events", "repos_url": "https://api.github.com/users/MJafarMashhadi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MJafarMashhadi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MJafarMashhadi/subscriptions", "type": "User", "url": "https://api.github.com/users/MJafarMashhadi" }
[ { "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" } ]
closed
false
null
[]
null
3
2020-08-02T00:15:02Z
2020-08-02T07:51:25Z
2020-08-02T01:28:20Z
CONTRIBUTOR
null
- [ ] I have checked that this issue has not already been reported. - [x] I have confirmed this bug exists on the latest version of pandas. - [x] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample, a copy-pastable example ```python import pandas as pd # Sum, looks kinda OK >>> pd.Series('a b c d'.split()).sum() 'abcd' >>> pd.Series('1 2 3 4'.split()).sum() '1234' # Mean, inconsistent behaviour >>> pd.Series('a b c d'.split()).mean() ... TypeError: Could not convert abcd to numeric >>> pd.Series('1 2 3 4'.split()).mean() 308.5 ``` I saw the last example in a #26927 comment, scanned the code to see what's wrong and eventually decided to open this issue. #### Problem description IMO When calculating the mean, data type conversion should either happen on each element of the series before applying sum or should happen in the end. Here, to calculate the mean of `['1', '2', '3', '4']`, first a `sum` concatenates all the elements keeping the dtype, then it's converted to float (1234) and then divided by 4 which results in 308.5. #### Expected Output I have 3 options in mind: 1. an element-wise type conversion, which means: ```python >>> pd.Series('a b c d'.split()).sum() # and mean Type Error >>> pd.Series('1 2 3 4'.split()).sum() 10 >>> pd.Series('1 2 3 4'.split()).mean() 2.5 ``` 2. throwing an error in these cases or adding a note in docs for consequences of performing these aggregations on an object dtype. For example, considering that `np.sum(np.array('a b c d'.split()))` fails with a TypeError it's not intuitive that the same function in pandas performs a concatenation. https://github.com/pandas-dev/pandas/blob/d9fff2792bf16178d4e450fe7384244e50635733/pandas/core/generic.py#L10410 just like what happens when dtype is explicitly set as 'string': ```python >>> pd.Series('1 2 3 4'.split(), dtype='string').mean() ... TypeError: Cannot perform reduction 'mean' with string dtype ``` 3. No type conversions in the middle of calculating the mean: (It's not a good option IMHO for all the side effects it will have) ```python >>> pd.Series('a b c d'.split()).sum() 'abcd' >>> pd.Series('a b c d'.split()).mean() TypeError while trying to compute 'abcd' / 4, but not because 'abcd' cannot be converted to a number, but bc a string cannot be divided by a number >>> pd.Series('1 2 3 4'.split()).sum() '1234' >>> pd.Series('1 2 3 4'.split()).mean() TypeError while trying to '1234' / 4 ``` #### Output of ``pd.show_versions()`` <details> INSTALLED VERSIONS ------------------ commit : 4014a60352b21e36ec390f361815e66f96ee783c python : 3.8.3.final.0 python-bits : 64 OS : Linux OS-release : 5.3.0-40-generic Version : #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_CA.UTF-8 LOCALE : en_CA.UTF-8 pandas : 1.1.0.dev0+2171.g4014a6035 numpy : 1.18.5 pytz : 2020.1 dateutil : 2.8.1 pip : 20.1.1 setuptools : 47.3.1.post20200616 Cython : 0.29.20 pytest : 5.4.3 hypothesis : 5.16.1 sphinx : 3.1.1 blosc : None feather : None xlsxwriter : 1.2.9 lxml.etree : 4.5.1 html5lib : 1.0.1 pymysql : None psycopg2 : None jinja2 : 2.11.2 IPython : 7.15.0 pandas_datareader: None bs4 : 4.9.1 bottleneck : 1.3.2 fsspec : 0.7.4 fastparquet : 0.4.0 gcsfs : None matplotlib : 3.2.1 numexpr : 2.7.1 odfpy : None openpyxl : 3.0.3 pandas_gbq : None pyarrow : 0.17.1 pytables : None pyxlsb : None s3fs : 0.4.2 scipy : 1.4.1 sqlalchemy : 1.3.17 tables : 3.6.1 tabulate : 0.8.7 xarray : 0.15.1 xlrd : 1.2.0 xlwt : 1.3.0 numba : 0.48.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/35512/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35512/timeline
null
null
null
https://api.github.com/repos/pandas-dev/pandas/issues/35513
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35513/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35513/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35513/events
https://github.com/pandas-dev/pandas/pull/35513
671,410,467
MDExOlB1bGxSZXF1ZXN0NDYxNjIzNzg5
35,513
BUG: RollingGroupby respects __getitem__
{ "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": "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": "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" } ]
closed
false
null
[]
{ "closed_at": "2020-08-21T08:34:54Z", "closed_issues": 110, "created_at": "2020-07-10T13:54:44Z", "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": "on-merge: backport to 1.1.x", "due_on": "2020-08-22T07:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/75", "id": 5640672, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75/labels", "node_id": "MDk6TWlsZXN0b25lNTY0MDY3Mg==", "number": 75, "open_issues": 0, "state": "closed", "title": "1.1.1", "updated_at": "2020-08-25T06:31:23Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/75" }
2
2020-08-02T02:23:26Z
2020-08-06T19:18:11Z
2020-08-06T17:45:20Z
MEMBER
null
- [x] closes #35486 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [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/35513/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35513/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35513.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35513", "merged_at": "2020-08-06T17:45:20Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35513.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35513" }
https://api.github.com/repos/pandas-dev/pandas/issues/35514
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35514/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35514/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35514/events
https://github.com/pandas-dev/pandas/pull/35514
671,562,988
MDExOlB1bGxSZXF1ZXN0NDYxNzY4MTk2
35,514
BUG: fix combine_first converting timestamp to int
{ "avatar_url": "https://avatars.githubusercontent.com/u/4676330?v=4", "events_url": "https://api.github.com/users/nixphix/events{/privacy}", "followers_url": "https://api.github.com/users/nixphix/followers", "following_url": "https://api.github.com/users/nixphix/following{/other_user}", "gists_url": "https://api.github.com/users/nixphix/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nixphix", "id": 4676330, "login": "nixphix", "node_id": "MDQ6VXNlcjQ2NzYzMzA=", "organizations_url": "https://api.github.com/users/nixphix/orgs", "received_events_url": "https://api.github.com/users/nixphix/received_events", "repos_url": "https://api.github.com/users/nixphix/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nixphix/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nixphix/subscriptions", "type": "User", "url": "https://api.github.com/users/nixphix" }
[ { "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": "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": "7fcce8", "default": false, "description": "", "id": 2347992045, "name": "Stale", "node_id": "MDU6TGFiZWwyMzQ3OTkyMDQ1", "url": "https://api.github.com/repos/pandas-dev/pandas/labels/Stale" } ]
closed
false
null
[]
null
6
2020-08-02T06:35:41Z
2020-11-29T04:31:40Z
2020-11-29T04:31:40Z
CONTRIBUTOR
null
- [x] closes #28481 - [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry This fix introduced two regression, but it appears like the fix only made the API consistent. Previously the failing regressions where inconsistent say `df1.combine_first(df2)` would not return the same result as `df2.combine_first(df1)` for the failing cases, more on these in the code comments. Let me know if there is a better way to handle this.
{ "+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/35514/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35514/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35514.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35514", "merged_at": null, "patch_url": "https://github.com/pandas-dev/pandas/pull/35514.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35514" }
https://api.github.com/repos/pandas-dev/pandas/issues/35515
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35515/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35515/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35515/events
https://github.com/pandas-dev/pandas/pull/35515
671,566,545
MDExOlB1bGxSZXF1ZXN0NDYxNzcwNzM5
35,515
CLN: get_flattened_iterator
{ "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": "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": "2020-12-26T13:57:50Z", "closed_issues": 1768, "created_at": "2020-05-29T23:47:32Z", "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": "on-merge: backport to 1.2.x", "due_on": "2020-12-15T08:00:00Z", "html_url": "https://github.com/pandas-dev/pandas/milestone/73", "id": 5479819, "labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels", "node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==", "number": 73, "open_issues": 0, "state": "closed", "title": "1.2", "updated_at": "2021-04-13T15:46:43Z", "url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73" }
5
2020-08-02T07:07:45Z
2020-08-06T23:00:09Z
2020-08-06T21:51:06Z
MEMBER
null
- [x] tests added / passed - [x] passes `black pandas` - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` Refactor to just a single function
{ "+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/35515/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35515/timeline
null
0
{ "diff_url": "https://github.com/pandas-dev/pandas/pull/35515.diff", "html_url": "https://github.com/pandas-dev/pandas/pull/35515", "merged_at": "2020-08-06T21:51:06Z", "patch_url": "https://github.com/pandas-dev/pandas/pull/35515.patch", "url": "https://api.github.com/repos/pandas-dev/pandas/pulls/35515" }
https://api.github.com/repos/pandas-dev/pandas/issues/35516
https://api.github.com/repos/pandas-dev/pandas
https://api.github.com/repos/pandas-dev/pandas/issues/35516/labels{/name}
https://api.github.com/repos/pandas-dev/pandas/issues/35516/comments
https://api.github.com/repos/pandas-dev/pandas/issues/35516/events
https://github.com/pandas-dev/pandas/issues/35516
671,575,066
MDU6SXNzdWU2NzE1NzUwNjY=
35,516
BUG: Error with std of nullable column obtained from groupby
{ "avatar_url": "https://avatars.githubusercontent.com/u/2412074?v=4", "events_url": "https://api.github.com/users/MathieuDutSik/events{/privacy}", "followers_url": "https://api.github.com/users/MathieuDutSik/followers", "following_url": "https://api.github.com/users/MathieuDutSik/following{/other_user}", "gists_url": "https://api.github.com/users/MathieuDutSik/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/MathieuDutSik", "id": 2412074, "login": "MathieuDutSik", "node_id": "MDQ6VXNlcjI0MTIwNzQ=", "organizations_url": "https://api.github.com/users/MathieuDutSik/orgs", "received_events_url": "https://api.github.com/users/MathieuDutSik/received_events", "repos_url": "https://api.github.com/users/MathieuDutSik/repos", "site_admin": false, "starred_url": "https://api.github.com/users/MathieuDutSik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MathieuDutSik/subscriptions", "type": "User", "url": "https://api.github.com/users/MathieuDutSik" }
[ { "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": "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": "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
[]
{ "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" }
4
2020-08-02T08:19:38Z
2021-08-08T19:40:42Z
null
NONE
null
The error occurs with ```python df = pd.DataFrame({"A": [2, 1, 1, 1, 2, 2, 1], "B": pd.Series(np.full(7, np.nan), dtype="Int64")}) df.groupby("A").std() ``` while now we have `df.groupby("A").var()` working correctly. - [ x] I have checked that this issue has not already been reported. - [x ] I have confirmed this bug exists on the latest version of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug. #### Code Sample, a copy-pastable example ```python # Your code here ``` #### Problem description [this should explain **why** the current behaviour is a problem and why the expected output is a better solution] #### Expected Output #### Output of ``pd.show_versions()`` <details> [paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag] </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/35516/reactions" }
https://api.github.com/repos/pandas-dev/pandas/issues/35516/timeline
null
null
null