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/13104 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13104/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13104/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13104/events | https://github.com/pandas-dev/pandas/issues/13104 | 153,509,175 | MDU6SXNzdWUxNTM1MDkxNzU= | 13,104 | pd.DataFrame.describe percentile string precision | {
"avatar_url": "https://avatars.githubusercontent.com/u/12834389?v=4",
"events_url": "https://api.github.com/users/blalterman/events{/privacy}",
"followers_url": "https://api.github.com/users/blalterman/followers",
"following_url": "https://api.github.com/users/blalterman/following{/other_user}",
"gists_url": "https://api.github.com/users/blalterman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/blalterman",
"id": 12834389,
"login": "blalterman",
"node_id": "MDQ6VXNlcjEyODM0Mzg5",
"organizations_url": "https://api.github.com/users/blalterman/orgs",
"received_events_url": "https://api.github.com/users/blalterman/received_events",
"repos_url": "https://api.github.com/users/blalterman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/blalterman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/blalterman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/blalterman"
} | [
{
"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": "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": "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"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 36 | 2016-05-06T18:19:22Z | 2016-05-31T14:12:51Z | 2016-05-31T14:12:51Z | NONE | null | When using `pd.DataFrame.describe`, if your percentiles are different only at the 4th decimal place, a `ValueError` is thrown because the the percentiles that vary at the 4th decimal place become the same value.
```
In [1]: s = Series(np.random.randn(10))
In [2]: s.describe()
Out[2]:
count 10.000000
mean 0.291571
std 1.057143
min -1.453547
25% -0.614614
50% 0.637435
75% 0.968905
max 1.823964
dtype: float64
In [3]: s.describe(percentiles=[0.0001, 0.0005, 0.001, 0.999, 0.9995, 0.9999])
Out[3]:
count 10.000000
mean 0.291571
std 1.057143
min -1.453547
0.0% -1.453107
0.1% -1.451348
0.1% -1.449149
50% 0.637435
99.9% 1.817201
100.0% 1.820583
100.0% 1.823288
max 1.823964
dtype: float64
```
| {
"+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/13104/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13104/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13105 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13105/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13105/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13105/events | https://github.com/pandas-dev/pandas/issues/13105 | 153,553,067 | MDU6SXNzdWUxNTM1NTMwNjc= | 13,105 | [feature req] List tables function for sql | {
"avatar_url": "https://avatars.githubusercontent.com/u/8426290?v=4",
"events_url": "https://api.github.com/users/DSLituiev/events{/privacy}",
"followers_url": "https://api.github.com/users/DSLituiev/followers",
"following_url": "https://api.github.com/users/DSLituiev/following{/other_user}",
"gists_url": "https://api.github.com/users/DSLituiev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DSLituiev",
"id": 8426290,
"login": "DSLituiev",
"node_id": "MDQ6VXNlcjg0MjYyOTA=",
"organizations_url": "https://api.github.com/users/DSLituiev/orgs",
"received_events_url": "https://api.github.com/users/DSLituiev/received_events",
"repos_url": "https://api.github.com/users/DSLituiev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DSLituiev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DSLituiev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DSLituiev"
} | [
{
"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": "5319e7",
"default": false,
"description": "to_sql, read_sql, read_sql_query",
"id": 47232590,
"name": "IO SQL",
"node_id": "MDU6TGFiZWw0NzIzMjU5MA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20SQL"
}
]
| open | false | null | []
| null | 2 | 2016-05-06T22:45:07Z | 2016-05-11T21:38:12Z | null | NONE | null | Suggestion: introduce a function, something like `pandas.sql_list_tables(conn)` to look up available tables (shortcut for
`pd.read_sql("SELECT * FROM sqlite_master WHERE type='table'", conn, index_col=["name"])` or
`pd.read_sql("SELECT name FROM sqlite_master WHERE type='table'", conn)`).
Like in [this `R` module](https://rstudio-pubs-static.s3.amazonaws.com/52614_1fa12c657ba7492092bd538205d7f02e.html)
| {
"+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/13105/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13105/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13106 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13106/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13106/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13106/events | https://github.com/pandas-dev/pandas/issues/13106 | 153,556,971 | MDU6SXNzdWUxNTM1NTY5NzE= | 13,106 | BUG: loc fails on PeriodIndex within MultiIndex | {
"avatar_url": "https://avatars.githubusercontent.com/u/5635139?v=4",
"events_url": "https://api.github.com/users/max-sixty/events{/privacy}",
"followers_url": "https://api.github.com/users/max-sixty/followers",
"following_url": "https://api.github.com/users/max-sixty/following{/other_user}",
"gists_url": "https://api.github.com/users/max-sixty/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/max-sixty",
"id": 5635139,
"login": "max-sixty",
"node_id": "MDQ6VXNlcjU2MzUxMzk=",
"organizations_url": "https://api.github.com/users/max-sixty/orgs",
"received_events_url": "https://api.github.com/users/max-sixty/received_events",
"repos_url": "https://api.github.com/users/max-sixty/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/max-sixty/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/max-sixty/subscriptions",
"type": "User",
"url": "https://api.github.com/users/max-sixty"
} | []
| closed | false | null | []
| null | 2 | 2016-05-06T23:22:41Z | 2016-05-07T00:27:15Z | 2016-05-07T00:27:15Z | CONTRIBUTOR | null | Related to https://github.com/pydata/pandas/issues/9892, but this doesn't even work with Periods themselves.
Came across this while searching to see if this had an existing issue, my guess is that this would dramatically help with these Period issues: https://github.com/pydata/pandas/issues/7651
``` python
In [2]: df=pd.DataFrame(pd.np.random.rand(10,2), index=pd.MultiIndex.from_product([range(2), pd.PeriodIndex(start='2000', periods=5, freq='A')]))
In [3]: df
Out[3]:
0 1
0 2000 0.919658 0.631754
2001 0.806508 0.473935
2002 0.982759 0.886278
2003 0.597954 0.931326
2004 0.296699 0.014161
1 2000 0.675734 0.927880
2001 0.967144 0.653101
2002 0.683310 0.600392
2003 0.475080 0.984913
2004 0.228324 0.226254
In [4]: df.loc[(slice(None), slice(pd.Period('2003',freq='A')))]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4018)()
pandas/hashtable.pyx in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:6589)()
TypeError: an integer is required
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/indexes/base.py in get_loc(self, key, method, tolerance)
1944 try:
-> 1945 return self._engine.get_loc(key)
1946 except KeyError:
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4154)()
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4084)()
KeyError: Period('2003', 'A-DEC')
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4018)()
pandas/hashtable.pyx in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:6589)()
TypeError: an integer is required
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/indexes/base.py in get_slice_bound(self, label, side, kind)
2906 try:
-> 2907 slc = self.get_loc(label)
2908 except KeyError as err:
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/indexes/base.py in get_loc(self, key, method, tolerance)
1946 except KeyError:
-> 1947 return self._engine.get_loc(self._maybe_cast_indexer(key))
1948
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4154)()
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4084)()
KeyError: Period('2003', 'A-DEC')
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
<ipython-input-4-af43b0d9a3b9> in <module>()
----> 1 df.loc[(slice(None), slice(pd.Period('2003',freq='A')))]
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/indexing.py in __getitem__(self, key)
1292
1293 if type(key) is tuple:
-> 1294 return self._getitem_tuple(key)
1295 else:
1296 return self._getitem_axis(key, axis=0)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/indexing.py in _getitem_tuple(self, tup)
782 def _getitem_tuple(self, tup):
783 try:
--> 784 return self._getitem_lowerdim(tup)
785 except IndexingError:
786 pass
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/indexing.py in _getitem_lowerdim(self, tup)
889 # we may have a nested tuples indexer here
890 if self._is_nested_tuple_indexer(tup):
--> 891 return self._getitem_nested_tuple(tup)
892
893 # we maybe be using a tuple to represent multiple dimensions here
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/indexing.py in _getitem_nested_tuple(self, tup)
962
963 current_ndim = obj.ndim
--> 964 obj = getattr(obj, self.name)._getitem_axis(key, axis=axis)
965 axis += 1
966
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/indexing.py in _getitem_axis(self, key, axis)
1435 if isinstance(key, slice):
1436 self._has_valid_type(key, axis)
-> 1437 return self._get_slice_axis(key, axis=axis)
1438 elif is_bool_indexer(key):
1439 return self._getbool_axis(key, axis=axis)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/indexing.py in _get_slice_axis(self, slice_obj, axis)
1316 labels = obj._get_axis(axis)
1317 indexer = labels.slice_indexer(slice_obj.start, slice_obj.stop,
-> 1318 slice_obj.step, kind=self.name)
1319
1320 if isinstance(indexer, slice):
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/indexes/base.py in slice_indexer(self, start, end, step, kind)
2783 """
2784 start_slice, end_slice = self.slice_locs(start, end, step=step,
-> 2785 kind=kind)
2786
2787 # return a slice
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/indexes/base.py in slice_locs(self, start, end, step, kind)
2968 end_slice = None
2969 if end is not None:
-> 2970 end_slice = self.get_slice_bound(end, 'right', kind)
2971 if end_slice is None:
2972 end_slice = len(self)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/indexes/base.py in get_slice_bound(self, label, side, kind)
2908 except KeyError as err:
2909 try:
-> 2910 return self._searchsorted_monotonic(label, side)
2911 except ValueError:
2912 # raise the original KeyError
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/indexes/base.py in _searchsorted_monotonic(self, label, side)
2865 def _searchsorted_monotonic(self, label, side='left'):
2866 if self.is_monotonic_increasing:
-> 2867 return self.searchsorted(label, side=side)
2868 elif self.is_monotonic_decreasing:
2869 # np.searchsorted expects ascending sort order, have to reverse
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/base.py in searchsorted(self, key, side, sorter)
1112 def searchsorted(self, key, side='left', sorter=None):
1113 # needs coercion on the key (DatetimeIndex does already)
-> 1114 return self.values.searchsorted(key, side=side, sorter=sorter)
1115
1116 _shared_docs['drop_duplicates'] = (
pandas/src/period.pyx in pandas._period.Period.__richcmp__ (pandas/src/period.c:12753)()
TypeError: Cannot compare type 'Period' with type 'int'
```
If we pass the ordinal, it doesn't raise, but also doesn't work:
``` python
In [5]: df.loc[(slice(None), slice(pd.Period('2003',freq='A').ordinal))]
Out[5]:
0 1
0 2000 0.919658 0.631754
2001 0.806508 0.473935
2002 0.982759 0.886278
2003 0.597954 0.931326
2004 0.296699 0.014161
1 2000 0.675734 0.927880
2001 0.967144 0.653101
2002 0.683310 0.600392
2003 0.475080 0.984913
2004 0.228324 0.226254
```
| {
"+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/13106/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13106/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13107 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13107/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13107/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13107/events | https://github.com/pandas-dev/pandas/issues/13107 | 153,557,328 | MDU6SXNzdWUxNTM1NTczMjg= | 13,107 | BUG/API: Index.equals should check input class? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1696302?v=4",
"events_url": "https://api.github.com/users/sinhrks/events{/privacy}",
"followers_url": "https://api.github.com/users/sinhrks/followers",
"following_url": "https://api.github.com/users/sinhrks/following{/other_user}",
"gists_url": "https://api.github.com/users/sinhrks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sinhrks",
"id": 1696302,
"login": "sinhrks",
"node_id": "MDQ6VXNlcjE2OTYzMDI=",
"organizations_url": "https://api.github.com/users/sinhrks/orgs",
"received_events_url": "https://api.github.com/users/sinhrks/received_events",
"repos_url": "https://api.github.com/users/sinhrks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sinhrks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sinhrks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sinhrks"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 3 | 2016-05-06T23:26:33Z | 2016-09-03T15:31:03Z | 2016-09-03T15:31:03Z | MEMBER | null | #### Code Sample, a copy-pastable example if possible
Decide the behavior if non `Index` with same values is passed. Currently, there is incompatibility between dtypes.
```
pd.Index([1], dtype=object).equals(pd.Series([1], dtype=object))
# False
pd.Index([1]).equals(pd.Series([1]))
# True
```
#### output of `pd.show_versions()`
on current master
| {
"+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/13107/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13107/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13108 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13108/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13108/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13108/events | https://github.com/pandas-dev/pandas/issues/13108 | 153,564,779 | MDU6SXNzdWUxNTM1NjQ3Nzk= | 13,108 | DOC: MultiIndex sort docs | {
"avatar_url": "https://avatars.githubusercontent.com/u/5635139?v=4",
"events_url": "https://api.github.com/users/max-sixty/events{/privacy}",
"followers_url": "https://api.github.com/users/max-sixty/followers",
"following_url": "https://api.github.com/users/max-sixty/following{/other_user}",
"gists_url": "https://api.github.com/users/max-sixty/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/max-sixty",
"id": 5635139,
"login": "max-sixty",
"node_id": "MDQ6VXNlcjU2MzUxMzk=",
"organizations_url": "https://api.github.com/users/max-sixty/orgs",
"received_events_url": "https://api.github.com/users/max-sixty/received_events",
"repos_url": "https://api.github.com/users/max-sixty/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/max-sixty/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/max-sixty/subscriptions",
"type": "User",
"url": "https://api.github.com/users/max-sixty"
} | [
{
"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": "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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 5 | 2016-05-07T01:13:25Z | 2016-05-08T15:17:16Z | 2016-05-08T15:17:16Z | CONTRIBUTOR | null | I found this confusing, despite being a moderately competent pandas user:
from http://pandas.pydata.org/pandas-docs/stable/advanced.html#the-need-for-sortedness-with-multiindex
> Caveat emptor: the present implementation of MultiIndex requires that the labels be sorted for some of the slicing / indexing routines to work correctly. You can think about breaking the axis into unique groups, where at the hierarchical level of interest, each distinct group shares a label, but no two have the same label. However, the MultiIndex does not enforce this: you are responsible for ensuring that things are properly sorted. There is an important new method sort_index to sort an axis within a MultiIndex so that its labels are grouped and sorted by the original ordering of the associated factor at that level. Note that this does not necessarily mean the labels will be sorted lexicographically!
Is this right, that calling `sort_index` doesn't guarantee lex sortedness? How to guarantee it then?
And this:
> Some indexing will work even if the data are not sorted, but will be rather inefficient and will also return a copy of the data rather than a view:
...seems to contradict this:
> Thus, if you try to index at a depth at which the index is not sorted, it will raise an exception.
...neither of which seems tightly consistent with the passage above.
Am I misunderstanding something?
| {
"+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/13108/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13108/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13109 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13109/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13109/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13109/events | https://github.com/pandas-dev/pandas/issues/13109 | 153,578,628 | MDU6SXNzdWUxNTM1Nzg2Mjg= | 13,109 | "import pandas" changes NumPy error-handling settings | {
"avatar_url": "https://avatars.githubusercontent.com/u/662003?v=4",
"events_url": "https://api.github.com/users/mdickinson/events{/privacy}",
"followers_url": "https://api.github.com/users/mdickinson/followers",
"following_url": "https://api.github.com/users/mdickinson/following{/other_user}",
"gists_url": "https://api.github.com/users/mdickinson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mdickinson",
"id": 662003,
"login": "mdickinson",
"node_id": "MDQ6VXNlcjY2MjAwMw==",
"organizations_url": "https://api.github.com/users/mdickinson/orgs",
"received_events_url": "https://api.github.com/users/mdickinson/received_events",
"repos_url": "https://api.github.com/users/mdickinson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mdickinson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mdickinson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mdickinson"
} | [
{
"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": "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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 13 | 2016-05-07T07:07:04Z | 2016-08-21T17:02:12Z | 2016-08-21T13:37:54Z | NONE | null | A simple `import pandas` apparently does a `np.seterr(all='ignore')`: https://github.com/pydata/pandas/blob/23eb483d17ce41c0fe41b0bfa72c90df82151598/pandas/compat/numpy/__init__.py#L8-L9
This is a problem when using Pandas as a library, particularly during testing: a test (completely unrelated to Pandas) that should have produced warnings can fail to do so just because some earlier test happened to import a library that imported a library that imported something from Pandas (for example). Or a test runner that's done a `np.seterr(all='raise')` specifically to catch potential issues can end up catching nothing, because some Pandas import part-way through the test run turned the error handling off again.
I'm working around this right now by wrapping every pandas import in `with np.errstate():`. For example:
``` python
with np.errstate():
from pandas import DataFrame
```
But that's (a) ugly, and (b) awkward if the pandas import is in a third-party library out of your control.
Please consider removing this feature!
#### Code Sample, a copy-pastable example if possible
``` python
Enthought Canopy Python 2.7.11 | 64-bit | (default, Mar 18 2016, 14:49:17)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy, pandas
>>> 1.0 / numpy.arange(10)
array([ inf, 1. , 0.5 , 0.33333333, 0.25 ,
0.2 , 0.16666667, 0.14285714, 0.125 , 0.11111111])
```
#### Expected Output
I expected to see a `RuntimeWarning` from the division by zero above, as in:
``` python
Enthought Canopy Python 2.7.11 | 64-bit | (default, Mar 18 2016, 14:49:17)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> 1.0 / numpy.arange(10)
__main__:1: RuntimeWarning: divide by zero encountered in divide
array([ inf, 1. , 0.5 , 0.33333333, 0.25 ,
0.2 , 0.16666667, 0.14285714, 0.125 , 0.11111111])
```
#### output of `pd.show_versions()`
```
>>> pandas.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 13.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
pandas: 0.18.0
nose: 1.3.7
pip: 8.1.1
setuptools: 20.6.7
Cython: None
numpy: 1.10.4
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.1.2
sphinx: None
patsy: None
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.4.1
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.39.0
```
| {
"+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/13109/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13109/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13110 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13110/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13110/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13110/events | https://github.com/pandas-dev/pandas/issues/13110 | 153,595,193 | MDU6SXNzdWUxNTM1OTUxOTM= | 13,110 | BUG: SparseSeries/DataFrame non-float dtypes repr | {
"avatar_url": "https://avatars.githubusercontent.com/u/1696302?v=4",
"events_url": "https://api.github.com/users/sinhrks/events{/privacy}",
"followers_url": "https://api.github.com/users/sinhrks/followers",
"following_url": "https://api.github.com/users/sinhrks/following{/other_user}",
"gists_url": "https://api.github.com/users/sinhrks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sinhrks",
"id": 1696302,
"login": "sinhrks",
"node_id": "MDQ6VXNlcjE2OTYzMDI=",
"organizations_url": "https://api.github.com/users/sinhrks/orgs",
"received_events_url": "https://api.github.com/users/sinhrks/received_events",
"repos_url": "https://api.github.com/users/sinhrks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sinhrks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sinhrks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sinhrks"
} | [
{
"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": "009800",
"default": false,
"description": "Sparse Data Type",
"id": 49182326,
"name": "Sparse",
"node_id": "MDU6TGFiZWw0OTE4MjMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 0 | 2016-05-07T13:48:30Z | 2016-08-31T07:57:34Z | 2016-08-31T07:57:34Z | MEMBER | null | Currently sparse don't actually support dtype other than `float`. These must be fixed with #667
#### Code Sample, a copy-pastable example if possible
##### 1. bool dtype with `fill_value` raises `IndexError`
```
pd.SparseSeries([True, False, True, False, True], fill_value=False)
# IndexError: index out of bounds
```
##### 2. truncated/DataFrame output coerces to float
```
pd.set_option('display.max_rows', 3)
pd.SparseSeries([True, False, True, False, True])
#0 1.0
# ...
#4 1.0
# dtype: float64
# BlockIndex
# Block locations: array([0], dtype=int32)
# Block lengths: array([5], dtype=int32)
pd.SparseDataFrame({'A': [True, False, True, False, True]})
# A
#0 1.0
#1 0.0
#2 1.0
#3 0.0
#4 1.0
```
#### output of `pd.show_versions()`
on current master
| {
"+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/13110/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13110/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13111 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13111/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13111/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13111/events | https://github.com/pandas-dev/pandas/issues/13111 | 153,597,263 | MDU6SXNzdWUxNTM1OTcyNjM= | 13,111 | ENH: parallel support in .apply | {
"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"
} | [
{
"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": "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": "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"
}
]
| 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"
} | 8 | 2016-05-07T14:22:40Z | 2020-01-01T16:02:31Z | 2020-01-01T15:53:44Z | CONTRIBUTOR | null | xref #5751
[questions from SO](http://stackoverflow.com/questions/37078880/status-of-parallelization-of-pandas-apply?noredirect=1#comment61713215_37078880).
[mrocklins nice example of using .apply](http://stackoverflow.com/questions/31361721/python-dask-dataframe-support-for-trivially-parallelizable-row-apply)
So here is an example of how to do a parallel apply using [dask](https://dask.readthedocs.io/en/latest/). This could be baked into `.apply()` in pandas by the following signature enhancement:
current:
```
DataFrame.apply(self, func, axis=0, broadcast=False, raw=False, reduce=None,
args=(), **kwds)
```
proposed:
```
DataFrame.apply(self, func, axis=0, broadcast=False, raw=False, reduce=None,
engine=None, chunksize=None, args=(), **kwds)
```
where `engine='dask'` (or `numba` at some point) are possibilities
`chunksize` would map directly to `npartitions` and default to the number of cores if not specified.
further would allow `engine` to be a meta object like `Dask(scheduler='multiprocessing')` to support other options one would commonly pass (could also move `chunksize` inside that instead of as a separate object).
impl and timings:
```
from functools import partial
import pandas as pd
import dask
import dask.dataframe as dd
from dask import threaded, multiprocessing
from time import sleep
pd.__version__
dask.__version__
def make_frame(N):
return pd.DataFrame({'A' : range(N)})
def slow_func(x):
sleep(0.5)
return x
df = make_frame(40)
# reg apply
def f1(df):
return df.apply(slow_func, axis=1)
# dask apply
def f2(df, get):
ddf = dd.from_pandas(df, npartitions=8, sort=False)
return ddf.apply(slow_func, columns=df.columns, axis=1).compute(get=get)
f1 = partial(f1, df)
f2_threaded = partial(f2, df, threaded.get)
f2_multi = partial(f2, df, multiprocessing.get)
result1 = f1()
result2 = f2_threaded()
result3 = f2_multi()
```
```
In [18]: result1.equals(result2)
Out[18]: True
In [19]: result1.equals(result3)
Out[19]: True
In [20]: %timeit -n 1 -r 1 f1()
1 loop, best of 1: 20.6 s per loop
In [21]: %timeit -n 1 -r 1 f2_threaded()
1 loop, best of 1: 3.03 s per loop
In [22]: %timeit -n 1 -r 1 f2_multi()
1 loop, best of 1: 3.07 s per loop
```
Now for some caveats.
People want to parallelize a poor implementation. Generally you proceed thru the following steps first:
- get your problem correct; optimizing incorrect results is useless
- profile profile profile. This is always the first thing to do
- use built-in pandas / numpy vectorized routines
- use `cython` or `numba` on the user defined function
- `.apply` is always the last choice
- if its still not enough, parallelizaton.
You always want to make code simpler, not more complex. Its hard to know a-priori where bottlenecks are. People think `.apply` is some magical thing, its NOT, its JUST A FOR LOOP. The problem is people tend to throw in the kitchen sink, and just everything, which is just a terrible idea.
Ok my 2c about optimizing things.
In order for parallelization to actually matter the function you are computing should take some non-trivial amount of time to things like:
- iteration costs of the loop
- serialization time (esp if using multi-processing / distributed computing)
- does the function release the GIL if not, then threading will probably not help much
- development resources (your time)
If these criteria are met, then sure give it a try.
I think providing pandas a first class way to parallelize things, even tough people will just naively use it is probably not a bad thing.
Further extensions to this are: `to_dask()` (return a `dask.dataframe` to the user directly), and `engine='dask'` syntax for `.groupby()`
| {
"+1": 27,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 4,
"laugh": 3,
"rocket": 0,
"total_count": 34,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/13111/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13111/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13112 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13112/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13112/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13112/events | https://github.com/pandas-dev/pandas/pull/13112 | 153,618,207 | MDExOlB1bGxSZXF1ZXN0NjkyNTMyOTc= | 13,112 | DOC: Multiindex sort docs | {
"avatar_url": "https://avatars.githubusercontent.com/u/5635139?v=4",
"events_url": "https://api.github.com/users/max-sixty/events{/privacy}",
"followers_url": "https://api.github.com/users/max-sixty/followers",
"following_url": "https://api.github.com/users/max-sixty/following{/other_user}",
"gists_url": "https://api.github.com/users/max-sixty/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/max-sixty",
"id": 5635139,
"login": "max-sixty",
"node_id": "MDQ6VXNlcjU2MzUxMzk=",
"organizations_url": "https://api.github.com/users/max-sixty/orgs",
"received_events_url": "https://api.github.com/users/max-sixty/received_events",
"repos_url": "https://api.github.com/users/max-sixty/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/max-sixty/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/max-sixty/subscriptions",
"type": "User",
"url": "https://api.github.com/users/max-sixty"
} | [
{
"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": "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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-07T21:14:27Z | 2016-05-08T15:18:00Z | 2016-05-08T15:17:15Z | CONTRIBUTOR | null | closes https://github.com/pydata/pandas/issues/13108
| {
"+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/13112/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13112/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13112.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13112",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13112.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13112"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13113 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13113/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13113/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13113/events | https://github.com/pandas-dev/pandas/issues/13113 | 153,626,538 | MDU6SXNzdWUxNTM2MjY1Mzg= | 13,113 | BUG: Large MultiIndex-ed series fails on slicing | {
"avatar_url": "https://avatars.githubusercontent.com/u/5635139?v=4",
"events_url": "https://api.github.com/users/max-sixty/events{/privacy}",
"followers_url": "https://api.github.com/users/max-sixty/followers",
"following_url": "https://api.github.com/users/max-sixty/following{/other_user}",
"gists_url": "https://api.github.com/users/max-sixty/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/max-sixty",
"id": 5635139,
"login": "max-sixty",
"node_id": "MDQ6VXNlcjU2MzUxMzk=",
"organizations_url": "https://api.github.com/users/max-sixty/orgs",
"received_events_url": "https://api.github.com/users/max-sixty/received_events",
"repos_url": "https://api.github.com/users/max-sixty/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/max-sixty/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/max-sixty/subscriptions",
"type": "User",
"url": "https://api.github.com/users/max-sixty"
} | [
{
"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": "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": 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 | 2016-05-08T00:33:31Z | 2016-05-08T00:37:47Z | 2016-05-08T00:37:14Z | CONTRIBUTOR | null | With a large MultiIndex-ed series, slicing doesn't fully slice on a 2nd-level.
I've been struggling with this for a while, any ideas greatly appreciated...
``` python
In [135]: ints = (pd.np.random.rand(150000)*1e7).round().astype('int')
In [136]: index=pd.MultiIndex.from_arrays([list('a'*50000 + 'b'*50000+'c'*50000), ints])
In [137]: series=pd.Series(np.random.rand(150000), index=index).sort_index()
In [138]: series
Out[138]:
a 66 0.763398
171 0.886328
...
9999825 0.329101
9999933 0.463330
dtype: float64
In [139]: series.loc[(slice(None), slice(5000000))]
Out[139]:
a 66 0.763398
171 0.886328
186 0.315654
...
9720405 0.712525
9925259 0.016771
9978827 0.555781
dtype: float64
```
... the slice clearly has values both above and below 5,000,000. It does do _some_ slicing though, just not fully.
Or am I making a rookie mistake?
pandas: 0.18.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/13113/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13113/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13114 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13114/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13114/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13114/events | https://github.com/pandas-dev/pandas/pull/13114 | 153,628,954 | MDExOlB1bGxSZXF1ZXN0NjkyNTc4OTU= | 13,114 | Correct KeyError from matplotlib when processing Series yerr | {
"avatar_url": "https://avatars.githubusercontent.com/u/50109?v=4",
"events_url": "https://api.github.com/users/gliptak/events{/privacy}",
"followers_url": "https://api.github.com/users/gliptak/followers",
"following_url": "https://api.github.com/users/gliptak/following{/other_user}",
"gists_url": "https://api.github.com/users/gliptak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gliptak",
"id": 50109,
"login": "gliptak",
"node_id": "MDQ6VXNlcjUwMTA5",
"organizations_url": "https://api.github.com/users/gliptak/orgs",
"received_events_url": "https://api.github.com/users/gliptak/received_events",
"repos_url": "https://api.github.com/users/gliptak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gliptak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gliptak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gliptak"
} | [
{
"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": "8AE234",
"default": false,
"description": null,
"id": 2413328,
"name": "Visualization",
"node_id": "MDU6TGFiZWwyNDEzMzI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Visualization"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 18 | 2016-05-08T01:33:19Z | 2016-05-13T13:19:49Z | 2016-05-13T13:19:16Z | CONTRIBUTOR | null | - [x] closes #11858
- [x] tests added / passed
- [x] passes `git diff upstream/master | 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/13114/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13114/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13114.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13114",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13114.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13114"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13115 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13115/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13115/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13115/events | https://github.com/pandas-dev/pandas/pull/13115 | 153,658,327 | MDExOlB1bGxSZXF1ZXN0NjkyNjk5NTk= | 13,115 | [BUG] Reading multiindex, incorrectly names columns without name. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5340467?v=4",
"events_url": "https://api.github.com/users/brandys11/events{/privacy}",
"followers_url": "https://api.github.com/users/brandys11/followers",
"following_url": "https://api.github.com/users/brandys11/following{/other_user}",
"gists_url": "https://api.github.com/users/brandys11/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brandys11",
"id": 5340467,
"login": "brandys11",
"node_id": "MDQ6VXNlcjUzNDA0Njc=",
"organizations_url": "https://api.github.com/users/brandys11/orgs",
"received_events_url": "https://api.github.com/users/brandys11/received_events",
"repos_url": "https://api.github.com/users/brandys11/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brandys11/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brandys11/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brandys11"
} | [
{
"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": "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 | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 10 | 2016-05-08T14:18:28Z | 2016-06-06T23:20:51Z | 2016-06-06T23:20:34Z | CONTRIBUTOR | null | - [x] closes #12453
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
Fixed reading and writing of Multiindex.
In a situation where Multiindex looked like this:
| One | Two |
| --- | --- |
| X | |
it was changed to:
| One | Two |
| --- | --- |
| X | X |
| {
"+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/13115/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13115/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13115.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13115",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13115.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13115"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13116 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13116/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13116/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13116/events | https://github.com/pandas-dev/pandas/pull/13116 | 153,661,517 | MDExOlB1bGxSZXF1ZXN0NjkyNzE1MTQ= | 13,116 | Validate Timestamp with invalid offset raises ValueError | {
"avatar_url": "https://avatars.githubusercontent.com/u/50109?v=4",
"events_url": "https://api.github.com/users/gliptak/events{/privacy}",
"followers_url": "https://api.github.com/users/gliptak/followers",
"following_url": "https://api.github.com/users/gliptak/following{/other_user}",
"gists_url": "https://api.github.com/users/gliptak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gliptak",
"id": 50109,
"login": "gliptak",
"node_id": "MDQ6VXNlcjUwMTA5",
"organizations_url": "https://api.github.com/users/gliptak/orgs",
"received_events_url": "https://api.github.com/users/gliptak/received_events",
"repos_url": "https://api.github.com/users/gliptak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gliptak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gliptak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gliptak"
} | [
{
"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": "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"
}
]
| closed | false | null | []
| null | 3 | 2016-05-08T15:25:36Z | 2016-05-10T14:18:27Z | 2016-05-10T14:18:27Z | CONTRIBUTOR | null | - [x] closes #11630
- [x] tests added / passed
- [x] passes `git diff upstream/master | 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/13116/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13116/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13116.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13116",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13116.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13116"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13117 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13117/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13117/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13117/events | https://github.com/pandas-dev/pandas/pull/13117 | 153,670,017 | MDExOlB1bGxSZXF1ZXN0NjkyNzU0NjQ= | 13,117 | BUG: GH12896 where extra elements are returned in MultiIndex slicing | {
"avatar_url": "https://avatars.githubusercontent.com/u/10709573?v=4",
"events_url": "https://api.github.com/users/kawochen/events{/privacy}",
"followers_url": "https://api.github.com/users/kawochen/followers",
"following_url": "https://api.github.com/users/kawochen/following{/other_user}",
"gists_url": "https://api.github.com/users/kawochen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kawochen",
"id": 10709573,
"login": "kawochen",
"node_id": "MDQ6VXNlcjEwNzA5NTcz",
"organizations_url": "https://api.github.com/users/kawochen/orgs",
"received_events_url": "https://api.github.com/users/kawochen/received_events",
"repos_url": "https://api.github.com/users/kawochen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kawochen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kawochen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kawochen"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 4 | 2016-05-08T18:22:44Z | 2016-05-14T12:04:34Z | 2016-05-14T12:04:34Z | CONTRIBUTOR | null | - [x] closes #12896
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
Is this the right way to do this?
cc @MaximilianR
| {
"+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/13117/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13117/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13117.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13117",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13117.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13117"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13118 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13118/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13118/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13118/events | https://github.com/pandas-dev/pandas/issues/13118 | 153,723,505 | MDU6SXNzdWUxNTM3MjM1MDU= | 13,118 | DataFrame.describe can't return percentiles when data set contain nan | {
"avatar_url": "https://avatars.githubusercontent.com/u/12790328?v=4",
"events_url": "https://api.github.com/users/tade0726/events{/privacy}",
"followers_url": "https://api.github.com/users/tade0726/followers",
"following_url": "https://api.github.com/users/tade0726/following{/other_user}",
"gists_url": "https://api.github.com/users/tade0726/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tade0726",
"id": 12790328,
"login": "tade0726",
"node_id": "MDQ6VXNlcjEyNzkwMzI4",
"organizations_url": "https://api.github.com/users/tade0726/orgs",
"received_events_url": "https://api.github.com/users/tade0726/received_events",
"repos_url": "https://api.github.com/users/tade0726/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tade0726/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tade0726/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tade0726"
} | [
{
"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"
} | 3 | 2016-05-09T08:09:36Z | 2016-05-09T09:37:49Z | 2016-05-09T09:37:36Z | NONE | null | #### Code Sample, a copy-pastable example if possible
des_table = df_final_S1415.describe(percentiles=[.05, .25, .5, .75, .95 ]).T
#### Expected Output
In version 18.0 describe function will return percentiles when columns contain nan.
#### output of `pd.show_versions()`
But in version 18.1 describe function will not return percentiles when columns contain nan.
| {
"+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/13118/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13118/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13119 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13119/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13119/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13119/events | https://github.com/pandas-dev/pandas/issues/13119 | 153,736,417 | MDU6SXNzdWUxNTM3MzY0MTc= | 13,119 | BUG: resample with datetime64 data on series looses dtype | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | [
{
"color": "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": "207de5",
"default": false,
"description": "resample method",
"id": 74975453,
"name": "Resample",
"node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-09T09:27:49Z | 2016-08-31T07:52:49Z | 2016-08-31T07:52:49Z | MEMBER | null | From SO: http://stackoverflow.com/questions/37106810/bug-in-python-pandas-pandas-series-resample-vs-pandas-dataframe-resample
```
In [7]: import datetime as dt
In [8]: df = pd.DataFrame([[dt.datetime(2016,1,31,15)], [dt.datetime(2016,2,7,17)]], index=[dt.datetime(2016,1,31,15), dt.datetime(2016,2,7,17)], columns=['timestamp'])
In [10]: df
Out[10]:
timestamp
2016-01-31 15:00:00 2016-01-31 15:00:00
2016-02-07 17:00:00 2016-02-07 17:00:00
In [11]: df.resample('D').first().timestamp
Out[11]:
2016-01-31 2016-01-31 15:00:00
2016-02-01 NaT
2016-02-02 NaT
2016-02-03 NaT
2016-02-04 NaT
2016-02-05 NaT
2016-02-06 NaT
2016-02-07 2016-02-07 17:00:00
Freq: D, Name: timestamp, dtype: datetime64[ns]
In [12]: df.timestamp.resample('D').first()
Out[12]:
2016-01-31 1.454252e+18
2016-02-01 NaN
2016-02-02 NaN
2016-02-03 NaN
2016-02-04 NaN
2016-02-05 NaN
2016-02-06 NaN
2016-02-07 1.454864e+18
Freq: D, Name: timestamp, dtype: float64
```
Tested it with latest master
| {
"+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/13119/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13119/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13120 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13120/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13120/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13120/events | https://github.com/pandas-dev/pandas/issues/13120 | 153,805,107 | MDU6SXNzdWUxNTM4MDUxMDc= | 13,120 | BUG: PeriodIndex construction fails (or produces erroneous result) with memoryview as input. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1588357?v=4",
"events_url": "https://api.github.com/users/ssanderson/events{/privacy}",
"followers_url": "https://api.github.com/users/ssanderson/followers",
"following_url": "https://api.github.com/users/ssanderson/following{/other_user}",
"gists_url": "https://api.github.com/users/ssanderson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ssanderson",
"id": 1588357,
"login": "ssanderson",
"node_id": "MDQ6VXNlcjE1ODgzNTc=",
"organizations_url": "https://api.github.com/users/ssanderson/orgs",
"received_events_url": "https://api.github.com/users/ssanderson/received_events",
"repos_url": "https://api.github.com/users/ssanderson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ssanderson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ssanderson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ssanderson"
} | [
{
"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"
},
{
"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": "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"
} | 14 | 2016-05-09T15:36:11Z | 2021-05-12T13:27:56Z | 2021-05-12T13:27:56Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
First noted in discussion here: https://github.com/quantopian/zipline/pull/1190/files/fe5a2a888a498d838c3cc43de2c33ac08b20d2a7#r62506342. This most often matters when passing a value typed in Cython as something like `int64_t[:]`.
Simple repro cases:
DatetimeIndex construction fails (looks like trying to parse strings?), and vanilla Index construction returns an array of unicode strings.
```
In [6]: import pandas as pd; import numpy as np
In [7]: pd.__version__, np.__version__
Out[7]: ('0.18.1+20.gaf7bdd3', '1.11.0')
In [8]: m = memoryview(np.arange(5))
In [9]: pd.DatetimeIndex(m)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-9-09b855a663a4> in <module>()
----> 1 pd.DatetimeIndex(m)
/home/ssanderson/clones/pandas/pandas/util/decorators.pyc in wrapper(*args, **kwargs)
89 else:
90 kwargs[new_arg_name] = new_arg_value
---> 91 return func(*args, **kwargs)
92 return wrapper
93 return _deprecate_kwarg
/home/ssanderson/clones/pandas/pandas/tseries/index.pyc in __new__(cls, data, freq, start, end, periods, copy, name, tz, verify_integrity, normalize, closed, ambiguous, dtype, **kwargs)
283 data = tslib.parse_str_array_to_datetime(data, freq=freq,
284 dayfirst=dayfirst,
--> 285 yearfirst=yearfirst)
286 else:
287 data = tools.to_datetime(data, errors='raise')
/home/ssanderson/clones/pandas/pandas/tslib.pyx in pandas.tslib.parse_str_array_to_datetime (pandas/tslib.c:39610)()
2175 except ValueError:
2176 if is_coerce:
-> 2177 iresult[i] = NPY_NAT
2178 continue
2179 raise
ValueError:
In [10]: pd.Index(m)
Out[10]: Index([u'', u'', u'', u'', u''], dtype='object')
```
#### Expected Output
I'd expect this to either error immediately or provide the same result as coercing the provided memoryview into a numpy array.
#### output of `pd.show_versions()`
```
In [6]: pd.show_versions()
INSTALLED VERSIONS
------------------
commit: af7bdd3883c8d61e9d9388d3aa699930eee7fff8
python: 2.7.10.final.0
python-bits: 64
OS: Linux
OS-release: 4.2.0-16-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1+20.gaf7bdd3
nose: None
pip: 8.1.0
setuptools: 20.2.2
Cython: 0.24
numpy: 1.11.0
scipy: None
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.3
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
boto: None
pandas_datareader: None
```
cc @jbredeche
| {
"+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/13120/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13120/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13121 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13121/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13121/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13121/events | https://github.com/pandas-dev/pandas/issues/13121 | 153,840,690 | MDU6SXNzdWUxNTM4NDA2OTA= | 13,121 | groupby(..).apply() has inconsistent behavior when there is only one group | {
"avatar_url": "https://avatars.githubusercontent.com/u/3013304?v=4",
"events_url": "https://api.github.com/users/smoofra/events{/privacy}",
"followers_url": "https://api.github.com/users/smoofra/followers",
"following_url": "https://api.github.com/users/smoofra/following{/other_user}",
"gists_url": "https://api.github.com/users/smoofra/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smoofra",
"id": 3013304,
"login": "smoofra",
"node_id": "MDQ6VXNlcjMwMTMzMDQ=",
"organizations_url": "https://api.github.com/users/smoofra/orgs",
"received_events_url": "https://api.github.com/users/smoofra/received_events",
"repos_url": "https://api.github.com/users/smoofra/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smoofra/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smoofra/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smoofra"
} | [
{
"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": "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 | 2016-05-09T18:36:30Z | 2016-05-09T20:37:04Z | 2016-05-09T20:36:50Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```
df = pd.DataFrame({'a':['foo', 'foo', 'bar'], 'b':[1,1,1]}).set_index('a')
def f(df):
print '============'
print df
print
print(pd.DataFrame(df.groupby(level='a').apply(lambda df: df['b'].cumsum())))
f(df)
f(df[df.index == 'foo'])
```
### Actual Output
```
============
b
a
foo 1
foo 1
bar 1
b
a a
bar bar 1
foo foo 1
foo 2
============
b
a
foo 1
foo 1
a foo foo
a
foo 1 2
```
#### Expected Output
```
============
b
a
foo 1
foo 1
bar 1
b
a a
bar bar 1
foo foo 1
foo 2
============
b
a
foo 1
foo 1
b
a a
foo foo 1
foo 2
```
#### output of `pd.show_versions()`
## INSTALLED VERSIONS
commit: None
python: 2.7.10.final.0
python-bits: 64
OS: Darwin
OS-release: 15.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.17.1
nose: 1.3.4
pip: 8.1.1
setuptools: 18.0.1
Cython: None
numpy: 1.9.2
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 4.0.0
sphinx: None
patsy: 0.4.1
dateutil: 2.2
pytz: 2014.10
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.4.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
Jinja2: 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/13121/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13121/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13122 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13122/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13122/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13122/events | https://github.com/pandas-dev/pandas/pull/13122 | 153,880,233 | MDExOlB1bGxSZXF1ZXN0Njk0MTg0Mzg= | 13,122 | PERF: quantile now operates per block boosting perf / fix quantile with nan | {
"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"
} | [
{
"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": "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": "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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 4 | 2016-05-09T22:02:04Z | 2016-05-12T13:12:58Z | 2016-05-12T13:12:58Z | CONTRIBUTOR | null | closes #11623
closes #13098
There is a slight API change in that the returned Series are now named by the quantile.
this PR
```
In [1]: df = DataFrame(np.random.randn(1000, 3), columns=list('ABC'))
In [2]: %timeit df.quantile([0.1, 0.5], axis=1)
1000 loops, best of 3: 830 µs per loop
```
0.18.1
```
In [3]: df.quantile([0.1, 0.5], axis=1)
In [1]: df = DataFrame(np.random.randn(1000, 3), columns=list('ABC'))
In [2]: %timeit df.quantile([0.1, 0.5], axis=1)
1 loop, best of 3: 317 ms per loop
```
| {
"+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/13122/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13122/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13122.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13122",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13122.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13122"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13123 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13123/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13123/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13123/events | https://github.com/pandas-dev/pandas/issues/13123 | 153,882,667 | MDU6SXNzdWUxNTM4ODI2Njc= | 13,123 | CLN: remove pandas/bench & pandas/vb_suite | {
"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"
} | [
{
"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": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 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 | 2016-05-09T22:16:56Z | 2016-07-20T20:21:05Z | 2016-07-19T10:48:25Z | CONTRIBUTOR | null | I think we are sufficiently on asv now.
Ideally would check if anything in `bench` that we should add to asv. Make sure the asv runs after removing `vb_suite`.
| {
"+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/13123/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13123/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13124 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13124/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13124/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13124/events | https://github.com/pandas-dev/pandas/pull/13124 | 153,922,335 | MDExOlB1bGxSZXF1ZXN0Njk0NDc5MTk= | 13,124 | BUG: Added checks for NaN in __call__ of EngFormatter | {
"avatar_url": "https://avatars.githubusercontent.com/u/5811375?v=4",
"events_url": "https://api.github.com/users/yaduart/events{/privacy}",
"followers_url": "https://api.github.com/users/yaduart/followers",
"following_url": "https://api.github.com/users/yaduart/following{/other_user}",
"gists_url": "https://api.github.com/users/yaduart/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yaduart",
"id": 5811375,
"login": "yaduart",
"node_id": "MDQ6VXNlcjU4MTEzNzU=",
"organizations_url": "https://api.github.com/users/yaduart/orgs",
"received_events_url": "https://api.github.com/users/yaduart/received_events",
"repos_url": "https://api.github.com/users/yaduart/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yaduart/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yaduart/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yaduart"
} | [
{
"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"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 10 | 2016-05-10T04:37:39Z | 2016-05-11T23:24:40Z | 2016-05-11T22:18:27Z | CONTRIBUTOR | null | - [x] closes #11981
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
Closes #11981
Updated the v0.18.2 document
In the function `__call__` of EngFormatter check if decimal input is NaN.
| {
"+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/13124/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13124/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13124.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13124",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13124.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13124"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13125 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13125/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13125/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13125/events | https://github.com/pandas-dev/pandas/pull/13125 | 153,949,340 | MDExOlB1bGxSZXF1ZXN0Njk0NjYwNDY= | 13,125 | Make os.linesep default line_terminator in to_clipboard | {
"avatar_url": "https://avatars.githubusercontent.com/u/53390?v=4",
"events_url": "https://api.github.com/users/Winand/events{/privacy}",
"followers_url": "https://api.github.com/users/Winand/followers",
"following_url": "https://api.github.com/users/Winand/following{/other_user}",
"gists_url": "https://api.github.com/users/Winand/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Winand",
"id": 53390,
"login": "Winand",
"node_id": "MDQ6VXNlcjUzMzkw",
"organizations_url": "https://api.github.com/users/Winand/orgs",
"received_events_url": "https://api.github.com/users/Winand/received_events",
"repos_url": "https://api.github.com/users/Winand/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Winand/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Winand/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Winand"
} | [
{
"color": "fbca04",
"default": false,
"description": "Windows OS",
"id": 57186974,
"name": "Windows",
"node_id": "MDU6TGFiZWw1NzE4Njk3NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Windows"
},
{
"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 | 9 | 2016-05-10T08:22:54Z | 2016-12-26T21:46:14Z | 2016-12-26T21:46:14Z | CONTRIBUTOR | null | closes #11720
- Make os.linesep default line_terminator in to_clipboard
- Add line_terminator kw to Series.to_csv
- Refactor to_clipboard
Observed/fixed problems in to_clipboard:
- try..except: pass
- excel=None, though it defaults to True
- several code paths with return
- sep argument could be passed via kwargs
- "other keywords are passed to to_csv" only if excel=True
- line_terminator kw isn't supported by Series to_csv
Is it ok to to change Series.to_csv api?
Also we need tests, right? But what does `# pragma: no cover` mean?
| {
"+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/13125/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13125/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13125.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13125",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13125.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13125"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13126 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13126/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13126/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13126/events | https://github.com/pandas-dev/pandas/issues/13126 | 154,017,252 | MDU6SXNzdWUxNTQwMTcyNTI= | 13,126 | pandas.DataFrame.to_json() date in MongoDB Extended JSON format | {
"avatar_url": "https://avatars.githubusercontent.com/u/2394898?v=4",
"events_url": "https://api.github.com/users/mbourqui/events{/privacy}",
"followers_url": "https://api.github.com/users/mbourqui/followers",
"following_url": "https://api.github.com/users/mbourqui/following{/other_user}",
"gists_url": "https://api.github.com/users/mbourqui/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mbourqui",
"id": 2394898,
"login": "mbourqui",
"node_id": "MDQ6VXNlcjIzOTQ4OTg=",
"organizations_url": "https://api.github.com/users/mbourqui/orgs",
"received_events_url": "https://api.github.com/users/mbourqui/received_events",
"repos_url": "https://api.github.com/users/mbourqui/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mbourqui/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mbourqui/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mbourqui"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
}
]
| closed | false | null | []
| null | 5 | 2016-05-10T14:15:02Z | 2016-05-11T14:12:11Z | 2016-05-10T14:41:29Z | NONE | null | #### Additional option for the `date_format` parameter
'isomongo'
#### Expected Output
{ "$date": "YYYY-MM-DDTHH:mm:ss.mmm<+/-Offset>" }
See https://docs.mongodb.com/manual/reference/mongodb-extended-json/#date
| {
"+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/13126/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13126/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13127 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13127/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13127/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13127/events | https://github.com/pandas-dev/pandas/issues/13127 | 154,045,471 | MDU6SXNzdWUxNTQwNDU0NzE= | 13,127 | HDF5ExtError when creating python pandas HDF file | {
"avatar_url": "https://avatars.githubusercontent.com/u/7676160?v=4",
"events_url": "https://api.github.com/users/tastyminerals/events{/privacy}",
"followers_url": "https://api.github.com/users/tastyminerals/followers",
"following_url": "https://api.github.com/users/tastyminerals/following{/other_user}",
"gists_url": "https://api.github.com/users/tastyminerals/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tastyminerals",
"id": 7676160,
"login": "tastyminerals",
"node_id": "MDQ6VXNlcjc2NzYxNjA=",
"organizations_url": "https://api.github.com/users/tastyminerals/orgs",
"received_events_url": "https://api.github.com/users/tastyminerals/received_events",
"repos_url": "https://api.github.com/users/tastyminerals/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tastyminerals/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tastyminerals/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tastyminerals"
} | [
{
"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"
},
{
"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 | 14 | 2016-05-10T16:07:09Z | 2016-05-10T18:35:42Z | 2016-05-10T18:35:42Z | NONE | null | ### Error
Started to get this error recently.
```
tables.exceptions.HDF5ExtError: HDF5 error back trace
File "H5A.c", line 634, in H5Awrite
not an attribute
End of HDF5 error back trace
Can't set attribute 'levels' in node:
/tensor (Group) ''.
Closing remaining open files:tensor.h5...done
```
#### Code Sample, a copy-pastable example if possible
**mydata** is a giant tuple `(('word1', 'link', 'word2', int), (...),`
```
pdf = pd.DataFrame.from_records(mydata)
pdf.columns = ['word0', 'link', 'word1', 'counts']
h5file = pd.HDFStore(h5fname, 'a', complevel=9, complib='blosc')
h5file.append("tensor", pdf,
data_columns=['word0', 'link', 'word1'],
nan_rep='_!NaN_',
min_itemsize={'word0': 55, 'link': 15, 'word1': 55})
h5file.close()
```
#### Expected Output
tensor.h5 file
#### output of `pd.show_versions()`
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Linux
OS-release: 4.3.6-1-MANJARO
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.0
nose: 1.3.7
pip: 8.1.1
setuptools: 20.2.2
Cython: 0.24
numpy: 1.11.0
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: 1.3.6
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.4.1
html5lib: 0.9999999
httplib2: 0.9.2
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
```
##### Corresponding stackoverflow issue.
[http://stackoverflow.com/questions/37142173/hdf5exterror-when-creating-python-pandas-hdf-file](url)
| {
"+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/13127/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13127/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13128 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13128/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13128/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13128/events | https://github.com/pandas-dev/pandas/issues/13128 | 154,087,168 | MDU6SXNzdWUxNTQwODcxNjg= | 13,128 | Datetime comparisons raise TypeError | {
"avatar_url": "https://avatars.githubusercontent.com/u/375307?v=4",
"events_url": "https://api.github.com/users/ElDeveloper/events{/privacy}",
"followers_url": "https://api.github.com/users/ElDeveloper/followers",
"following_url": "https://api.github.com/users/ElDeveloper/following{/other_user}",
"gists_url": "https://api.github.com/users/ElDeveloper/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ElDeveloper",
"id": 375307,
"login": "ElDeveloper",
"node_id": "MDQ6VXNlcjM3NTMwNw==",
"organizations_url": "https://api.github.com/users/ElDeveloper/orgs",
"received_events_url": "https://api.github.com/users/ElDeveloper/received_events",
"repos_url": "https://api.github.com/users/ElDeveloper/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ElDeveloper/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ElDeveloper"
} | [
{
"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"
}
]
| closed | false | null | []
| {
"closed_at": "2019-01-26T00:51:26Z",
"closed_issues": 2048,
"created_at": "2018-03-29T12:00:12Z",
"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": "",
"due_on": "2019-01-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/55",
"id": 3228419,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/55/labels",
"node_id": "MDk6TWlsZXN0b25lMzIyODQxOQ==",
"number": 55,
"open_issues": 0,
"state": "closed",
"title": "0.24.0",
"updated_at": "2019-01-29T07:42:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/55"
} | 2 | 2016-05-10T19:28:40Z | 2018-08-14T10:49:11Z | 2018-08-14T10:49:11Z | CONTRIBUTOR | null | Comparing a dataframes where some series have a datatype and others a datetime type, yields the following error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-991045b5f90e> in <module>()
6 h = pd.DataFrame([['a', 'b'], ['c', 'd']], ['row1', 'row2'])
7
----> 8 x != h
/Users/yoshikivazquezbaeza/.virtualenvs/emperor/lib/python2.7/site-packages/pandas/core/ops.pyc in f(self, other)
1175 def f(self, other):
1176 if isinstance(other, pd.DataFrame): # Another DataFrame
-> 1177 return self._compare_frame(other, func, str_rep)
1178 elif isinstance(other, ABCSeries):
1179 return self._combine_series_infer(other, func)
/Users/yoshikivazquezbaeza/.virtualenvs/emperor/lib/python2.7/site-packages/pandas/core/frame.pyc in _compare_frame(self, other, func, str_rep)
3584 raise ValueError('Can only compare identically-labeled '
3585 'DataFrame objects')
-> 3586 return self._compare_frame_evaluate(other, func, str_rep)
3587
3588 def _flex_compare_frame(self, other, func, str_rep, level):
/Users/yoshikivazquezbaeza/.virtualenvs/emperor/lib/python2.7/site-packages/pandas/core/frame.pyc in _compare_frame_evaluate(self, other, func, str_rep)
3564 return dict([(col, func(a[col], b[col])) for col in a.columns])
3565
-> 3566 new_data = expressions.evaluate(_compare, str_rep, self, other)
3567 return self._constructor(data=new_data, index=self.index,
3568 columns=self.columns, copy=False)
/Users/yoshikivazquezbaeza/.virtualenvs/emperor/lib/python2.7/site-packages/pandas/computation/expressions.pyc in evaluate(op, op_str, a, b, raise_on_error, use_numexpr, **eval_kwargs)
207 if use_numexpr:
208 return _evaluate(op, op_str, a, b, raise_on_error=raise_on_error,
--> 209 **eval_kwargs)
210 return _evaluate_standard(op, op_str, a, b, raise_on_error=raise_on_error)
211
/Users/yoshikivazquezbaeza/.virtualenvs/emperor/lib/python2.7/site-packages/pandas/computation/expressions.pyc in _evaluate_standard(op, op_str, a, b, raise_on_error, **eval_kwargs)
60 if _TEST_MODE:
61 _store_test_result(False)
---> 62 return op(a, b)
63
64
/Users/yoshikivazquezbaeza/.virtualenvs/emperor/lib/python2.7/site-packages/pandas/core/frame.pyc in _compare(a, b)
3562
3563 def _compare(a, b):
-> 3564 return dict([(col, func(a[col], b[col])) for col in a.columns])
3565
3566 new_data = expressions.evaluate(_compare, str_rep, self, other)
/Users/yoshikivazquezbaeza/.virtualenvs/emperor/lib/python2.7/site-packages/pandas/core/ops.pyc in wrapper(self, other, axis)
734 if len(self) != len(other):
735 raise ValueError('Series lengths must match to compare')
--> 736 return self._constructor(na_op(self.values, other.values),
737 index=self.index, name=name)
738 elif isinstance(other, pd.DataFrame): # pragma: no cover
/Users/yoshikivazquezbaeza/.virtualenvs/emperor/lib/python2.7/site-packages/pandas/core/ops.pyc in na_op(x, y)
707 y = _index.convert_scalar(x, _values_from_object(y))
708 else:
--> 709 y = y.view('i8')
710
711 mask = isnull(x)
/Users/yoshikivazquezbaeza/.virtualenvs/emperor/lib/python2.7/site-packages/numpy/core/_internal.pyc in _view_is_safe(oldtype, newtype)
365
366 if newtype.hasobject or oldtype.hasobject:
--> 367 raise TypeError("Cannot change data-type for object array.")
368 return
369
TypeError: Cannot change data-type for object array.
```
I would expect the result to simply be `True`.
---
#### Code Sample
``` python
import pandas as pd
x = pd.DataFrame([['08/01/89', 1], ['08/01/89', 2]], ['row1', 'row2'])
x[0] = pd.to_datetime(x[0])
h = pd.DataFrame([['a', 'b'], ['c', 'd']], ['row1', 'row2'])
x != h
```
#### Expected Output
I would expect the output to be `True`.
#### output of `pd.show_versions()`
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
pandas: 0.18.1
nose: 1.3.7
pip: 1.5.4
setuptools: 21.0.0
Cython: None
numpy: 1.11.0
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: 1.4
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 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/13128/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13128/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13129 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13129/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13129/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13129/events | https://github.com/pandas-dev/pandas/issues/13129 | 154,090,963 | MDU6SXNzdWUxNTQwOTA5NjM= | 13,129 | COMPAT: comparisons master issue | {
"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"
} | [
{
"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 | []
| null | 2 | 2016-05-10T19:48:11Z | 2019-10-27T18:23:17Z | 2019-10-27T18:23:17Z | CONTRIBUTOR | null | master issue for some comparisons
- [x] #13128, datetime with string on frame
- [x] #7830, datetimeindex vs other
- [x] #8932, timestamps with frame
- [x] #12601, tz comparisons
- [x] #9369, numeric and Series
- [ ] #11565, strings and numbers
- [x] #13200 Period and Series/Index
| {
"+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/13129/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13129/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13130 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13130/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13130/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13130/events | https://github.com/pandas-dev/pandas/issues/13130 | 154,127,301 | MDU6SXNzdWUxNTQxMjczMDE= | 13,130 | PanelGroupBy.count not implemented anymore | {
"avatar_url": "https://avatars.githubusercontent.com/u/546210?v=4",
"events_url": "https://api.github.com/users/Liam3851/events{/privacy}",
"followers_url": "https://api.github.com/users/Liam3851/followers",
"following_url": "https://api.github.com/users/Liam3851/following{/other_user}",
"gists_url": "https://api.github.com/users/Liam3851/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Liam3851",
"id": 546210,
"login": "Liam3851",
"node_id": "MDQ6VXNlcjU0NjIxMA==",
"organizations_url": "https://api.github.com/users/Liam3851/orgs",
"received_events_url": "https://api.github.com/users/Liam3851/received_events",
"repos_url": "https://api.github.com/users/Liam3851/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Liam3851/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Liam3851/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Liam3851"
} | [
{
"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": "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": "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": "207de5",
"default": false,
"description": "resample method",
"id": 74975453,
"name": "Resample",
"node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 4 | 2016-05-10T23:15:50Z | 2018-07-06T20:21:10Z | 2017-07-10T21:08:31Z | CONTRIBUTOR | null | It seems that the `count` method no longer works on `PanelGroupBy` objects, instead raising `NotImplementedError`?
```
dr = pd.date_range("20160505", "20160507 23:00", freq="H")
test_panel = pd.Panel(data=np.random.random((2,72,2)), major_axis=dr)
gb = test_panel.groupby(pd.TimeGrouper('D', axis=1))
# works under all versions
gb.agg(pd.Panel.count)
# raises NotImplementedError under 0.17.1 and 0.18.1
# pandas 0.16.2 gives same result as previous line
gb.count()
```
#### output of `pd.show_versions()`
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 62 Stepping 4, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.1
setuptools: 20.7.0
Cython: 0.24
numpy: 1.10.4
scipy: 0.17.0
statsmodels: 0.6.1
xarray: 0.7.2
IPython: 4.2.0
sphinx: 1.4.1
patsy: 0.4.1
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.8.5
lxml: 3.6.0
bs4: 4.4.1
html5lib: None
httplib2: 0.9.2
apiclient: 1.4.2
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.39.0
pandas_datareader: 0.2.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/13130/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13130/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13131 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13131/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13131/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13131/events | https://github.com/pandas-dev/pandas/pull/13131 | 154,131,666 | MDExOlB1bGxSZXF1ZXN0Njk1OTYwNjU= | 13,131 | FIX: revert part of #11770 | {
"avatar_url": "https://avatars.githubusercontent.com/u/199813?v=4",
"events_url": "https://api.github.com/users/tacaswell/events{/privacy}",
"followers_url": "https://api.github.com/users/tacaswell/followers",
"following_url": "https://api.github.com/users/tacaswell/following{/other_user}",
"gists_url": "https://api.github.com/users/tacaswell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tacaswell",
"id": 199813,
"login": "tacaswell",
"node_id": "MDQ6VXNlcjE5OTgxMw==",
"organizations_url": "https://api.github.com/users/tacaswell/orgs",
"received_events_url": "https://api.github.com/users/tacaswell/received_events",
"repos_url": "https://api.github.com/users/tacaswell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tacaswell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tacaswell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tacaswell"
} | [
{
"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": "8AE234",
"default": false,
"description": null,
"id": 2413328,
"name": "Visualization",
"node_id": "MDU6TGFiZWwyNDEzMzI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Visualization"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 8 | 2016-05-10T23:50:50Z | 2016-05-21T15:57:56Z | 2016-05-20T14:34:19Z | CONTRIBUTOR | null | Reverts part of:
https://github.com/pydata/pandas/pull/11770
Closes:
https://github.com/matplotlib/matplotlib/issues/6365
The mistake in #11770 was missing that pandas had a 1/us not 1/s
scaled bucket.
| {
"+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/13131/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13131/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13131.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13131",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13131.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13131"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13132 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13132/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13132/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13132/events | https://github.com/pandas-dev/pandas/pull/13132 | 154,138,676 | MDExOlB1bGxSZXF1ZXN0Njk2MDA4Mjk= | 13,132 | pd.DataFrame.describe percentile string precision | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "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"
}
]
| closed | false | null | []
| null | 3 | 2016-05-11T00:56:27Z | 2016-05-31T15:20:04Z | 2016-05-31T15:20:04Z | NONE | null | - [ ] closes #13104
- [ ] tests added / passed
- [ ] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew pretty format returns based on decimalization of input and not just fixed to a single decimal precision
| {
"+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/13132/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13132/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13132.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13132",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13132.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13132"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13133 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13133/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13133/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13133/events | https://github.com/pandas-dev/pandas/issues/13133 | 154,147,159 | MDU6SXNzdWUxNTQxNDcxNTk= | 13,133 | API: port the magic X from pandas_ply/dplython to pandas proper? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1217238?v=4",
"events_url": "https://api.github.com/users/shoyer/events{/privacy}",
"followers_url": "https://api.github.com/users/shoyer/followers",
"following_url": "https://api.github.com/users/shoyer/following{/other_user}",
"gists_url": "https://api.github.com/users/shoyer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shoyer",
"id": 1217238,
"login": "shoyer",
"node_id": "MDQ6VXNlcjEyMTcyMzg=",
"organizations_url": "https://api.github.com/users/shoyer/orgs",
"received_events_url": "https://api.github.com/users/shoyer/received_events",
"repos_url": "https://api.github.com/users/shoyer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shoyer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shoyer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shoyer"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "207de5",
"default": false,
"description": "Requires discussion from core team before further action",
"id": 219960758,
"name": "Needs Discussion",
"node_id": "MDU6TGFiZWwyMTk5NjA3NTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Discussion"
}
]
| 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"
} | 9 | 2016-05-11T02:29:26Z | 2021-04-30T05:03:13Z | null | MEMBER | null | Many DataFrame methods ([now including `__getitem__`](https://github.com/pydata/pandas/issues/11485)) accept callables that take the DataFrame as input, e..g, `df[lambda x: x.sepal_length > 3]`.
However, this is annoyingly verbose. I recently suggested (https://github.com/pydata/pandas/issues/13040) enabling argument-free lambdas like `df[lambda: sepal_length > 3]`, but this isn't a viable solution (too much magic!) because it's impossible to implement with Python's standard scoping rules.
[pandas-ply](https://github.com/coursera/pandas-ply) and [dplython](https://github.com/dodger487/dplython) provide an alternative approach, based on a magic `X` operator, e.g.,
``` python
(flights
.groupby(['year', 'month', 'day'])
.ply_select(
arr = X.arr_delay.mean(),
dep = X.dep_delay.mean())
.ply_where(X.arr > 30, X.dep > 30))
```
pandas-ply also introduces (injects onto pandas.DataFrame) two new dataframe methods `ply_select` and `ply_where` that accept these symbolic expression build from `X`. dplython takes a different approach, introducing it's own dplyr like API for chaining expressions instead of using method chaining. The pandas-ply approach is much closer to what makes sense for pandas proper, given that we already support method chaining.
I think we should consider introducing an object like `X` into pandas proper and supporting its use on all pandas methods that accept callables that take the DataFrame as input.
I don't think we need to port `ply_select` and `ply_where`, because support for expressions in `DataFrame.assign` and indexing is a good substitute.
So my proposed syntax (after `from pandas import X`) looks like the following:
``` python
(flights
.groupby(['year', 'month', 'day'])
.assign(
arr = X.arr_delay.mean(),
dep = X.dep_delay.mean())
[(X.arr > 30) & (X.dep > 30)])
```
Indexing is a little uglier than using the `ply_where` method, but otherwise this is a nice improvement.
Best of all, we don't need do any special tricks to introduce new scopes -- we simply define `X.__getattr__` to looking attributes as columns in the DataFrame context. I expect we could even reuse the expression engines from pandas-ply or dplython directly, perhaps with a few modifications.
In my mind, this would mostly obviate the need for pandas-ply, though the alternate API provided by dpython would still be independently useful. In an ideal world, our `X` implementation in pandas would be something that could be reused by dplython.
cc @joshuahhh @dodger487
| {
"+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/13133/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13133/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13134 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13134/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13134/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13134/events | https://github.com/pandas-dev/pandas/issues/13134 | 154,148,013 | MDU6SXNzdWUxNTQxNDgwMTM= | 13,134 | pd.to_datetime raises expection when converting date object with unit param | {
"avatar_url": "https://avatars.githubusercontent.com/u/79948?v=4",
"events_url": "https://api.github.com/users/flaviodrt/events{/privacy}",
"followers_url": "https://api.github.com/users/flaviodrt/followers",
"following_url": "https://api.github.com/users/flaviodrt/following{/other_user}",
"gists_url": "https://api.github.com/users/flaviodrt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/flaviodrt",
"id": 79948,
"login": "flaviodrt",
"node_id": "MDQ6VXNlcjc5OTQ4",
"organizations_url": "https://api.github.com/users/flaviodrt/orgs",
"received_events_url": "https://api.github.com/users/flaviodrt/received_events",
"repos_url": "https://api.github.com/users/flaviodrt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/flaviodrt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/flaviodrt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/flaviodrt"
} | [
{
"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": "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 | 2016-05-11T02:37:59Z | 2016-05-11T02:52:30Z | 2016-05-11T02:41:50Z | NONE | null | Hello, since pandas 0.18.1, converting to datetime a date defined as object, using the unit parameter, raises a ValueError exception.
#### Code Sample, a copy-pastable example if possible
```
import pandas as pd
import datetime
df = pd.DataFrame([[datetime.date(2016, 5, 10)]], index=[0], columns=['date'])
pd.to_datetime(df.date, unit='D')
```
#### Expected Output
Without the unit parameter, it does not raise the exception
#### output of `pd.show_versions()`
## INSTALLED VERSIONS
commit: None
python: 2.7.3.final.0
python-bits: 64
OS: Linux
OS-release: 3.5.0-37-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: 1.3.6
pip: None
setuptools: 5.1
Cython: None
numpy: 1.11.0
scipy: 0.17.0
statsmodels: 0.5.0
xarray: None
IPython: 3.1.0
sphinx: 1.2.2
patsy: 0.2.1
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: 2.3.1
numexpr: 2.5
matplotlib: 1.4.3
openpyxl: 1.6.1
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: None
lxml: None
bs4: 4.3.2
html5lib: None
httplib2: 0.7.2
apiclient: None
sqlalchemy: 1.0.11
pymysql: None
psycopg2: None
jinja2: 2.7.2
boto: 2.27.0
pandas_datareader: 0.2.1
I've already tested with the master branch.
| {
"+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/13134/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13134/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13135 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13135/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13135/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13135/events | https://github.com/pandas-dev/pandas/issues/13135 | 154,174,618 | MDU6SXNzdWUxNTQxNzQ2MTg= | 13,135 | df.query bug giving RuntimeWarning: divide by zero encountered in log10 in align.py", line 98, in _align_core ordm = np.log10(abs(reindexer_size - term_axis_size)) | {
"avatar_url": "https://avatars.githubusercontent.com/u/830792?v=4",
"events_url": "https://api.github.com/users/aliabbasjp/events{/privacy}",
"followers_url": "https://api.github.com/users/aliabbasjp/followers",
"following_url": "https://api.github.com/users/aliabbasjp/following{/other_user}",
"gists_url": "https://api.github.com/users/aliabbasjp/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aliabbasjp",
"id": 830792,
"login": "aliabbasjp",
"node_id": "MDQ6VXNlcjgzMDc5Mg==",
"organizations_url": "https://api.github.com/users/aliabbasjp/orgs",
"received_events_url": "https://api.github.com/users/aliabbasjp/received_events",
"repos_url": "https://api.github.com/users/aliabbasjp/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aliabbasjp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aliabbasjp/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aliabbasjp"
} | [
{
"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"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 3 | 2016-05-11T07:09:03Z | 2016-08-21T13:37:54Z | 2016-08-21T13:37:54Z | NONE | null | Getting the following bug:
RuntimeWarning: divide by zero encountered in log10
C:\Users\Nick\Anaconda3\lib\site-packages\pandas\computation\align.py:98:
ordm = np.log10(abs(reindexer_size - term_axis_size))
while running query().
dtypes:
CGI int64
SITEID int32
LONGITUDE float64
LATITUDE float32
dtype: object
Query:
towerData = towerData.query('CGI != 0')
once you get this runtime warning it just halts everything and you have to restart the program.
This bug happens only in multithreaded calls to query function. I am using the concurrent.futures module for the same.
runs fine for non threaded application
| {
"+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/13135/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13135/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13136 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13136/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13136/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13136/events | https://github.com/pandas-dev/pandas/pull/13136 | 154,226,059 | MDExOlB1bGxSZXF1ZXN0Njk2NTk1NDY= | 13,136 | COMPAT: boto import issues | {
"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"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 8 | 2016-05-11T11:59:10Z | 2016-05-11T13:32:49Z | 2016-05-11T13:32:49Z | 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/13136/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13136/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13136.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13136",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13136.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13136"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/13137 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13137/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13137/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13137/events | https://github.com/pandas-dev/pandas/pull/13137 | 154,231,776 | MDExOlB1bGxSZXF1ZXN0Njk2NjM1MjY= | 13,137 | COMPAT/REF: Use s3fs for s3 IO | {
"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": "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"
}
]
| closed | false | null | []
| {
"closed_at": "2017-05-06T10:20:19Z",
"closed_issues": 987,
"created_at": "2016-02-08T15:30:21Z",
"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": "after 0.19.x series",
"due_on": "2017-05-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/39",
"id": 1570595,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels",
"node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==",
"number": 39,
"open_issues": 0,
"state": "closed",
"title": "0.20.0",
"updated_at": "2018-10-28T08:18:42Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39"
} | 34 | 2016-05-11T12:30:13Z | 2017-04-05T02:07:19Z | 2016-12-19T12:55:55Z | CONTRIBUTOR | null | - [x] closes #11915
- [x] tests added / passed
- [x] passes `git diff upstream/master | 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/13137/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13137/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13137.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13137",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13137.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13137"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13138 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13138/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13138/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13138/events | https://github.com/pandas-dev/pandas/issues/13138 | 154,254,256 | MDU6SXNzdWUxNTQyNTQyNTY= | 13,138 | Assigning multi-index DataFrame to Panel index throws exception | {
"avatar_url": "https://avatars.githubusercontent.com/u/2196196?v=4",
"events_url": "https://api.github.com/users/ohadle/events{/privacy}",
"followers_url": "https://api.github.com/users/ohadle/followers",
"following_url": "https://api.github.com/users/ohadle/following{/other_user}",
"gists_url": "https://api.github.com/users/ohadle/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ohadle",
"id": 2196196,
"login": "ohadle",
"node_id": "MDQ6VXNlcjIxOTYxOTY=",
"organizations_url": "https://api.github.com/users/ohadle/orgs",
"received_events_url": "https://api.github.com/users/ohadle/received_events",
"repos_url": "https://api.github.com/users/ohadle/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ohadle/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ohadle/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ohadle"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "0b02e1",
"default": false,
"description": "Related to indexing on series/frames, not to indexes themselves",
"id": 2822098,
"name": "Indexing",
"node_id": "MDU6TGFiZWwyODIyMDk4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Indexing"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
]
| closed | 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 | 2016-05-11T14:14:12Z | 2019-06-28T16:20:24Z | 2019-06-28T16:20:24Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```
mi = pandas.MultiIndex.from_tuples([('c', 'd'), ('e', 'd'), ('f', 'g')])
df = DataFrame({'a': [1,2,3], 'b': [1,5,6]}, index=mi)
p = Panel(data={'one': df}).transpose(1,2,0)
p.loc[:, :, 'one'] = p.loc[:, :, 'one']
```
I get:
```
TypeError: Expected tuple, got str
```
In the original case, where indices are (str, timestamp) I get:
```
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
```
Apparently I'm doing something wrong, as this works:
```
p = Panel(data={'one': df})
p.loc['one', :, :] = p.loc['one', :, :]
```
#### Output of `pd.show_versions()`
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.1
setuptools: 20.7.0
Cython: 0.24
numpy: 1.10.4
scipy: 0.17.0
statsmodels: 0.6.1
xarray: None
IPython: 4.2.0
sphinx: 1.4.1
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.8.6
lxml: 3.6.0
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext)
jinja2: 2.8
boto: 2.40.0
pandas_datareader: 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/13138/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13138/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13139 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13139/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13139/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13139/events | https://github.com/pandas-dev/pandas/issues/13139 | 154,259,274 | MDU6SXNzdWUxNTQyNTkyNzQ= | 13,139 | ERR: better error message on invalid .query input | {
"avatar_url": "https://avatars.githubusercontent.com/u/917985?v=4",
"events_url": "https://api.github.com/users/gaow/events{/privacy}",
"followers_url": "https://api.github.com/users/gaow/followers",
"following_url": "https://api.github.com/users/gaow/following{/other_user}",
"gists_url": "https://api.github.com/users/gaow/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gaow",
"id": 917985,
"login": "gaow",
"node_id": "MDQ6VXNlcjkxNzk4NQ==",
"organizations_url": "https://api.github.com/users/gaow/orgs",
"received_events_url": "https://api.github.com/users/gaow/received_events",
"repos_url": "https://api.github.com/users/gaow/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gaow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gaow/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gaow"
} | [
{
"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"
}
]
| closed | false | null | []
| {
"closed_at": "2016-11-07T20:05:26Z",
"closed_issues": 83,
"created_at": "2016-09-28T10:09:39Z",
"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": "after 0.19.0",
"due_on": "2016-10-31T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/43",
"id": 2034384,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/43/labels",
"node_id": "MDk6TWlsZXN0b25lMjAzNDM4NA==",
"number": 43,
"open_issues": 0,
"state": "closed",
"title": "0.19.1",
"updated_at": "2016-11-07T20:05:26Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/43"
} | 3 | 2016-05-11T14:35:13Z | 2016-10-24T22:13:24Z | 2016-10-24T22:13:24Z | NONE | null | #### Code Sample
``` python
import pandas as pd
import numpy as np
df = pd.DataFrame({'A': 'foo bar foo bar foo bar foo foo'.split(),
'B': 'one one two three two two one three'.split(),
'C': np.arange(8), 'D': np.arange(8) * 2})
```
#### Expected output
If I run query with an empty string I should expect no output, however:
``` python
>>> df.query('')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/miniconda3/lib/python3.5/site-packages/pandas/core/frame.py", line 2140, in query
res = self.eval(expr, **kwargs)
File "/opt/miniconda3/lib/python3.5/site-packages/pandas/core/frame.py", line 2209, in eval
return _eval(expr, inplace=inplace, **kwargs)
File "/opt/miniconda3/lib/python3.5/site-packages/pandas/computation/eval.py", line 293, in eval
return ret
UnboundLocalError: local variable 'ret' referenced before assignment
```
The problem lies on the last line of https://github.com/pydata/pandas/blob/master/pandas/computation/eval.py
I'm not sure of a proper fix so I'm opening this issue instead of pull request.
#### output of `pd.show_versions()`
```
>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Linux
OS-release: 3.16.0-4-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.0
nose: None
pip: 8.1.1
setuptools: 20.3
Cython: None
numpy: 1.11.0
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: None
patsy: None
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: None
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 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/13139/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13139/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13140 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13140/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13140/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13140/events | https://github.com/pandas-dev/pandas/issues/13140 | 154,278,489 | MDU6SXNzdWUxNTQyNzg0ODk= | 13,140 | df.style des not render pivot tables in the same fashion as to_html | {
"avatar_url": "https://avatars.githubusercontent.com/u/1834828?v=4",
"events_url": "https://api.github.com/users/gbronner/events{/privacy}",
"followers_url": "https://api.github.com/users/gbronner/followers",
"following_url": "https://api.github.com/users/gbronner/following{/other_user}",
"gists_url": "https://api.github.com/users/gbronner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gbronner",
"id": 1834828,
"login": "gbronner",
"node_id": "MDQ6VXNlcjE4MzQ4Mjg=",
"organizations_url": "https://api.github.com/users/gbronner/orgs",
"received_events_url": "https://api.github.com/users/gbronner/received_events",
"repos_url": "https://api.github.com/users/gbronner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gbronner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gbronner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gbronner"
} | [
{
"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": "006b75",
"default": false,
"description": "read_html, to_html, Styler.apply, Styler.applymap",
"id": 57395487,
"name": "IO HTML",
"node_id": "MDU6TGFiZWw1NzM5NTQ4Nw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HTML"
},
{
"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 | []
| null | 2 | 2016-05-11T15:53:16Z | 2016-05-17T02:18:43Z | 2016-05-17T02:18:43Z | NONE | null | Please see
http://stackoverflow.com/questions/37166730/how-do-i-preserve-hierarchical-tables-with-pandas-pivot-table-and-dataframe-styl
#### Code Sample, a copy-pastable example if possible
```
import pandas as pd
import numpy as np
np.random.seed(0)
a = np.random.randint(1, 4, 10)
b = np.random.randint(1, 4, 10)
c = np.random.randint(5, 9, 10)
df = pd.DataFrame(dict(A=a,B=b,C=c,Val=np.random.randint(1,10,10)))
tbl=pd.pivot_table(df,index=['A','B','C'], aggfunc=sum)
print tbl.to_html()
print tbl.style.render()
```
#### Expected Output
Expect that both tables will produce nearly indentical hierarchically structured tables, and in particular, the second table will not have every index value repeated.
`<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th></th>
<th></th>
<th>Val</th>
</tr>
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<th rowspan="4" valign="top">1</th>
<th>1</th>
<th>5</th>
<td>1</td>
</tr>
<tr>
<th rowspan="3" valign="top">2</th>
<th>5</th>
<td>4</td>
</tr>
<tr>
<th>6</th>
<td>4</td>
</tr>
<tr>
<th>8</th>
<td>9</td>
</tr>
<tr>
<th rowspan="3" valign="top">2</th>
<th rowspan="3" valign="top">3</th>
<th>5</th>
<td>2</td>
</tr>
<tr>
<th>6</th>
<td>3</td>
</tr>
<tr>
<th>8</th>
<td>9</td>
</tr>
<tr>
<th rowspan="2" valign="top">3</th>
<th>1</th>
<th>8</th>
<td>4</td>
</tr>
<tr>
<th>2</th>
<th>7</th>
<td>4</td>
</tr>
</tbody>
</table>
```
<style type="text/css" >
</style>
<table id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" None>
<thead>
<tr>
<th class="blank">
<th class="blank">
<th class="blank">
<th class="col_heading level0 col0">Val
</tr>
<tr>
<th class="col_heading level2 col0">A
<th class="col_heading level2 col1">B
<th class="col_heading level2 col2">C
<th class="blank">
</tr>
</thead>
<tbody>
<tr>
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level2 row0">
1
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level2 row0">
1
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level2 row0">
5
<td id="T_ae86631e_1789_11e6_aa5c_3417ebaea714row0_col0" class="data row0 col0">
1
</tr>
<tr>
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row1">
1
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row1">
2
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row1">
5
<td id="T_ae86631e_1789_11e6_aa5c_3417ebaea714row1_col0" class="data row1 col0">
4
</tr>
<tr>
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row2">
1
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row2">
2
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row2">
6
<td id="T_ae86631e_1789_11e6_aa5c_3417ebaea714row2_col0" class="data row2 col0">
4
</tr>
<tr>
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row3">
1
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row3">
2
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row3">
8
<td id="T_ae86631e_1789_11e6_aa5c_3417ebaea714row3_col0" class="data row3 col0">
9
</tr>
<tr>
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row4">
2
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row4">
3
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row4">
5
<td id="T_ae86631e_1789_11e6_aa5c_3417ebaea714row4_col0" class="data row4 col0">
2
</tr>
<tr>
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row5">
2
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row5">
3
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row5">
6
<td id="T_ae86631e_1789_11e6_aa5c_3417ebaea714row5_col0" class="data row5 col0">
3
</tr>
<tr>
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row6">
2
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row6">
3
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row6">
8
<td id="T_ae86631e_1789_11e6_aa5c_3417ebaea714row6_col0" class="data row6 col0">
9
</tr>
<tr>
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row7">
3
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row7">
1
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row7">
8
<td id="T_ae86631e_1789_11e6_aa5c_3417ebaea714row7_col0" class="data row7 col0">
4
</tr>
<tr>
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row8">
3
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row8">
2
<th id="T_ae86631e_1789_11e6_aa5c_3417ebaea714" class="row_heading level0 row8">
7
<td id="T_ae86631e_1789_11e6_aa5c_3417ebaea714row8_col0" class="data row8 col0">
4
</tr>
</tbody>
</table>`
```
#### output of `pd.show_versions()`
## INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 32
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1
nose: None
pip: 8.1.1
setuptools: 20.2.2
Cython: None
numpy: 1.11.0
scipy: None
statsmodels: None
xarray: None
IPython: 4.1.2
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: 1.0.0
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 0.2.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/13140/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13140/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13141 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13141/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13141/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13141/events | https://github.com/pandas-dev/pandas/issues/13141 | 154,279,271 | MDU6SXNzdWUxNTQyNzkyNzE= | 13,141 | [ENH] pandas.read_html argument to interpret hyperlinks as links (not merely text) | {
"avatar_url": "https://avatars.githubusercontent.com/u/8431341?v=4",
"events_url": "https://api.github.com/users/zeluspudding/events{/privacy}",
"followers_url": "https://api.github.com/users/zeluspudding/followers",
"following_url": "https://api.github.com/users/zeluspudding/following{/other_user}",
"gists_url": "https://api.github.com/users/zeluspudding/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zeluspudding",
"id": 8431341,
"login": "zeluspudding",
"node_id": "MDQ6VXNlcjg0MzEzNDE=",
"organizations_url": "https://api.github.com/users/zeluspudding/orgs",
"received_events_url": "https://api.github.com/users/zeluspudding/received_events",
"repos_url": "https://api.github.com/users/zeluspudding/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zeluspudding/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zeluspudding/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zeluspudding"
} | [
{
"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": "006b75",
"default": false,
"description": "read_html, to_html, Styler.apply, Styler.applymap",
"id": 57395487,
"name": "IO HTML",
"node_id": "MDU6TGFiZWw1NzM5NTQ4Nw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20HTML"
}
]
| open | false | null | []
| null | 5 | 2016-05-11T15:56:37Z | 2021-02-13T13:11:51Z | null | NONE | null | For starters I'd just like to share that pandas is AWESOME! Thank you to all who contribute and make this lean, mean number crunching machine available to others like me.
pandas.read_html is super convenient for making dataframes from the web! The power of the web is that it's just that... a web of many highly interconnected data chunks. Being able to get the hyperlinks in an HTML table instead of the plain `text that is hyperlinked` would be a great productivity boost for web scraping.
Take the example of [getting links to SEC forms](https://www.sec.gov/cgi-bin/own-disp?action=getissuer&CIK=0001408356&type=&dateb=&owner=include&start=80). Here, one is probably more interested in getting the link to an insider [trading disclosure form](https://www.sec.gov/Archives/edgar/data/0001408356/000118143112066423/0001181431-12-066423-index.htm) rather then merely the type of form (typically form 4).
Baking this functionality into read_html also averts the need to double parse HTML as in this StackOverflow post - http://stackoverflow.com/questions/31771619/html-table-to-pandas-table-info-inside-html-tags
| {
"+1": 11,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 11,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/13141/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13141/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13142 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13142/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13142/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13142/events | https://github.com/pandas-dev/pandas/pull/13142 | 154,283,856 | MDExOlB1bGxSZXF1ZXN0Njk3MDA0NjU= | 13,142 | Implement is_array_like | {
"avatar_url": "https://avatars.githubusercontent.com/u/4219021?v=4",
"events_url": "https://api.github.com/users/sornars/events{/privacy}",
"followers_url": "https://api.github.com/users/sornars/followers",
"following_url": "https://api.github.com/users/sornars/following{/other_user}",
"gists_url": "https://api.github.com/users/sornars/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sornars",
"id": 4219021,
"login": "sornars",
"node_id": "MDQ6VXNlcjQyMTkwMjE=",
"organizations_url": "https://api.github.com/users/sornars/orgs",
"received_events_url": "https://api.github.com/users/sornars/received_events",
"repos_url": "https://api.github.com/users/sornars/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sornars/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sornars/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sornars"
} | [
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 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"
} | 19 | 2016-05-11T16:16:48Z | 2016-10-04T01:31:13Z | 2016-09-15T10:10:49Z | NONE | null | - [ ] closes #12764
- [ ] tests added / passed
- [ ] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew entry
Is it worth using this PR to consolidate how the common package is imported across modules? Some files use `from pandas.core.common import *` style whereas others use `import pandas.core.common as com`. Some even use both styles in the same file - is there a style preference and should I go ahead and fix this now?
| {
"+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/13142/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13142/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13142.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13142",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13142.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13142"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13143 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13143/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13143/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13143/events | https://github.com/pandas-dev/pandas/issues/13143 | 154,296,905 | MDU6SXNzdWUxNTQyOTY5MDU= | 13,143 | sample not using numpy's random state | {
"avatar_url": "https://avatars.githubusercontent.com/u/19950?v=4",
"events_url": "https://api.github.com/users/ariddell/events{/privacy}",
"followers_url": "https://api.github.com/users/ariddell/followers",
"following_url": "https://api.github.com/users/ariddell/following{/other_user}",
"gists_url": "https://api.github.com/users/ariddell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ariddell",
"id": 19950,
"login": "ariddell",
"node_id": "MDQ6VXNlcjE5OTUw",
"organizations_url": "https://api.github.com/users/ariddell/orgs",
"received_events_url": "https://api.github.com/users/ariddell/received_events",
"repos_url": "https://api.github.com/users/ariddell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ariddell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ariddell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ariddell"
} | [
{
"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": "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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 4 | 2016-05-11T17:19:34Z | 2016-05-21T14:37:56Z | 2016-05-21T14:37:56Z | NONE | null | After fixing a random seed with `numpy.random.seed`, I expect `sample` to yield the same results.
Expected behavior of `numpy.random.choice` but found something different. Here is pandas:
``` python
In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: df = pd.DataFrame(np.arange(1000))
In [12]: np.random.seed(5); df.sample(2)
Out[12]:
0
824 824
225 225
In [13]: np.random.seed(5); df.sample(2)
Out[13]:
0
182 182
586 586
```
Whereas numpy.random.choice is consistent
```
In [6]: np.random.seed(5); np.random.choice(1000)
Out[6]: 867
In [7]: np.random.seed(5); np.random.choice(1000)
Out[7]: 867
```
#### output of `pd.show_versions()`
```
In [8]: pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.4.3.final.0
python-bits: 64
OS: Linux
OS-release: 3.16.0-67-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: 1.3.1
pip: 8.1.1
setuptools: 18.4
Cython: 0.23.4
numpy: 1.11.0
scipy: 0.16.1
statsmodels: 0.6.1
xarray: None
IPython: 4.0.1
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: 3.2.2
numexpr: 2.4.4
matplotlib: 1.5.0
openpyxl: None
xlrd: 0.9.4
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.2.1
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 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/13143/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13143/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13144 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13144/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13144/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13144/events | https://github.com/pandas-dev/pandas/issues/13144 | 154,328,251 | MDU6SXNzdWUxNTQzMjgyNTE= | 13,144 | SparseSeries throws a ValueError exception when printing large arrays | {
"avatar_url": "https://avatars.githubusercontent.com/u/4396228?v=4",
"events_url": "https://api.github.com/users/bryanwweber/events{/privacy}",
"followers_url": "https://api.github.com/users/bryanwweber/followers",
"following_url": "https://api.github.com/users/bryanwweber/following{/other_user}",
"gists_url": "https://api.github.com/users/bryanwweber/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bryanwweber",
"id": 4396228,
"login": "bryanwweber",
"node_id": "MDQ6VXNlcjQzOTYyMjg=",
"organizations_url": "https://api.github.com/users/bryanwweber/orgs",
"received_events_url": "https://api.github.com/users/bryanwweber/received_events",
"repos_url": "https://api.github.com/users/bryanwweber/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bryanwweber/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bryanwweber/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bryanwweber"
} | [
{
"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": "009800",
"default": false,
"description": "Sparse Data Type",
"id": 49182326,
"name": "Sparse",
"node_id": "MDU6TGFiZWw0OTE4MjMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 4 | 2016-05-11T19:53:31Z | 2016-05-13T13:21:47Z | 2016-05-13T13:21:47Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```
import scipy.sparse as sps
import pandas as pd
A = sps.rand(350, 18)
ss = pd.SparseSeries.from_coo(A)
print(ss)
A = sps.rand(350, 17)
ss = pd.SparseSeries.from_coo(A)
print(ss)
```
#### Expected Output
The expected output is that both cases print the SparseSeries. However, only the second case is printed properly. The first case throws the following exception:
```
Traceback (most recent call last):
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/sparse/series.py", line 420, in _get_values
fastpath=True).__finalize__(self)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/sparse/series.py", line 222, in __init__
self.index = index
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/generic.py", line 2685, in __setattr__
return object.__setattr__(self, name, value)
File "pandas/src/properties.pyx", line 65, in pandas.lib.AxisProperty.__set__ (pandas/lib.c:44748)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/series.py", line 274, in _set_axis
labels = _ensure_index(labels)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/indexes/base.py", line 3409, in _ensure_index
return Index(index_like)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/indexes/base.py", line 268, in __new__
cls._scalar_data_error(data)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/indexes/base.py", line 483, in _scalar_data_error
repr(data)))
TypeError: Index(...) must be called with a collection of some kind, None was passed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/base.py", line 46, in __str__
return self.__unicode__()
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/sparse/series.py", line 306, in __unicode__
series_rep = Series.__unicode__(self)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/series.py", line 984, in __unicode__
max_rows=max_rows)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/series.py", line 1025, in to_string
dtype=dtype, name=name, max_rows=max_rows)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/series.py", line 1052, in _get_repr
max_rows=max_rows)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/formats/format.py", line 145, in __init__
self._chk_truncate()
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/formats/format.py", line 158, in _chk_truncate
series = concat((series.iloc[:row_num],
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/indexing.py", line 1296, in __getitem__
return self._getitem_axis(key, axis=0)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/indexing.py", line 1587, in _getitem_axis
return self._get_slice_axis(key, axis=axis)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/indexing.py", line 1579, in _get_slice_axis
return self._slice(slice_obj, axis=axis, kind='iloc')
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/indexing.py", line 99, in _slice
return self.obj._slice(obj, axis=axis, kind=kind)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/core/series.py", line 578, in _slice
return self._get_values(slobj)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/sparse/series.py", line 422, in _get_values
return self[indexer]
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/sparse/series.py", line 396, in __getitem__
return self._get_val_at(self.index.get_loc(key))
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/sparse/series.py", line 392, in _get_val_at
return self.block.values._get_val_at(loc)
File "/Users/bryan/anaconda3/lib/python3.5/site-packages/pandas/sparse/array.py", line 308, in _get_val_at
if loc < 0:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
```
#### output of `pd.show_versions()`
```
>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: None
pip: 8.1.1
setuptools: 20.7.0
Cython: 0.24
numpy: 1.11.0
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: 1.4.1
patsy: None
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: None
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: 0.9.2
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 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/13144/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13144/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13145 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13145/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13145/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13145/events | https://github.com/pandas-dev/pandas/pull/13145 | 154,340,908 | MDExOlB1bGxSZXF1ZXN0Njk3NDA4NTY= | 13,145 | Fine-grained errstate handling | {
"avatar_url": "https://avatars.githubusercontent.com/u/46135?v=4",
"events_url": "https://api.github.com/users/rkern/events{/privacy}",
"followers_url": "https://api.github.com/users/rkern/followers",
"following_url": "https://api.github.com/users/rkern/following{/other_user}",
"gists_url": "https://api.github.com/users/rkern/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rkern",
"id": 46135,
"login": "rkern",
"node_id": "MDQ6VXNlcjQ2MTM1",
"organizations_url": "https://api.github.com/users/rkern/orgs",
"received_events_url": "https://api.github.com/users/rkern/received_events",
"repos_url": "https://api.github.com/users/rkern/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rkern/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rkern/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rkern"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 14 | 2016-05-11T20:55:37Z | 2016-08-21T13:54:47Z | 2016-08-21T13:37:54Z | CONTRIBUTOR | null | - [x] closes #13109
- [x] closes #13135
- [x] tests passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
The precise strategy to be taken here is open for discussion. I tried to be reasonably fine-grained rather than slap a generic decorator over everything because it's easier to go that direction than the reverse. The `errstate()` blocks in the tests were added _after_ fixing all of the library code. Unfortunately, these are less fine-grained than I would like because some of the tests have many lines of the form `assert_array_equal(pandas_expression_to_test, expected_raw_numpy_expression)` where `expected_raw_numpy_expression` is what is triggering the warning. It was tedious to try to rewrite all of that to wrap just `expected_raw_numpy_expression`.
I think I got everything exercised by the test suite except for parts of the test suite that are skipped on my machine due to dependencies. We'll see how things go in the CI.
I haven't added any new tests yet. Could do if requested.
| {
"+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/13145/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13145/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13145.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13145",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13145.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13145"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13146 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13146/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13146/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13146/events | https://github.com/pandas-dev/pandas/issues/13146 | 154,344,513 | MDU6SXNzdWUxNTQzNDQ1MTM= | 13,146 | describe() returns RuntimeWarning: Invalid value encountered in median RuntimeWarning | {
"avatar_url": "https://avatars.githubusercontent.com/u/1315854?v=4",
"events_url": "https://api.github.com/users/msure/events{/privacy}",
"followers_url": "https://api.github.com/users/msure/followers",
"following_url": "https://api.github.com/users/msure/following{/other_user}",
"gists_url": "https://api.github.com/users/msure/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/msure",
"id": 1315854,
"login": "msure",
"node_id": "MDQ6VXNlcjEzMTU4NTQ=",
"organizations_url": "https://api.github.com/users/msure/orgs",
"received_events_url": "https://api.github.com/users/msure/received_events",
"repos_url": "https://api.github.com/users/msure/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/msure/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/msure/subscriptions",
"type": "User",
"url": "https://api.github.com/users/msure"
} | [
{
"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": "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"
}
]
| closed | false | null | []
| null | 1 | 2016-05-11T21:14:02Z | 2016-05-11T21:37:09Z | 2016-05-11T21:36:55Z | NONE | null | I just upgraded to 18.1 w/ conda. I started noticing this problem in some notebooks I created before the upgrade but recently revisited for further analysis.
#### Code Sample, a copy-pastable example if possible
``` python
import numpy as np
import pandas as pd
df = pd.DataFrame({'task_complete':['success','success','fail','fail','success','fail','success'],
'value':[np.nan,4.5,5.7,3.0,np.nan,6.7,3.78]})
```
`df.value.describe()` returns a RuntimeWarning from numpy, which then gives this unexpected result for the quantiles:
``` python
In [5]: df.value.describe()
/Users/adrianpalacios/anaconda/lib/python3.4/site-packages/numpy/lib/function_base.py:3403: RuntimeWarning: Invalid value encountered in median
RuntimeWarning)
Out[5]:
count 5.000000
mean 4.736000
std 1.480703
min 3.000000
25% NaN
50% NaN
75% NaN
max 6.700000
Name: value, dtype: float64
```
#### Expected Output
I got this using a different conda environment that has not been upgraded to latest pandas version:
``` python
In [5]: df.value.describe()
Out[5]:
count 5.000000
mean 4.736000
std 1.480703
min 3.000000
25% 3.780000
50% 4.500000
75% 5.700000
max 6.700000
Name: value, dtype: float64
```
Dropping the NaN's works in pandas 18.1:
``` python
In [9]: df.value.dropna().describe()
Out[9]:
count 5.000000
mean 4.736000
std 1.480703
min 3.000000
25% 3.780000
50% 4.500000
75% 5.700000
max 6.700000
Name: value, dtype: float64
```
However, this work-around is not a great option when multiple columns w/ NaNs are present:
``` python
df2 = pd.DataFrame({'task_complete':['success','success','fail','fail','success','fail','success'],
'value':[np.nan,4.5,5.7,3.0,np.nan,6.7,3.78],
'more_values':[8.2,np.nan,np.nan,np.nan,9.4,np.nan,np.nan]
})
In [17]: df2[['value','more_values']].dropna().describe()
Out[17]:
value more_values
count 0.0 0.0
mean NaN NaN
std NaN NaN
min NaN NaN
25% NaN NaN
50% NaN NaN
75% NaN NaN
max NaN NaN
```
#### output of `pd.show_versions()`
## INSTALLED VERSIONS
commit: None
python: 3.4.4.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.1
setuptools: 20.2.2
Cython: 0.22.1
numpy: 1.10.4
scipy: 0.17.0
statsmodels: 0.6.1
xarray: None
IPython: 4.2.0
sphinx: 1.3.1
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: 1.0.0
tables: 3.2.0
numexpr: 2.5
matplotlib: 1.5.1
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: 1.0.0
xlsxwriter: 0.7.3
lxml: 3.4.4
bs4: 4.3.2
html5lib: None
httplib2: 0.9.1
apiclient: None
sqlalchemy: 1.0.5
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.38.0
pandas_datareader: None
| {
"+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/13146/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13146/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13147 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13147/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13147/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13147/events | https://github.com/pandas-dev/pandas/pull/13147 | 154,352,313 | MDExOlB1bGxSZXF1ZXN0Njk3NDkyMDM= | 13,147 | CLN: reorg type inference & introspection | {
"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"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 35 | 2016-05-11T21:56:46Z | 2016-07-13T11:52:44Z | 2016-07-13T11:52:44Z | CONTRIBUTOR | null | closes #12503
So this is the big boy. destroyed `core/common.py` and split up. Now have no more import issues and a nice private API. Nothing is exported by default. You have to explicity import things.
There is now a `pandas.api`, so:
```
In [1]: from pandas import api
In [2]: dir(api)
Out[2]:
['__builtins__',
'__doc__',
'__file__',
'__name__',
'__package__',
'__path__',
'is_any_int_dtype',
'is_bool',
'is_bool_dtype',
'is_categorical',
'is_categorical_dtype',
'is_complex',
'is_complex_dtype',
'is_datetime64_any_dtype',
'is_datetime64_dtype',
'is_datetime64_ns_dtype',
'is_datetime64tz_dtype',
'is_datetimetz',
'is_dtype_equal',
'is_extension_type',
'is_float',
'is_float_dtype',
'is_floating_dtype',
'is_int64_dtype',
'is_integer',
'is_integer_dtype',
'is_number',
'is_numeric_dtype',
'is_object_dtype',
'is_scalar',
'is_sparse',
'is_string_dtype',
'is_timedelta64_dtype',
'is_timedelta64_ns_dtype',
'np',
'pandas_dtype',
'types']
```
Previously `pandas.core.common` was a huge namespace of everything under the sun. As a result, you often had to do `com.` imports to do stuff, and sometimes import inside a function.
These are essentially hierarchically arrange in order of deps.
- `pandas.types`
- `generic` : `ABC*` class infererence, no deps
- `dtypes` : extension dtypes, no deps
- `inference` : scalar / and `is_list_list` instrospection, no deps
- `common` : imports all from `inference` (for convenience), adds all `is_*_dtype` things. deps on dtypes, generic, inference
- `missing` : `isnull`, `notnull`, `array_equivalent` : deps on common
- `cast` : the old `core.convert` and all types of inference / conversions that littered core.common, deps on common. Mostly this is private stuff that Series/DataFrame uses (e.g. most methods are `_` leading)
`pandas.core.common` now doesn't depend on anything else.
So now can easily write:
`from pandas.types.common import is_integer` or whatever at the top of any file and it will just work. Further almost all references to `com` gone.
This only change was I added `array_equivalent` to the `pd.` namespace, as formerly it was accessible as by:
```
from pandas.core.common import array_equivalent
```
There _should_ be NO user facing changes at all, but I will put a note that warns if people were using the 'private' API (IOW if they were directly importing stuff), then things have moved.
@wesm @jorisvandenbossche @shoyer @TomAugspurger @sinhrks
| {
"+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/13147/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13147/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13147.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13147",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13147.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13147"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13148 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13148/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13148/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13148/events | https://github.com/pandas-dev/pandas/pull/13148 | 154,380,475 | MDExOlB1bGxSZXF1ZXN0Njk3NjkwNDE= | 13,148 | COMPAT: Further Expand Compatibility with fromnumeric.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/9273653?v=4",
"events_url": "https://api.github.com/users/gfyoung/events{/privacy}",
"followers_url": "https://api.github.com/users/gfyoung/followers",
"following_url": "https://api.github.com/users/gfyoung/following{/other_user}",
"gists_url": "https://api.github.com/users/gfyoung/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gfyoung",
"id": 9273653,
"login": "gfyoung",
"node_id": "MDQ6VXNlcjkyNzM2NTM=",
"organizations_url": "https://api.github.com/users/gfyoung/orgs",
"received_events_url": "https://api.github.com/users/gfyoung/received_events",
"repos_url": "https://api.github.com/users/gfyoung/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gfyoung/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gfyoung/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gfyoung"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 9 | 2016-05-12T01:55:13Z | 2016-05-20T23:53:31Z | 2016-05-20T13:19:33Z | MEMBER | null | Follow-on to #12810 by expanding compatibility with `fromnumeric.py` in the following modules:
1) `tslib.pyx`
2) `window.py`
3) `groupby.py` and `resample.py` (shared classes)
Closes #12811.
| {
"+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/13148/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13148/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13148.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13148",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13148.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13148"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13149 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13149/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13149/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13149/events | https://github.com/pandas-dev/pandas/issues/13149 | 154,385,124 | MDU6SXNzdWUxNTQzODUxMjQ= | 13,149 | NaNs in Float64Index are converted to silly integers using index.astype('int') | {
"avatar_url": "https://avatars.githubusercontent.com/u/1684060?v=4",
"events_url": "https://api.github.com/users/mao-liu/events{/privacy}",
"followers_url": "https://api.github.com/users/mao-liu/followers",
"following_url": "https://api.github.com/users/mao-liu/following{/other_user}",
"gists_url": "https://api.github.com/users/mao-liu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mao-liu",
"id": 1684060,
"login": "mao-liu",
"node_id": "MDQ6VXNlcjE2ODQwNjA=",
"organizations_url": "https://api.github.com/users/mao-liu/orgs",
"received_events_url": "https://api.github.com/users/mao-liu/received_events",
"repos_url": "https://api.github.com/users/mao-liu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mao-liu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mao-liu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mao-liu"
} | [
{
"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"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 6 | 2016-05-12T02:42:59Z | 2016-05-23T20:45:45Z | 2016-05-23T20:45:45Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```
>>> df = pd.DataFrame({'a': [1, 2], 'b': [3, 4]})
>>> df.index = [None, 1]
>>> df
a b
NaN 1 3
1.0 2 4
>>> df.index = df.index.astype('int')
>>> df
a b
-9223372036854775808 1 3
1 2 4
```
#### output of `pd.show_versions()`
```
>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Linux
OS-release: 4.1.13-100.fc21.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_AU.utf8
pandas: 0.18.1
nose: None
pip: 8.1.1
setuptools: 20.2.2
Cython: None
numpy: 1.11.0
scipy: 0.17.0
statsmodels: None
xarray: 0.7.2
IPython: 4.2.0
sphinx: 1.3.5
patsy: None
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 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/13149/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13149/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13150 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13150/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13150/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13150/events | https://github.com/pandas-dev/pandas/issues/13150 | 154,387,870 | MDU6SXNzdWUxNTQzODc4NzA= | 13,150 | read_excel: fails for Python 3.5.1/Pandas 0.18.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/8621179?v=4",
"events_url": "https://api.github.com/users/cstoudt/events{/privacy}",
"followers_url": "https://api.github.com/users/cstoudt/followers",
"following_url": "https://api.github.com/users/cstoudt/following{/other_user}",
"gists_url": "https://api.github.com/users/cstoudt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cstoudt",
"id": 8621179,
"login": "cstoudt",
"node_id": "MDQ6VXNlcjg2MjExNzk=",
"organizations_url": "https://api.github.com/users/cstoudt/orgs",
"received_events_url": "https://api.github.com/users/cstoudt/received_events",
"repos_url": "https://api.github.com/users/cstoudt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cstoudt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cstoudt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cstoudt"
} | [
{
"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 | 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 | 2016-05-12T03:12:58Z | 2016-05-12T15:16:12Z | 2016-05-12T13:03:17Z | NONE | null | I'm running Anaconda 64-bit, Python 3.51 (pandas: 0.18.0) and 2.7 (pandas: 0.17.1.)
When I'm in the 2.7 environment, read_excel works properly
``` python
import pandas as pd
d=pd.read_excel(XLS1)
*** No CODEPAGE record, no encoding_override: will use 'ascii'
```
In the 3.5 environment, I get the following error:
``` python
import pandas as pd
d=pd.read_excel(XLS1)
*** No CODEPAGE record, no encoding_override: will use 'ascii'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-79b86582347b> in <module>()
----> 1 d=pd.read_excel(XLS1)
/opt/continuum/anaconda3/lib/python3.5/site-packages/pandas/io/excel.py in read_excel(io, sheetname, header, skiprows, skip_footer, index_col, names, parse_cols, parse_dates, date_parser, na_values, thousands, convert_float, has_index_names, converters, engine, squeeze, **kwds)
167 """
168 if not isinstance(io, ExcelFile):
--> 169 io = ExcelFile(io, engine=engine)
170
171 return io._parse_excel(
/opt/continuum/anaconda3/lib/python3.5/site-packages/pandas/io/excel.py in __init__(self, io, **kwds)
216 self.book = xlrd.open_workbook(file_contents=data)
217 else:
--> 218 self.book = xlrd.open_workbook(io)
219 elif engine == 'xlrd' and isinstance(io, xlrd.Book):
220 self.book = io
/opt/continuum/anaconda3/lib/python3.5/site-packages/xlrd/__init__.py in open_workbook(filename, logfile, verbosity, use_mmap, file_contents, encoding_override, formatting_info, on_demand, ragged_rows)
439 formatting_info=formatting_info,
440 on_demand=on_demand,
--> 441 ragged_rows=ragged_rows,
442 )
443 return bk
/opt/continuum/anaconda3/lib/python3.5/site-packages/xlrd/book.py in open_workbook_xls(filename, logfile, verbosity, use_mmap, file_contents, encoding_override, formatting_info, on_demand, ragged_rows)
105 "*** Setting on_demand to False.\n")
106 bk.on_demand = on_demand = False
--> 107 bk.fake_globals_get_sheet()
108 elif biff_version == 45:
109 # worksheet(s) embedded in global stream
/opt/continuum/anaconda3/lib/python3.5/site-packages/xlrd/book.py in fake_globals_get_sheet(self)
685 self._sheet_visibility = [0] # one sheet, visible
686 self._sheet_list.append(None) # get_sheet updates _sheet_list but needs a None beforehand
--> 687 self.get_sheets()
688
689 def handle_boundsheet(self, data):
/opt/continuum/anaconda3/lib/python3.5/site-packages/xlrd/book.py in get_sheets(self)
676 for sheetno in xrange(len(self._sheet_names)):
677 if DEBUG: print("GET_SHEETS: sheetno =", sheetno, self._sheet_names, self._sh_abs_posn, file=self.logfile)
--> 678 self.get_sheet(sheetno)
679
680 def fake_globals_get_sheet(self): # for BIFF 4.0 and earlier
/opt/continuum/anaconda3/lib/python3.5/site-packages/xlrd/book.py in get_sheet(self, sh_number, update_pos)
667 sh_number,
668 )
--> 669 sh.read(self)
670 self._sheet_list[sh_number] = sh
671 return sh
/opt/continuum/anaconda3/lib/python3.5/site-packages/xlrd/sheet.py in read(self, bk)
1473 % (self.number, self.name))
1474 self.tidy_dimensions()
-> 1475 self.update_cooked_mag_factors()
1476 bk._position = oldpos
1477 return 1
/opt/continuum/anaconda3/lib/python3.5/site-packages/xlrd/sheet.py in update_cooked_mag_factors(self)
1541 # VALID, defaults to 60
1542 zoom = 60
-> 1543 elif not (10 <= zoom <= 400):
1544 if blah:
1545 print((
TypeError: unorderable type: int() <= NoneType()
```
## INSTALLED VERSIONS
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Linux
OS-release: 3.16.0-38-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.0
nose: 1.3.7
pip: 8.1.1
setuptools: 20.3
Cython: 0.23.4
numpy: 1.10.4
scipy: 0.17.0
statsmodels: 0.6.1
xarray: None
IPython: 4.1.2
sphinx: 1.3.5
patsy: 0.4.0
dateutil: 2.5.1
pytz: 2016.2
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.8.4
lxml: 3.6.0
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.39.0
## INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Linux
OS-release: 3.16.0-38-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.17.1
nose: 1.3.7
pip: 8.0.2
setuptools: 19.6.2
Cython: 0.23.4
numpy: 1.10.4
scipy: 0.17.0
statsmodels: 0.6.1
IPython: 4.0.3
sphinx: 1.3.5
patsy: 0.4.0
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.4.6
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.8.4
lxml: 3.5.0
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.11
pymysql: None
psycopg2: None
Jinja2: 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/13150/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13150/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13151 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13151/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13151/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13151/events | https://github.com/pandas-dev/pandas/issues/13151 | 154,392,865 | MDU6SXNzdWUxNTQzOTI4NjU= | 13,151 | why resample with group by not pad null value | {
"avatar_url": "https://avatars.githubusercontent.com/u/11285770?v=4",
"events_url": "https://api.github.com/users/starplanet/events{/privacy}",
"followers_url": "https://api.github.com/users/starplanet/followers",
"following_url": "https://api.github.com/users/starplanet/following{/other_user}",
"gists_url": "https://api.github.com/users/starplanet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/starplanet",
"id": 11285770,
"login": "starplanet",
"node_id": "MDQ6VXNlcjExMjg1Nzcw",
"organizations_url": "https://api.github.com/users/starplanet/orgs",
"received_events_url": "https://api.github.com/users/starplanet/received_events",
"repos_url": "https://api.github.com/users/starplanet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/starplanet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/starplanet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/starplanet"
} | [
{
"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": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 4 | 2016-05-12T04:07:14Z | 2016-05-12T10:30:57Z | 2016-05-12T10:30:57Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
I use resample with group by method to run following code:
```
import pandas as pd
data = [{'buyer_id': 1, 'pay_time': '2016-01-01', 'tid': '11'}, {'buyer_id': 1, 'pay_time': '2016-01-03', 'tid': '12'}, {'buyer_id': 1, 'pay_time': '2016-01-05', 'tid': '13'}, {'buyer_id': 2, 'pay_time': '2016-01-01', 'tid': '21'}, {'buyer_id': 2, 'pay_time': '2016-01-02', 'tid': '22'}, {'buyer_id': 2, 'pay_time': '2016-01-05', 'tid': '23'}]
df['pay_time'] = pd.to_datetime(df['pay_time'])
df.set_index('pay_time').groupby('buyer_id').resample('1D').count()
```
program output like following:
```
buyer_id tid
buyer_id pay_time
1 2016-01-01 1 1
2016-01-03 1 1
2016-01-05 1 1
2 2016-01-01 1 1
2016-01-02 1 1
2016-01-05 1 1
```
but I want the output could pad the missing data with 0 like this:
```
buyer_id tid
buyer_id pay_time
1 2016-01-01 1 1
2016-01-02 0 0
2016-01-03 1 1
2016-01-04 0 0
2016-01-05 1 1
2 2016-01-01 1 1
2016-01-02 1 1
2016-01-03 0 0
2016-01-04 0 0
2016-01-05 1 1
```
If I don't use groupby method, resample can pad missing data with 0, like this:
```
df.set_index('pay_time').resample('1D').count()
buyer_id tid
pay_time
2016-01-01 2 2
2016-01-02 1 1
2016-01-03 1 1
2016-01-04 0 0
2016-01-05 2 2
```
I don't know why the behavior of using resample alone is different with resample with group by.
#### output of `pd.show_versions()`
## NSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: zh_CN.UTF-8
pandas: 0.18.0
nose: None
pip: 8.1.1
setuptools: 19.4
Cython: None
numpy: 1.11.0
scipy: None
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: 1.3.5
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 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/13151/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13151/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13152 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13152/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13152/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13152/events | https://github.com/pandas-dev/pandas/issues/13152 | 154,402,095 | MDU6SXNzdWUxNTQ0MDIwOTU= | 13,152 | "groups" attribute has unexpected value for TimeGrouper groupby or resample | {
"avatar_url": "https://avatars.githubusercontent.com/u/1217238?v=4",
"events_url": "https://api.github.com/users/shoyer/events{/privacy}",
"followers_url": "https://api.github.com/users/shoyer/followers",
"following_url": "https://api.github.com/users/shoyer/following{/other_user}",
"gists_url": "https://api.github.com/users/shoyer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shoyer",
"id": 1217238,
"login": "shoyer",
"node_id": "MDQ6VXNlcjEyMTcyMzg=",
"organizations_url": "https://api.github.com/users/shoyer/orgs",
"received_events_url": "https://api.github.com/users/shoyer/received_events",
"repos_url": "https://api.github.com/users/shoyer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shoyer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shoyer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shoyer"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
}
]
| open | false | null | []
| {
"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 | 2016-05-12T05:47:10Z | 2021-04-30T05:05:43Z | null | MEMBER | null | They provide scalars are the values rather all the corresponding labels:
```
In [81]: index = pd.date_range('2000-01-01', periods=5)
In [82]: s = pd.Series(np.arange(index.size), index)
In [83]: s
Out[83]:
2000-01-01 0
2000-01-02 1
2000-01-03 2
2000-01-04 3
2000-01-05 4
Freq: D, dtype: int64
In [84]: g = s.groupby(pd.Grouper(freq='2D'))
In [85]: g.groups
Out[85]:
{Timestamp('2000-01-01 00:00:00', offset='2D'): 2,
Timestamp('2000-01-03 00:00:00', offset='2D'): 4,
Timestamp('2000-01-05 00:00:00', offset='2D'): 5}
```
Per the [groupby docs](http://pandas.pydata.org/pandas-docs/stable/groupby.html#groupby-object-attributes), I expected something like the following instead:
```
In [85]: g.groups
Out[85]:
{Timestamp('2000-01-01 00:00:00', offset='2D'):
[Timestamp('2000-01-01 00:00:00', offset='D'),
Timestamp('2000-01-02 00:00:00', offset='D')],
Timestamp('2000-01-03 00:00:00', offset='2D'):
[Timestamp('2000-01-03 00:00:00', offset='D'),
Timestamp('2000-01-04 00:00:00', offset='D')],
Timestamp('2000-01-05 00:00:00', offset='2D'):
[Timestamp('2000-01-05 00:00:00', offset='D')]}
```
We see the same behavior for `resample.groups` as well:
```
In [103]: s.resample('2D').groups
Out[103]:
{Timestamp('2000-01-01 00:00:00', offset='2D'): 2,
Timestamp('2000-01-03 00:00:00', offset='2D'): 4,
Timestamp('2000-01-05 00:00:00', offset='2D'): 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/13152/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13152/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13153 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13153/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13153/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13153/events | https://github.com/pandas-dev/pandas/issues/13153 | 154,428,592 | MDU6SXNzdWUxNTQ0Mjg1OTI= | 13,153 | Exceptions thrown by DataFrame.apply() should return the index the function failed on | {
"avatar_url": "https://avatars.githubusercontent.com/u/4719741?v=4",
"events_url": "https://api.github.com/users/ducttapecrown/events{/privacy}",
"followers_url": "https://api.github.com/users/ducttapecrown/followers",
"following_url": "https://api.github.com/users/ducttapecrown/following{/other_user}",
"gists_url": "https://api.github.com/users/ducttapecrown/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ducttapecrown",
"id": 4719741,
"login": "ducttapecrown",
"node_id": "MDQ6VXNlcjQ3MTk3NDE=",
"organizations_url": "https://api.github.com/users/ducttapecrown/orgs",
"received_events_url": "https://api.github.com/users/ducttapecrown/received_events",
"repos_url": "https://api.github.com/users/ducttapecrown/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ducttapecrown/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ducttapecrown/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ducttapecrown"
} | [
{
"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": "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": "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": "be21f2",
"default": false,
"description": "May be closeable, needs more eyeballs",
"id": 2365504893,
"name": "Closing Candidate",
"node_id": "MDU6TGFiZWwyMzY1NTA0ODkz",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Closing%20Candidate"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 278,
"created_at": "2013-01-06T03:02:01Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/329591?v=4",
"events_url": "https://api.github.com/users/wesm/events{/privacy}",
"followers_url": "https://api.github.com/users/wesm/followers",
"following_url": "https://api.github.com/users/wesm/following{/other_user}",
"gists_url": "https://api.github.com/users/wesm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wesm",
"id": 329591,
"login": "wesm",
"node_id": "MDQ6VXNlcjMyOTU5MQ==",
"organizations_url": "https://api.github.com/users/wesm/orgs",
"received_events_url": "https://api.github.com/users/wesm/received_events",
"repos_url": "https://api.github.com/users/wesm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wesm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wesm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wesm"
},
"description": "Milestone for filing things away that may be reached someday (at which point such issues should be moved to the appropriate release milestone)",
"due_on": "2022-12-31T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/20",
"id": 239227,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/20/labels",
"node_id": "MDk6TWlsZXN0b25lMjM5MjI3",
"number": 20,
"open_issues": 108,
"state": "open",
"title": "Someday",
"updated_at": "2021-08-08T01:48:22Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/20"
} | 4 | 2016-05-12T08:47:27Z | 2021-04-30T05:06:58Z | 2021-04-30T05:06:58Z | NONE | null | ```
def get_desc(x):
return "Intermission" if x["ID"] == "0*" else x.workTitle.string + " by " + x.composerName.string
works["nice"] = works[0].apply(get_desc)
```
on this https://github.com/nyphilarchive/PerformanceHistory dataset
I would like pandas to tell me which line the function fails on, rather than something annoying like
```
TypeErrorTraceback (most recent call last)
<ipython-input-139-e53aa56df99a> in <module>()
1 def get_desc(x):
2 return "Intermission" if x["ID"] == "0*" else x.workTitle.string + " by " + x.composerName.string
----> 3 works["nice"] = works[0].apply(get_desc)
/usr/local/lib/python3.4/dist-packages/pandas/core/series.py in apply(self, func, convert_dtype, args, **kwds)
2235 values = lib.map_infer(values, boxer)
2236
-> 2237 mapped = lib.map_infer(values, f, convert=convert_dtype)
2238 if len(mapped) and isinstance(mapped[0], Series):
2239 from pandas.core.frame import DataFrame
pandas/src/inference.pyx in pandas.lib.map_infer (pandas/lib.c:63043)()
<ipython-input-139-e53aa56df99a> in get_desc(x)
1 def get_desc(x):
----> 2 return "Intermission" if x["ID"] == "0*" else x.workTitle.string + " by " + x.composerName.string
3 works["nice"] = works[0].apply(get_desc)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
```
| {
"+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/13153/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13153/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13154 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13154/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13154/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13154/events | https://github.com/pandas-dev/pandas/issues/13154 | 154,436,463 | MDU6SXNzdWUxNTQ0MzY0NjM= | 13,154 | Behaviour of concat with empty Series has changed between 0.18.0 and 0.18.1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/10614835?v=4",
"events_url": "https://api.github.com/users/bastewart/events{/privacy}",
"followers_url": "https://api.github.com/users/bastewart/followers",
"following_url": "https://api.github.com/users/bastewart/following{/other_user}",
"gists_url": "https://api.github.com/users/bastewart/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bastewart",
"id": 10614835,
"login": "bastewart",
"node_id": "MDQ6VXNlcjEwNjE0ODM1",
"organizations_url": "https://api.github.com/users/bastewart/orgs",
"received_events_url": "https://api.github.com/users/bastewart/received_events",
"repos_url": "https://api.github.com/users/bastewart/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bastewart/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bastewart/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bastewart"
} | [
{
"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": "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"
} | 3 | 2016-05-12T09:25:48Z | 2016-05-12T09:55:36Z | 2016-05-12T09:55:36Z | NONE | null | #### Code Sample, a copy-pastable example if possible
``` python
import pandas as pd
s_empty = pd.Series()
s_filled = pd.Series([1, 2, 3, 4, 5])
pd.concat([s_empty, s_filled], 1)
```
#### Expected Output
Expect to be consistent between versions: previously would not add any columns for the empty `Series`, now a column of `NaN` is appended. (I can not see this mentioned in the what's new so think this is an unintended change.)
In `0.18.0`:
```
0
0 1
1 2
2 3
3 4
4 5
```
In `0.18.1` (and tested on `0.18.1+25.g4aa6323`):
```
0 1
0 NaN 1
1 NaN 2
2 NaN 3
3 NaN 4
4 NaN 5
```
#### output of `pd.show_versions()`
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
pandas: 0.18.1
nose: None
pip: 8.1.2
setuptools: 21.0.0
Cython: None
numpy: 1.11.0
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None
```
In my `0.18.0` environment the only differences in `show_versions` is the `pandas` entry and `pandas_datareader` is not present.
| {
"+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/13154/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13154/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13155 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13155/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13155/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13155/events | https://github.com/pandas-dev/pandas/issues/13155 | 154,444,205 | MDU6SXNzdWUxNTQ0NDQyMDU= | 13,155 | pd.tslib._Timestamp should not be capable of crashing python.exe | {
"avatar_url": "https://avatars.githubusercontent.com/u/4407787?v=4",
"events_url": "https://api.github.com/users/rs2/events{/privacy}",
"followers_url": "https://api.github.com/users/rs2/followers",
"following_url": "https://api.github.com/users/rs2/following{/other_user}",
"gists_url": "https://api.github.com/users/rs2/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rs2",
"id": 4407787,
"login": "rs2",
"node_id": "MDQ6VXNlcjQ0MDc3ODc=",
"organizations_url": "https://api.github.com/users/rs2/orgs",
"received_events_url": "https://api.github.com/users/rs2/received_events",
"repos_url": "https://api.github.com/users/rs2/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rs2/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rs2/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rs2"
} | [
{
"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 | 4 | 2016-05-12T10:03:19Z | 2016-05-12T12:32:49Z | 2016-05-12T12:32:48Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
``` python
python -c "import pandas as pd; print(pd.__version__); pd.tslib._Timestamp(42, 7, 13)"
```
Crashes python.exe on Windows 7, 10. Tested with Python 3.3, 3.4, 3.5, pandas 0.16.2, 0.17.1, 0.18.0. ipython.exe crashes on exit when this code is executed.
#### Expected Output
Raise a suitable exception instead.
| {
"+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/13155/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13155/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13156 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13156/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13156/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13156/events | https://github.com/pandas-dev/pandas/pull/13156 | 154,485,834 | MDExOlB1bGxSZXF1ZXN0Njk4Mzg1NTE= | 13,156 | ENH/BUG: str.extractall doesn't support index | {
"avatar_url": "https://avatars.githubusercontent.com/u/1696302?v=4",
"events_url": "https://api.github.com/users/sinhrks/events{/privacy}",
"followers_url": "https://api.github.com/users/sinhrks/followers",
"following_url": "https://api.github.com/users/sinhrks/following{/other_user}",
"gists_url": "https://api.github.com/users/sinhrks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sinhrks",
"id": 1696302,
"login": "sinhrks",
"node_id": "MDQ6VXNlcjE2OTYzMDI=",
"organizations_url": "https://api.github.com/users/sinhrks/orgs",
"received_events_url": "https://api.github.com/users/sinhrks/received_events",
"repos_url": "https://api.github.com/users/sinhrks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sinhrks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sinhrks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sinhrks"
} | [
{
"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": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-12T13:44:25Z | 2016-05-13T13:25:05Z | 2016-05-13T13:24:58Z | MEMBER | null | - [x] closes #10008
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
```
# same output as pd.Series(["a1a2", "b1", "c1"]).str.extractall("[ab](?P<digit>\d)")
idx = pd.Index(["a1a2", "b1", "c1"])
idx.str.extractall("[ab](?P<digit>\d)")
# digit
# match
#0 0 1
# 1 2
#1 0 1
```
**NOTE** Also fixed a bug `Series.str.extractall` raises `ValueError` if its `Index` is `str` with 2 or more characters.
```
s = pd.Series(["a1a2", "b1", "c1"], index=pd.Index(["xx", "yy", "zz"]))
s.str.extractall("[ab](?P<digit>\d)")
# ValueError: Length of names must match number of levels in MultiIndex.
```
| {
"+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/13156/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13156/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13156.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13156",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13156.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13156"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13157 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13157/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13157/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13157/events | https://github.com/pandas-dev/pandas/issues/13157 | 154,505,526 | MDU6SXNzdWUxNTQ1MDU1MjY= | 13,157 | quantile() does not work with columns of type Decimal | {
"avatar_url": "https://avatars.githubusercontent.com/u/591686?v=4",
"events_url": "https://api.github.com/users/mavroprovato/events{/privacy}",
"followers_url": "https://api.github.com/users/mavroprovato/followers",
"following_url": "https://api.github.com/users/mavroprovato/following{/other_user}",
"gists_url": "https://api.github.com/users/mavroprovato/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mavroprovato",
"id": 591686,
"login": "mavroprovato",
"node_id": "MDQ6VXNlcjU5MTY4Ng==",
"organizations_url": "https://api.github.com/users/mavroprovato/orgs",
"received_events_url": "https://api.github.com/users/mavroprovato/received_events",
"repos_url": "https://api.github.com/users/mavroprovato/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mavroprovato/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mavroprovato/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mavroprovato"
} | [
{
"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": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 4 | 2016-05-12T15:02:49Z | 2016-05-12T15:21:23Z | 2016-05-12T15:19:49Z | NONE | null | #### Code Sample, a copy-pastable example if possible
This snippet does not work (returns an empty DataFrame)
```
pd.DataFrame([
Decimal(162.7646939720129171), Decimal(162.5470404198062433),
Decimal(162.9334883683360258), Decimal(161.7975872981700753),
Decimal(160.9450499461786868), Decimal(163.1648865446716900),
]).quantile(0.8)
```
#### Expected Output
This snippet works as expected (returns a Series with one value)
```
pd.DataFrame([
162.7646939720129171, 162.5470404198062433,
162.9334883683360258, 161.7975872981700753,
160.9450499461786868, 163.1648865446716900,
]).quantile(0.8)
```
Shouldn't both snippets work the same way?
#### output of `pd.show_versions()`
## INSTALLED VERSIONS
commit: None
python: 3.4.3.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-86-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: None
pip: 8.1.2
setuptools: 20.9.0
Cython: None
numpy: 1.11.0
scipy: None
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: None
patsy: None
dateutil: 2.5.2
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: 0.7.2.None
psycopg2: 2.6.1 (dt dec pq3 ext lo64)
jinja2: 2.8
boto: None
pandas_datareader: 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/13157/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13157/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13158 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13158/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13158/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13158/events | https://github.com/pandas-dev/pandas/issues/13158 | 154,525,742 | MDU6SXNzdWUxNTQ1MjU3NDI= | 13,158 | ambiguous ValueError message | {
"avatar_url": "https://avatars.githubusercontent.com/u/4244527?v=4",
"events_url": "https://api.github.com/users/camilaran/events{/privacy}",
"followers_url": "https://api.github.com/users/camilaran/followers",
"following_url": "https://api.github.com/users/camilaran/following{/other_user}",
"gists_url": "https://api.github.com/users/camilaran/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/camilaran",
"id": 4244527,
"login": "camilaran",
"node_id": "MDQ6VXNlcjQyNDQ1Mjc=",
"organizations_url": "https://api.github.com/users/camilaran/orgs",
"received_events_url": "https://api.github.com/users/camilaran/received_events",
"repos_url": "https://api.github.com/users/camilaran/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/camilaran/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/camilaran/subscriptions",
"type": "User",
"url": "https://api.github.com/users/camilaran"
} | [
{
"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"
}
]
| 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 | 2016-05-12T16:28:10Z | 2016-05-13T00:19:01Z | 2016-05-13T00:19:01Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```
df=pd.DataFrame([(i+j,i-j,i*j) for i in range(0,4) for j in (2,6)])
df.columns=['a','b','c']
df.loc[:,['a','c']].div(df['b'],axis=0)
```
Output:
"ValueError: putmask: mask and data must be the same size"
This message is too ambiguous: what size is it referring to ?
After some investigation, I understood that data size was referring to divisor data type,
not to the size (length) of the DataFrame and Series, which I wrongly understood was the message referring to:
type(df['b'][0]): class 'numpy.int64' (error)
type((df['b']/1)[0]): class 'numpy.float64' (no error)
Therefore, changing the last line to:
df.loc[:,['a','c']].div(df['b']/1,axis=0)
worked:
#### Expected Output
```
a c
```
0 -1.000000 -0.000000
1 -1.000000 -0.000000
2 -3.000000 -2.000000
3 -1.400000 -1.200000
4 inf inf
5 -2.000000 -3.000000
6 5.000000 6.000000
7 -3.000000 -6.000000
#### output of `pd.show_versions()`
## INSTALLED VERSIONS
commit: None
python: 3.4.3.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-85-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: fr_FR.UTF-8
pandas: 0.13.1
Cython: None
numpy: 1.8.2
scipy: 0.13.3
statsmodels: None
IPython: None
sphinx: None
patsy: None
scikits.timeseries: None
dateutil: 2.0
pytz: 2012c
bottleneck: None
tables: 3.1.1
numexpr: 2.2.2
matplotlib: 1.3.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
sqlalchemy: None
lxml: 3.3.3
bs4: 4.2.1
html5lib: 0.999
bq: None
apiclient: 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/13158/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13158/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13159 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13159/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13159/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13159/events | https://github.com/pandas-dev/pandas/issues/13159 | 154,551,623 | MDU6SXNzdWUxNTQ1NTE2MjM= | 13,159 | DOC: floating point precision on writing/reading to csv | {
"avatar_url": "https://avatars.githubusercontent.com/u/19328302?v=4",
"events_url": "https://api.github.com/users/FBartlett/events{/privacy}",
"followers_url": "https://api.github.com/users/FBartlett/followers",
"following_url": "https://api.github.com/users/FBartlett/following{/other_user}",
"gists_url": "https://api.github.com/users/FBartlett/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/FBartlett",
"id": 19328302,
"login": "FBartlett",
"node_id": "MDQ6VXNlcjE5MzI4MzAy",
"organizations_url": "https://api.github.com/users/FBartlett/orgs",
"received_events_url": "https://api.github.com/users/FBartlett/received_events",
"repos_url": "https://api.github.com/users/FBartlett/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/FBartlett/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FBartlett/subscriptions",
"type": "User",
"url": "https://api.github.com/users/FBartlett"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "0e8a16",
"default": true,
"description": null,
"id": 717120670,
"name": "good first issue",
"node_id": "MDU6TGFiZWw3MTcxMjA2NzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue"
}
]
| open | false | null | []
| {
"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 | 2016-05-12T18:35:50Z | 2019-10-21T19:52:16Z | null | NONE | null | #### Code Sample
```
x0 = 18292498239.824
df1 = pd.DataFrame({'One': x0},index=["bignum"])
df1.to_csv('repr_test.csv')
df2 = pd.DataFrame.from_csv('repr_test.csv')
df3 = pd.read_csv('repr_test.csv')
x1 = df1['One'][0]
x2 = df2['One'][0]
x3 = df3['One'][0]
fh = open('repr_test.csv','rb')
ll = fh.readlines()
x4 = float(ll[1].split(',')[1].split()[0])
print "x0 = %f; x1 = %f; Are they equal? %s" % (x0,x1,(x0 == x1))
print "x0 = %f; x2 = %f; Are they equal? %s" % (x0,x2,(x0 == x2))
print "x0 = %f; x3 = %f; Are they equal? %s" % (x0,x3,(x0 == x3))
print "x0 = %f; x4 = %f; Are they equal? %s" % (x0,x4,(x0 == x4))
```
#### Expected Output
```
x0 = 18292498239.824001; x1 = 18292498239.824001; Are they equal? True
x0 = 18292498239.824001; x2 = 18292498239.824001; Are they equal? True
x0 = 18292498239.824001; x3 = 18292498239.824001; Are they equal? True
x0 = 18292498239.824001; x4 = 18292498239.824001; Are they equal? True
```
#### output of `pd.show_versions()`
#### (Note that there are two, presented side-by-side, with results underneath)
```
INSTALLED VERSIONS INSTALLED VERSIONS
------------------ ------------------
commit: None commit: None
python: 2.7.5.final.0 python: 2.7.11.final.0
python-bits: 64 python-bits: 64
OS: Linux OS: Linux
OS-release: 2.6.32-431.56.1.el6.x86_64 OS-release: 2.6.32-431.56.1.el6.x86_64
machine: x86_64 machine: x86_64
processor: x86_64 processor: x86_64
byteorder: little byteorder: little
LC_ALL: None LC_ALL: None
LANG: en_US.UTF-8 LANG: en_US.UTF-8
pandas: 0.15.1 pandas: 0.18.0
nose: 1.3.4 nose: 1.3.7
Cython: 0.21.2 Cython: 0.23.4
numpy: 1.9.1 numpy: 1.10.4
scipy: 0.14.0 scipy: 0.17.0
statsmodels: 0.6.0 statsmodels: 0.6.1
IPython: 2.3.0 IPython: 4.1.2
sphinx: 1.2.3 sphinx: 1.3.5
patsy: 0.3.0 patsy: 0.4.0
dateutil: 2.2 dateutil: 2.5.1
pytz: 2014.9 pytz: 2016.2
bottleneck: None bottleneck: 1.0.0
tables: 3.1.1 tables: 3.2.2
numexpr: 2.4 numexpr: 2.5
matplotlib: 1.4.2 matplotlib: 1.5.1
openpyxl: None openpyxl: 2.3.2
xlrd: 0.9.3 xlrd: 0.9.4
xlwt: 0.7.5 xlwt: 1.0.0
xlsxwriter: 0.6.3 xlsxwriter: 0.8.4
lxml: 3.3.3 lxml: 3.6.0
bs4: 4.3.2 bs4: 4.4.1
html5lib: None html5lib: None
httplib2: None httplib2: None
apiclient: None apiclient: None
rpy2: None
sqlalchemy: None sqlalchemy: 1.0.12
pymysql: None pymysql: None
psycopg2: None psycopg2: None
pip: 8.1.1
xarray: None
setuptools: 20.3
blosc: None
jinja2: 2.8
boto: 2.39.0
```
#### Results from left setup (0.15.1):
```
x0 = 18292498239.824001; x1 = 18292498239.824001; Are they equal? True
x0 = 18292498239.824001; x2 = 18292498239.823997; Are they equal? False
x0 = 18292498239.824001; x3 = 18292498239.823997; Are they equal? False
x0 = 18292498239.824001; x4 = 18292498239.824001; Are they equal? True
```
#### Results from right setup (0.18.0):
```
x0 = 18292498239.824001; x1 = 18292498239.824001; Are they equal? True
x0 = 18292498239.824001; x2 = 18292498239.799999; Are they equal? False
x0 = 18292498239.824001; x3 = 18292498239.799999; Are they equal? False
x0 = 18292498239.824001; x4 = 18292498239.799999; Are they equal? False
```
#### Expectations
I expect to be able to write a DataFrame to a csv file and later read it in to a new DataFrame such that the two DataFrames will be identical. The older version (result 0.15.1) is quite a bit better than the newer (since I can round to three decimal places to get the expected results or read from a filehandle instead of using `from_csv()` or `read_csv()`). The newer version (0.18.0) loses information, which is not acceptable.
Note that the documentation at http://pandas.pydata.org/pandas-docs/version/0.18.1/generated/pandas.DataFrame.from_csv.html reads
> It is preferable to use the more powerful `pandas.read_csv()` for most general purposes, but `from_csv` makes for an easy roundtrip to and from a file (the exact counterpart of `to_csv`), especially with a DataFrame of time series data.
But this does not describe what actually happens, as demonstrated above.
| {
"+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/13159/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13159/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13160 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13160/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13160/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13160/events | https://github.com/pandas-dev/pandas/issues/13160 | 154,557,647 | MDU6SXNzdWUxNTQ1NTc2NDc= | 13,160 | The documentation around frequency strings is unclear | {
"avatar_url": "https://avatars.githubusercontent.com/u/78236?v=4",
"events_url": "https://api.github.com/users/mineo/events{/privacy}",
"followers_url": "https://api.github.com/users/mineo/followers",
"following_url": "https://api.github.com/users/mineo/following{/other_user}",
"gists_url": "https://api.github.com/users/mineo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mineo",
"id": 78236,
"login": "mineo",
"node_id": "MDQ6VXNlcjc4MjM2",
"organizations_url": "https://api.github.com/users/mineo/orgs",
"received_events_url": "https://api.github.com/users/mineo/received_events",
"repos_url": "https://api.github.com/users/mineo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mineo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mineo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mineo"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 11 | 2016-05-12T19:05:12Z | 2016-07-21T14:31:18Z | 2016-07-21T14:31:18Z | CONTRIBUTOR | null | http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.rolling.html?highlight=rolling#pandas.DataFrame.rolling and various other places in the documentation talk about something called "frequency strings", however, there doesn't seem to be any explanation of what this term means anywhere. http://pandas.pydata.org/pandas-docs/stable/timeseries.html#dateoffset-objects mentions the term again without explaining it. From the few examples I found, I now think http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases (note that this is after the dateoffset objects in the documentation) is the complete list of frequency strings, but for some reason they're called "offset aliases" here. Are those the frequency strings? If not, where are they defined?
| {
"+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/13160/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13160/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13161 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13161/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13161/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13161/events | https://github.com/pandas-dev/pandas/pull/13161 | 154,557,687 | MDExOlB1bGxSZXF1ZXN0Njk4ODk4NDk= | 13,161 | Use np.random's RandomState when seed is None | {
"avatar_url": "https://avatars.githubusercontent.com/u/19950?v=4",
"events_url": "https://api.github.com/users/ariddell/events{/privacy}",
"followers_url": "https://api.github.com/users/ariddell/followers",
"following_url": "https://api.github.com/users/ariddell/following{/other_user}",
"gists_url": "https://api.github.com/users/ariddell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ariddell",
"id": 19950,
"login": "ariddell",
"node_id": "MDQ6VXNlcjE5OTUw",
"organizations_url": "https://api.github.com/users/ariddell/orgs",
"received_events_url": "https://api.github.com/users/ariddell/received_events",
"repos_url": "https://api.github.com/users/ariddell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ariddell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ariddell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ariddell"
} | [
{
"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": "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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 19 | 2016-05-12T19:05:29Z | 2017-02-18T16:53:26Z | 2016-05-21T14:37:56Z | NONE | null | - [x] closes #13143
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
The handle for numpy's current random state is
`np.random.mtrand._rand`.
Compare https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/validation.py#L573
| {
"+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/13161/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13161/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13161.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13161",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13161.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13161"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13162 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13162/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13162/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13162/events | https://github.com/pandas-dev/pandas/issues/13162 | 154,569,652 | MDU6SXNzdWUxNTQ1Njk2NTI= | 13,162 | pandas TypeError: Series.name must be a hashable type | {
"avatar_url": "https://avatars.githubusercontent.com/u/1220850?v=4",
"events_url": "https://api.github.com/users/algotr8der/events{/privacy}",
"followers_url": "https://api.github.com/users/algotr8der/followers",
"following_url": "https://api.github.com/users/algotr8der/following{/other_user}",
"gists_url": "https://api.github.com/users/algotr8der/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/algotr8der",
"id": 1220850,
"login": "algotr8der",
"node_id": "MDQ6VXNlcjEyMjA4NTA=",
"organizations_url": "https://api.github.com/users/algotr8der/orgs",
"received_events_url": "https://api.github.com/users/algotr8der/received_events",
"repos_url": "https://api.github.com/users/algotr8der/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/algotr8der/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/algotr8der/subscriptions",
"type": "User",
"url": "https://api.github.com/users/algotr8der"
} | [
{
"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"
} | 3 | 2016-05-12T20:07:43Z | 2016-05-12T22:46:32Z | 2016-05-12T22:46:32Z | NONE | null | #### Code Sample, a copy-pastable example if possible
This is the following SO issue: http://stackoverflow.com/questions/37195658/pandas-typeerror-series-name-must-be-a-hashable-type
Call to Func_df(df):
pattern_tmp1 = grouped[['sprd1','cost1']].apply(Func_df)[0]
Input df to Func_df(df):
sprd1 cost1
date
2016-01-31 -19.02 -436.31
def Func_df(df):
cases_list = [monthly_pattern_check(x,y) for x,y in zip(df[[0]].values,df[[1]].values)]
print collections.Counter(cases_list)
return dict(collections.Counter(cases_list))
def monthly_pattern_check(r,c):
if r > c > 0:
return 'A'
elif c > r > 0 :
return 'B'
elif r > 0 > c:
return 'C'
elif r == 0 and c > 0:
return 'D'
elif r < c < 0:
return '-A'
elif c < r < 0:
return '-B'
elif r < 0 < c:
return '-C'
elif r == 0 and c < 0:
return '-D'
#### Expected Output
pattern_tmp1 should be assigned to the the [0] index value of Counter({'-B': 1})
#### output of `pd.show_versions()`
## INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 13.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.1
setuptools: 20.7.0
Cython: 0.22.1
numpy: 1.10.4
scipy: 0.16.0
statsmodels: None
xarray: None
IPython: 4.0.0
sphinx: 1.3.1
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.0
numexpr: 2.4.4
matplotlib: 1.4.3
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: 1.0.0
xlsxwriter: 0.7.3
lxml: 3.4.4
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.5
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.38.0
pandas_datareader: 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/13162/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13162/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13163 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13163/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13163/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13163/events | https://github.com/pandas-dev/pandas/pull/13163 | 154,601,105 | MDExOlB1bGxSZXF1ZXN0Njk5MjExOTk= | 13,163 | BUG: Misc fixes for SparseSeries indexing with MI | {
"avatar_url": "https://avatars.githubusercontent.com/u/1696302?v=4",
"events_url": "https://api.github.com/users/sinhrks/events{/privacy}",
"followers_url": "https://api.github.com/users/sinhrks/followers",
"following_url": "https://api.github.com/users/sinhrks/following{/other_user}",
"gists_url": "https://api.github.com/users/sinhrks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sinhrks",
"id": 1696302,
"login": "sinhrks",
"node_id": "MDQ6VXNlcjE2OTYzMDI=",
"organizations_url": "https://api.github.com/users/sinhrks/orgs",
"received_events_url": "https://api.github.com/users/sinhrks/received_events",
"repos_url": "https://api.github.com/users/sinhrks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sinhrks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sinhrks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sinhrks"
} | [
{
"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": "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": "009800",
"default": false,
"description": "Sparse Data Type",
"id": 49182326,
"name": "Sparse",
"node_id": "MDU6TGFiZWw0OTE4MjMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-12T23:08:36Z | 2016-05-13T13:21:58Z | 2016-05-13T13:21:47Z | MEMBER | null | - [x] closes #13144
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
Fixed following bugs. These makes `MultiIndex` repr work.
```
orig = pd.Series([1, np.nan, np.nan, 3, np.nan], index=idx)
sparse = orig.to_sparse()
sparse['A']
# IndexError: Out of bounds access
```
```
# the result must have MultiIndex
sparse.loc['A':]
# (A, 0) 1.0
# (A, 1) NaN
# (B, 0) NaN
# (C, 0) 3.0
# (C, 1) NaN
# dtype: float64
# BlockIndex
# Block locations: array([0, 3], dtype=int32)
# Block lengths: array([1, 1], dtype=int32)
```
| {
"+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/13163/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13163/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13163.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13163",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13163.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13163"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13164 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13164/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13164/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13164/events | https://github.com/pandas-dev/pandas/pull/13164 | 154,605,614 | MDExOlB1bGxSZXF1ZXN0Njk5MjQ0MDQ= | 13,164 | TST: Test resampling with NaT | {
"avatar_url": "https://avatars.githubusercontent.com/u/8616972?v=4",
"events_url": "https://api.github.com/users/evectant/events{/privacy}",
"followers_url": "https://api.github.com/users/evectant/followers",
"following_url": "https://api.github.com/users/evectant/following{/other_user}",
"gists_url": "https://api.github.com/users/evectant/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/evectant",
"id": 8616972,
"login": "evectant",
"node_id": "MDQ6VXNlcjg2MTY5NzI=",
"organizations_url": "https://api.github.com/users/evectant/orgs",
"received_events_url": "https://api.github.com/users/evectant/received_events",
"repos_url": "https://api.github.com/users/evectant/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/evectant/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/evectant/subscriptions",
"type": "User",
"url": "https://api.github.com/users/evectant"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "207de5",
"default": false,
"description": "resample method",
"id": 74975453,
"name": "Resample",
"node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 7 | 2016-05-12T23:45:48Z | 2016-05-18T22:11:12Z | 2016-05-18T22:10:30Z | CONTRIBUTOR | null | - Closes #13020
- Adds `test_generic.py:TestDataFrame.test_resample_with_nat`
- Passes tests and flake8
- No documentation needed
| {
"+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/13164/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13164/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13164.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13164",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13164.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13164"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13165 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13165/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13165/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13165/events | https://github.com/pandas-dev/pandas/pull/13165 | 154,612,622 | MDExOlB1bGxSZXF1ZXN0Njk5Mjk0MTA= | 13,165 | DOC: Fix delim_whitespace regex typo. | {
"avatar_url": "https://avatars.githubusercontent.com/u/980054?v=4",
"events_url": "https://api.github.com/users/dsm054/events{/privacy}",
"followers_url": "https://api.github.com/users/dsm054/followers",
"following_url": "https://api.github.com/users/dsm054/following{/other_user}",
"gists_url": "https://api.github.com/users/dsm054/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsm054",
"id": 980054,
"login": "dsm054",
"node_id": "MDQ6VXNlcjk4MDA1NA==",
"organizations_url": "https://api.github.com/users/dsm054/orgs",
"received_events_url": "https://api.github.com/users/dsm054/received_events",
"repos_url": "https://api.github.com/users/dsm054/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsm054/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsm054/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsm054"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 3 | 2016-05-13T00:56:20Z | 2016-05-13T08:48:08Z | 2016-05-13T08:48:02Z | CONTRIBUTOR | null | Minor typo in the explanation of delim_whitespace which tripped up a user on SO (although the user should probably have been using `delim_whitespace=True` directly anyhow.)
| {
"+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/13165/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13165/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13165.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13165",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13165.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13165"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13166 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13166/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13166/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13166/events | https://github.com/pandas-dev/pandas/issues/13166 | 154,621,734 | MDU6SXNzdWUxNTQ2MjE3MzQ= | 13,166 | Float64Index is very slow in some condition. | {
"avatar_url": "https://avatars.githubusercontent.com/u/826871?v=4",
"events_url": "https://api.github.com/users/ruoyu0088/events{/privacy}",
"followers_url": "https://api.github.com/users/ruoyu0088/followers",
"following_url": "https://api.github.com/users/ruoyu0088/following{/other_user}",
"gists_url": "https://api.github.com/users/ruoyu0088/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ruoyu0088",
"id": 826871,
"login": "ruoyu0088",
"node_id": "MDQ6VXNlcjgyNjg3MQ==",
"organizations_url": "https://api.github.com/users/ruoyu0088/orgs",
"received_events_url": "https://api.github.com/users/ruoyu0088/received_events",
"repos_url": "https://api.github.com/users/ruoyu0088/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ruoyu0088/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ruoyu0088/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ruoyu0088"
} | [
{
"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": "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": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 8 | 2016-05-13T02:34:39Z | 2016-06-15T01:48:21Z | 2016-06-15T01:48:21Z | NONE | null | The following code is very slow:
```
import pandas as pd
import numpy as np
dt = 4.8000000418824129e-08
data = np.random.rand(1000000, 4)
df = pd.DataFrame(data, columns=list("ABCD"))
df.index *= dt
print(df.loc[0:0.001].shape)
```
after debug it, I found `Float64Engine.get_loc()` is slow. Here is a demo:
```
import pandas as pd
import numpy as np
a = np.arange(1000000)
ind1 = pd.Float64Index(a * 4.8e-08)
ind2 = pd.Float64Index(a * 4.8000000418824129e-08)
%time ind1._engine.get_loc(0)
%time ind2._engine.get_loc(0)
```
outputs:
```
Wall time: 295 ms
Wall time: 9.9 s
```
| {
"+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/13166/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13166/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13167 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13167/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13167/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13167/events | https://github.com/pandas-dev/pandas/pull/13167 | 154,662,576 | MDExOlB1bGxSZXF1ZXN0Njk5NjE5OTI= | 13,167 | CLN, DOC: Remove unused parameters | {
"avatar_url": "https://avatars.githubusercontent.com/u/7095926?v=4",
"events_url": "https://api.github.com/users/Michael-E-Rose/events{/privacy}",
"followers_url": "https://api.github.com/users/Michael-E-Rose/followers",
"following_url": "https://api.github.com/users/Michael-E-Rose/following{/other_user}",
"gists_url": "https://api.github.com/users/Michael-E-Rose/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Michael-E-Rose",
"id": 7095926,
"login": "Michael-E-Rose",
"node_id": "MDQ6VXNlcjcwOTU5MjY=",
"organizations_url": "https://api.github.com/users/Michael-E-Rose/orgs",
"received_events_url": "https://api.github.com/users/Michael-E-Rose/received_events",
"repos_url": "https://api.github.com/users/Michael-E-Rose/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Michael-E-Rose/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Michael-E-Rose/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Michael-E-Rose"
} | [
{
"color": "0052cc",
"default": false,
"description": "pandas objects compatability with Numpy or Python functions",
"id": 76865106,
"name": "Compat",
"node_id": "MDU6TGFiZWw3Njg2NTEwNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 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 | 2016-05-13T08:48:15Z | 2016-07-01T12:43:18Z | 2016-06-30T12:21:18Z | NONE | null | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] remove unused parameters `out` and `dtype` from `cumulated` functions (`cummin`, `cumsum`, `cumprod`, `cummax`)
This also affects the documentation. Check for example: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.cumsum.html, where the two parameters are mentioned, but not explained.
| {
"+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/13167/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13167/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13167.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13167",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13167.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13167"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13168 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13168/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13168/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13168/events | https://github.com/pandas-dev/pandas/issues/13168 | 154,678,435 | MDU6SXNzdWUxNTQ2Nzg0MzU= | 13,168 | pandas read_sql reads the entire table in to memory despite specifying chunksize | {
"avatar_url": "https://avatars.githubusercontent.com/u/2135985?v=4",
"events_url": "https://api.github.com/users/dakaitbakait/events{/privacy}",
"followers_url": "https://api.github.com/users/dakaitbakait/followers",
"following_url": "https://api.github.com/users/dakaitbakait/following{/other_user}",
"gists_url": "https://api.github.com/users/dakaitbakait/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dakaitbakait",
"id": 2135985,
"login": "dakaitbakait",
"node_id": "MDQ6VXNlcjIxMzU5ODU=",
"organizations_url": "https://api.github.com/users/dakaitbakait/orgs",
"received_events_url": "https://api.github.com/users/dakaitbakait/received_events",
"repos_url": "https://api.github.com/users/dakaitbakait/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dakaitbakait/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dakaitbakait/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dakaitbakait"
} | [
{
"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"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 4 | 2016-05-13T10:11:02Z | 2016-07-11T07:43:58Z | 2016-07-11T07:43:57Z | CONTRIBUTOR | null | I was trying to process a massive table in chunks and therefore wanted to read the table in chunks and
process it.
When i tried reading the table using the pandas.read_sql_table i ran out of memory even though i
had passed in the chunksize parameter.
I'm using the mysqlclient for python3.
#### Code Sample, a copy-pastable example if possible
eng = sqlalchemy.create_engine("mysql+mysqldb://user:pass@localhost/db_name")
dframe = pandas.read_sql_table('table_name', eng, chunksize=100)
What i expected, was for the function to return an iterator that lazily loads the data into memory.
The documentation is not very clear about this nor have I found anything else on google.
Any further information on this will be appreciated.
| {
"+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/13168/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13168/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13169 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13169/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13169/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13169/events | https://github.com/pandas-dev/pandas/issues/13169 | 154,717,793 | MDU6SXNzdWUxNTQ3MTc3OTM= | 13,169 | BUG: assignment with boolean index not propogating dtype | {
"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"
} | [
{
"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": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
]
| open | false | null | []
| {
"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"
} | 0 | 2016-05-13T13:57:38Z | 2021-04-30T05:25:06Z | null | CONTRIBUTOR | null | ```
In [5]: df = DataFrame({'A' : [1,2]})
In [6]: df['B'] = Index([True,False])
In [7]: df['C'] = Index([True,False]).values
In [8]: df
Out[8]:
A B C
0 1 True True
1 2 False False
In [9]: df.dtypes
Out[9]:
A int64
B object
C object
dtype: object
In [10]: df = DataFrame({'A' : [1,2]})
In [11]: df['B'] = Index([True,False])
# you have to force the coercion
In [12]: df['C'] = Index([True,False]).values.astype(bool)
In [13]: Index([True,False])
Out[13]: Index([True, False], dtype='object')
In [14]: Index([True,False]).values
Out[14]: array([True, False], dtype=object)
In [15]: df.dtypes
Out[15]:
A int64
B object
C bool
dtype: object
```
Since we don't have a boolean Index type (we should, but separate issue), the assignment of an `Index` leaves the resulting dtype as `object` rather than `bool`. This can be fixed on a special case basis [here](https://github.com/pydata/pandas/blob/master/pandas/core/frame.py#L2590), though maybe better in `_sanitize_array`.
But I think this might be non-performant to even check with `infer_dtype`. So you have to be a bit hacky about this, e.g. call `is_bool_array` first, then you can coerce if it IS (say its NOT, IOW its a bunch of strings, then this is problematic).
| {
"+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/13169/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13169/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13170 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13170/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13170/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13170/events | https://github.com/pandas-dev/pandas/pull/13170 | 154,719,937 | MDExOlB1bGxSZXF1ZXN0NzAwMDExOTI= | 13,170 | BUG: preserve join keys dtype | {
"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"
} | [
{
"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": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-13T14:07:22Z | 2016-05-27T12:41:32Z | 2016-05-27T12:41:32Z | CONTRIBUTOR | null | - closes #8596, preserve join keys dtype
- adds `Index.where` method for all Index types (like `np.where/Series.where`), but preserves dtypes
| {
"+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/13170/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13170/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13170.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13170",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13170.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13170"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13171 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13171/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13171/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13171/events | https://github.com/pandas-dev/pandas/pull/13171 | 154,741,878 | MDExOlB1bGxSZXF1ZXN0NzAwMTYzNjE= | 13,171 | DOC: Fix additional join examples in "10 Minutes to pandas" #13029 | {
"avatar_url": "https://avatars.githubusercontent.com/u/13509204?v=4",
"events_url": "https://api.github.com/users/Xndr7/events{/privacy}",
"followers_url": "https://api.github.com/users/Xndr7/followers",
"following_url": "https://api.github.com/users/Xndr7/following{/other_user}",
"gists_url": "https://api.github.com/users/Xndr7/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Xndr7",
"id": 13509204,
"login": "Xndr7",
"node_id": "MDQ6VXNlcjEzNTA5MjA0",
"organizations_url": "https://api.github.com/users/Xndr7/orgs",
"received_events_url": "https://api.github.com/users/Xndr7/received_events",
"repos_url": "https://api.github.com/users/Xndr7/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Xndr7/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Xndr7/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Xndr7"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-13T15:42:08Z | 2016-05-13T23:14:58Z | 2016-05-13T23:14:43Z | CONTRIBUTOR | null | - [x] closes #13029
| {
"+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/13171/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13171/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13171.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13171",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13171.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13171"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13172 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13172/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13172/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13172/events | https://github.com/pandas-dev/pandas/issues/13172 | 154,750,839 | MDU6SXNzdWUxNTQ3NTA4Mzk= | 13,172 | COMPAT: unicode_literals conflict with to_records | {
"avatar_url": "https://avatars.githubusercontent.com/u/11285770?v=4",
"events_url": "https://api.github.com/users/starplanet/events{/privacy}",
"followers_url": "https://api.github.com/users/starplanet/followers",
"following_url": "https://api.github.com/users/starplanet/following{/other_user}",
"gists_url": "https://api.github.com/users/starplanet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/starplanet",
"id": 11285770,
"login": "starplanet",
"node_id": "MDQ6VXNlcjExMjg1Nzcw",
"organizations_url": "https://api.github.com/users/starplanet/orgs",
"received_events_url": "https://api.github.com/users/starplanet/received_events",
"repos_url": "https://api.github.com/users/starplanet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/starplanet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/starplanet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/starplanet"
} | [
{
"color": "444444",
"default": false,
"description": "Unicode strings",
"id": 36380025,
"name": "Unicode",
"node_id": "MDU6TGFiZWwzNjM4MDAyNQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Unicode"
},
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-13T16:24:49Z | 2016-05-17T13:40:50Z | 2016-05-17T13:40:50Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```
from __future__ import unicode_literals
import pandas as pd
pd.DataFrame([{'id': '10', 'title': 'hello'}]).set_index('id').to_records()
```
the code above will report following error:
```
TypeError Traceback (most recent call last)
<ipython-input-40-056b33fad34d> in <module>()
----> 1 pd.DataFrame([{'id': '10', 'title': 'hello'}]).set_index('id').to_records()
/usr/local/lib/python2.7/site-packages/pandas/core/frame.pyc in to_records(self, index, convert_datetime64)
1068 names = lmap(str, self.columns)
1069
-> 1070 dtype = np.dtype([(x, v.dtype) for x, v in zip(names, arrays)])
1071 return np.rec.fromarrays(arrays, dtype=dtype, names=names)
1072
TypeError: data type not understood
```
If I comment out `from __future__ import unicode_literals`, the code above will work fine.
```
rec.array([('10', 'hello')],
dtype=[('id', 'O'), ('title', 'O')])
```
#### output of `pd.show_versions()`
## INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: zh_CN.UTF-8
pandas: 0.18.1
nose: None
pip: 8.1.1
setuptools: 19.4
Cython: None
numpy: 1.11.0
scipy: None
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: 1.3.5
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 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/13172/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13172/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13173 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13173/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13173/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13173/events | https://github.com/pandas-dev/pandas/issues/13173 | 154,756,676 | MDU6SXNzdWUxNTQ3NTY2NzY= | 13,173 | Slow setting PeriodIndex vs DatetimeIndex | {
"avatar_url": "https://avatars.githubusercontent.com/u/710931?v=4",
"events_url": "https://api.github.com/users/bartbkr/events{/privacy}",
"followers_url": "https://api.github.com/users/bartbkr/followers",
"following_url": "https://api.github.com/users/bartbkr/following{/other_user}",
"gists_url": "https://api.github.com/users/bartbkr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bartbkr",
"id": 710931,
"login": "bartbkr",
"node_id": "MDQ6VXNlcjcxMDkzMQ==",
"organizations_url": "https://api.github.com/users/bartbkr/orgs",
"received_events_url": "https://api.github.com/users/bartbkr/received_events",
"repos_url": "https://api.github.com/users/bartbkr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bartbkr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bartbkr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bartbkr"
} | [
{
"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": "eb6420",
"default": false,
"description": "Period data type",
"id": 60635328,
"name": "Period",
"node_id": "MDU6TGFiZWw2MDYzNTMyOA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Period"
}
]
| 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 | 2016-05-13T16:56:43Z | 2016-05-13T16:59:40Z | 2016-05-13T16:59:23Z | NONE | null | When attempting to set an index using a Period rather than a Datetime,
the performance significantly deteriorates. A small example:
```
import pandas as pa
obs = 1000
start_date = '1/1/1900'
df = pa.DataFrame(list(range(1, obs + 1)))
df['dateindex'] = pa.date_range('1/1/1900', periods=obs, freq='M')
df['periodindex'] = pa.period_range('1/1/1900', periods=obs, freq='M')
%timeit df.set_index('dateindex')
#1000 loops, best of 3: 444 µs per loop
%timeit df.set_index('periodindex')
#1000 loops, best of 3: 1.89 ms per loop
```
This difference in performance becomes especially frustrating with
larger dataframes. In order for Period to be as useful as Datetime,
these should be much closer in performance.
| {
"+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/13173/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13173/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13174 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13174/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13174/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13174/events | https://github.com/pandas-dev/pandas/issues/13174 | 154,825,956 | MDU6SXNzdWUxNTQ4MjU5NTY= | 13,174 | resample strange behavior on get_item | {
"avatar_url": "https://avatars.githubusercontent.com/u/11285770?v=4",
"events_url": "https://api.github.com/users/starplanet/events{/privacy}",
"followers_url": "https://api.github.com/users/starplanet/followers",
"following_url": "https://api.github.com/users/starplanet/following{/other_user}",
"gists_url": "https://api.github.com/users/starplanet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/starplanet",
"id": 11285770,
"login": "starplanet",
"node_id": "MDQ6VXNlcjExMjg1Nzcw",
"organizations_url": "https://api.github.com/users/starplanet/orgs",
"received_events_url": "https://api.github.com/users/starplanet/received_events",
"repos_url": "https://api.github.com/users/starplanet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/starplanet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/starplanet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/starplanet"
} | [
{
"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": "207de5",
"default": false,
"description": "resample method",
"id": 74975453,
"name": "Resample",
"node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 1 | 2016-05-14T01:07:46Z | 2016-05-14T12:01:13Z | 2016-05-14T12:01:13Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```
import pandas as pd
data = [{'id': 1, 'buyer': 'A'}, {'id': 2, 'buyer': 'B'}]
df = pd.DataFrame(data, index=pd.date_range('2016-01-01', periods=2))
resampler = df.groupby('id').resample('1D')
```
If I then run `resampler['buyer'].count()` first time, it will output normally:
```
id
1 2016-01-01 1
2 2016-01-02 1
Name: buyer, dtype: int64
```
If I then run `resampler['buyer'].count()` again, it will report error:
```
/usr/local/bin/ipython:1: FutureWarning: .resample() is now a deferred operation
use .resample(...).mean() instead of .resample(...)
#!/usr/local/opt/python/bin/python2.7
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-30-5714547cf98c> in <module>()
----> 1 resampler['buyer'].count()
/usr/local/lib/python2.7/site-packages/pandas/tseries/resample.pyc in __getitem__(self, key)
179 # compat for deprecated
180 if isinstance(self.obj, com.ABCSeries):
--> 181 return self._deprecated()[key]
182
183 raise
/usr/local/lib/python2.7/site-packages/pandas/core/frame.pyc in __getitem__(self, key)
1995 return self._getitem_multilevel(key)
1996 else:
-> 1997 return self._getitem_column(key)
1998
1999 def _getitem_column(self, key):
/usr/local/lib/python2.7/site-packages/pandas/core/frame.pyc in _getitem_column(self, key)
2002 # get column
2003 if self.columns.is_unique:
-> 2004 return self._get_item_cache(key)
2005
2006 # duplicate columns & possible reduce dimensionality
/usr/local/lib/python2.7/site-packages/pandas/core/generic.pyc in _get_item_cache(self, item)
1348 res = cache.get(item)
1349 if res is None:
-> 1350 values = self._data.get(item)
1351 res = self._box_item_values(item, values)
1352 cache[item] = res
/usr/local/lib/python2.7/site-packages/pandas/core/internals.pyc in get(self, item, fastpath)
3288
3289 if not isnull(item):
-> 3290 loc = self.items.get_loc(item)
3291 else:
3292 indexer = np.arange(len(self.items))[isnull(self.items)]
/usr/local/lib/python2.7/site-packages/pandas/indexes/base.pyc in get_loc(self, key, method, tolerance)
1945 return self._engine.get_loc(key)
1946 except KeyError:
-> 1947 return self._engine.get_loc(self._maybe_cast_indexer(key))
1948
1949 indexer = self.get_indexer([key], method=method, tolerance=tolerance)
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4154)()
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4018)()
pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12368)()
pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12322)()
KeyError: 'buyer'
```
If I run `df.groupby('id').resample('1D')['buyer'].count()` instead of `resampler['buyer'].count()`, the problem will not appear.
What's the problem?
#### output of `pd.show_versions()`
## INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: zh_CN.UTF-8
pandas: 0.18.1
nose: None
pip: 8.1.1
setuptools: 19.4
Cython: None
numpy: 1.11.0
scipy: None
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: 1.3.5
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 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/13174/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13174/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13175 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13175/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13175/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13175/events | https://github.com/pandas-dev/pandas/pull/13175 | 154,827,883 | MDExOlB1bGxSZXF1ZXN0NzAwNzgzNzQ= | 13,175 | BUG: Bug in .groupby(..).resample(..) when the same object is called multiple times | {
"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"
} | [
{
"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": "207de5",
"default": false,
"description": "resample method",
"id": 74975453,
"name": "Resample",
"node_id": "MDU6TGFiZWw3NDk3NTQ1Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Resample"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 0 | 2016-05-14T01:47:09Z | 2016-05-14T12:01:13Z | 2016-05-14T12:01:13Z | CONTRIBUTOR | null | closes #13174
| {
"+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/13175/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13175/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13175.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13175",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13175.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13175"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13176 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13176/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13176/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13176/events | https://github.com/pandas-dev/pandas/pull/13176 | 154,828,263 | MDExOlB1bGxSZXF1ZXN0NzAwNzg2MDU= | 13,176 | Correct bool to datetime conversion (behaviour based on int/float processing) | {
"avatar_url": "https://avatars.githubusercontent.com/u/50109?v=4",
"events_url": "https://api.github.com/users/gliptak/events{/privacy}",
"followers_url": "https://api.github.com/users/gliptak/followers",
"following_url": "https://api.github.com/users/gliptak/following{/other_user}",
"gists_url": "https://api.github.com/users/gliptak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gliptak",
"id": 50109,
"login": "gliptak",
"node_id": "MDQ6VXNlcjUwMTA5",
"organizations_url": "https://api.github.com/users/gliptak/orgs",
"received_events_url": "https://api.github.com/users/gliptak/received_events",
"repos_url": "https://api.github.com/users/gliptak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gliptak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gliptak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gliptak"
} | [
{
"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": "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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 14 | 2016-05-14T01:55:57Z | 2016-05-26T12:44:28Z | 2016-05-26T12:43:40Z | CONTRIBUTOR | null | - [x] closes #11853
- [x] tests added / passed
- [x] passes `git diff upstream/master | 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/13176/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13176/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13176.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13176",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13176.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13176"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13177 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13177/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13177/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13177/events | https://github.com/pandas-dev/pandas/pull/13177 | 154,829,289 | MDExOlB1bGxSZXF1ZXN0NzAwNzkyMTU= | 13,177 | DOC: Clarify Categorical Crosstab Behaviour | {
"avatar_url": "https://avatars.githubusercontent.com/u/9273653?v=4",
"events_url": "https://api.github.com/users/gfyoung/events{/privacy}",
"followers_url": "https://api.github.com/users/gfyoung/followers",
"following_url": "https://api.github.com/users/gfyoung/following{/other_user}",
"gists_url": "https://api.github.com/users/gfyoung/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gfyoung",
"id": 9273653,
"login": "gfyoung",
"node_id": "MDQ6VXNlcjkyNzM2NTM=",
"organizations_url": "https://api.github.com/users/gfyoung/orgs",
"received_events_url": "https://api.github.com/users/gfyoung/received_events",
"repos_url": "https://api.github.com/users/gfyoung/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gfyoung/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gfyoung/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gfyoung"
} | [
{
"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": "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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 4 | 2016-05-14T02:19:48Z | 2016-05-14T12:02:02Z | 2016-05-14T12:02:02Z | MEMBER | null | Follow-on to #13073 by explaining the `Categorical` behaviour in the documentation.
| {
"+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/13177/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13177/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13177.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13177",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13177.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13177"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13178 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13178/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13178/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13178/events | https://github.com/pandas-dev/pandas/pull/13178 | 154,851,243 | MDExOlB1bGxSZXF1ZXN0NzAwOTA5Mzk= | 13,178 | BUG: fix to_records confict with unicode_literals #13172 | {
"avatar_url": "https://avatars.githubusercontent.com/u/11285770?v=4",
"events_url": "https://api.github.com/users/starplanet/events{/privacy}",
"followers_url": "https://api.github.com/users/starplanet/followers",
"following_url": "https://api.github.com/users/starplanet/following{/other_user}",
"gists_url": "https://api.github.com/users/starplanet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/starplanet",
"id": 11285770,
"login": "starplanet",
"node_id": "MDQ6VXNlcjExMjg1Nzcw",
"organizations_url": "https://api.github.com/users/starplanet/orgs",
"received_events_url": "https://api.github.com/users/starplanet/received_events",
"repos_url": "https://api.github.com/users/starplanet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/starplanet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/starplanet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/starplanet"
} | [
{
"color": "444444",
"default": false,
"description": "Unicode strings",
"id": 36380025,
"name": "Unicode",
"node_id": "MDU6TGFiZWwzNjM4MDAyNQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Unicode"
},
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 4 | 2016-05-14T12:34:29Z | 2016-05-17T13:40:57Z | 2016-05-17T13:40:50Z | CONTRIBUTOR | null | - [ ] closes #13172
- [ ] tests added / passed
- [ ] passes `git diff upstream/master | 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/13178/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13178/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13178.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13178",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13178.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13178"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13179 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13179/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13179/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13179/events | https://github.com/pandas-dev/pandas/issues/13179 | 154,868,682 | MDU6SXNzdWUxNTQ4Njg2ODI= | 13,179 | BUG: groupby upon categorical and sort=False triggers ValueError | {
"avatar_url": "https://avatars.githubusercontent.com/u/1090105?v=4",
"events_url": "https://api.github.com/users/mpschr/events{/privacy}",
"followers_url": "https://api.github.com/users/mpschr/followers",
"following_url": "https://api.github.com/users/mpschr/following{/other_user}",
"gists_url": "https://api.github.com/users/mpschr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mpschr",
"id": 1090105,
"login": "mpschr",
"node_id": "MDQ6VXNlcjEwOTAxMDU=",
"organizations_url": "https://api.github.com/users/mpschr/orgs",
"received_events_url": "https://api.github.com/users/mpschr/received_events",
"repos_url": "https://api.github.com/users/mpschr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mpschr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mpschr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mpschr"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "e11d21",
"default": false,
"description": "Categorical Data Type",
"id": 78527356,
"name": "Categorical",
"node_id": "MDU6TGFiZWw3ODUyNzM1Ng==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Categorical"
}
]
| closed | false | null | []
| {
"closed_at": "2017-05-06T10:20:19Z",
"closed_issues": 987,
"created_at": "2016-02-08T15:30:21Z",
"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": "after 0.19.x series",
"due_on": "2017-05-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/39",
"id": 1570595,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39/labels",
"node_id": "MDk6TWlsZXN0b25lMTU3MDU5NQ==",
"number": 39,
"open_issues": 0,
"state": "closed",
"title": "0.20.0",
"updated_at": "2018-10-28T08:18:42Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/39"
} | 13 | 2016-05-14T18:30:12Z | 2017-02-22T18:50:58Z | 2017-02-22T18:50:40Z | NONE | null | #### Code that triggers ValueError
**The combination of `sort=False` and a missing category in the data causes the bug - see below**
First off, see this notebook which showcases the bug nicely: [github.com/mpschr/pandas_missing_cat_bug](https://github.com/mpschr/pandas_missing_cat_bug/blob/master/Pandas_categorical_bug_with%20missing_category_in_data.ipynb)
``` python
random.seed(88)
df = pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list('ABCD'))
chromosomes = [str(x) for x in range(1,23)] + ["X","Y"]
df.insert(0, 'chromosomes', sorted([random.choice(chromosomes) for x in range(100)]))
df.chromosomes = df.chromosomes.astype('category', categories=chromosomes, ordered=True)
for c, g in df.query("chromosomes != '1'").groupby('chromosomes', sort=False):
print(c, g.chromosomes.cat.categories, g.shape)
/home/michi/bin/anaconda3/lib/python3.4/site-packages/pandas/core/groupby.py in __init__(self, index, grouper, obj, name, level, sort, in_axis)
2181 cat = self.grouper.unique()
2182 self.grouper = self.grouper.reorder_categories(
-> 2183 cat.categories)
2184
2185 # we make a CategoricalIndex out of the cat grouper
/home/michi/bin/anaconda3/lib/python3.4/site-packages/pandas/core/categorical.py in reorder_categories(self, new_categories, ordered, inplace)
756 """
757 if set(self._categories) != set(new_categories):
--> 758 raise ValueError("items in new_categories are not the same as in "
759 "old categories")
760 return self.set_categories(new_categories, ordered=ordered,
ValueError: items in new_categories are not the same as in old categories
```
##### Summaries of the scenarios where this bug appears:
**Bug scenarios with ordered categories:**
- Default (`sort = True`): No error
- `chromosome 1` filtered out and `sort=True`: No error
- `chromosome 1` filtered out and `sort=False`: **Error**
- `sort = False`: **Error**
**Bug scenarios without ordered categories:**
the 4 scenarios:
- Default (`sort = True`): No error
- `chromosome 1` filtered out and `sort=True`: No error
- `sort = False`: No error
- `chromosome 1` filtered out and `sort=False`: **Error**
#### Expected Output
Not an error, but this:
```
1 Index(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13',
'14', '15', '16', '17', '18', '19', '20', '21', '22', 'X', 'Y'],
dtype='object') (7, 5)
```
#### output of `pd.show_versions()`
pd.show_versions()
## INSTALLED VERSIONS
commit: None
python: 3.4.4.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-34-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: 1.3.4
pip: 8.1.1
setuptools: 20.7.0
Cython: 0.22
numpy: 1.10.4
scipy: 0.16.0
statsmodels: 0.6.0.dev-9ce1605
xarray: None
IPython: 4.1.2
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: None
tables: 3.1.1
numexpr: 2.4.4
matplotlib: 1.4.3
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: None
xlsxwriter: 0.6.7
lxml: 3.4.2
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 0.9.9
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.36.0
pandas_datareader: 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/13179/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13179/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13180 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13180/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13180/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13180/events | https://github.com/pandas-dev/pandas/issues/13180 | 154,884,950 | MDU6SXNzdWUxNTQ4ODQ5NTA= | 13,180 | Converting float64 values to datetime64[ns] format using pd.to_datetime results in NaT if errors='coerce' | {
"avatar_url": "https://avatars.githubusercontent.com/u/15664307?v=4",
"events_url": "https://api.github.com/users/lvphj/events{/privacy}",
"followers_url": "https://api.github.com/users/lvphj/followers",
"following_url": "https://api.github.com/users/lvphj/following{/other_user}",
"gists_url": "https://api.github.com/users/lvphj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lvphj",
"id": 15664307,
"login": "lvphj",
"node_id": "MDQ6VXNlcjE1NjY0MzA3",
"organizations_url": "https://api.github.com/users/lvphj/orgs",
"received_events_url": "https://api.github.com/users/lvphj/received_events",
"repos_url": "https://api.github.com/users/lvphj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lvphj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lvphj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lvphj"
} | [
{
"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 | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-15T01:39:28Z | 2016-05-20T14:06:49Z | 2016-05-20T14:06:49Z | NONE | null | #### Code Sample, a copy-pastable example if possible
A Pandas dataframe contains a date variable that is formatted as float64 as follows:
```
tempDF = pd.DataFrame({'group': ['a','b'],
'date': [1.434692e+18,1.432766e+18]})
print(tempDF)
```
Which appears as:
```
date group
0 1.434692e+18 a
1 1.432766e+18 b
```
The date variables can be formatted to datetime64[ns] as follows:
```
tempDF['date'] = pd.to_datetime(tempDF['date'],format=None)
print(tempDF)
```
Which works as expected:
```
date group
0 2015-06-19 05:33:20 a
1 2015-05-27 22:33:20 b
```
However, if errors='coerce' is included in the do_datetime() function, the dates are returned as NaT.
```
tempDF['date'] = pd.to_datetime(tempDF['date'],format=None,errors='coerce')
print(tempDF)
```
Which produces the following:
```
date group
0 NaT a
1 NaT b
```
This issue was identified as a result of a reported bug (#12821 ) where datetime64[ns] columns are returned as float64 following agg() function where all dates in a group are NaT. Converting columns back to datetime64[ns] format is necessary. However, identifying valid numeric values as errors when errors='coerce' and returning NaT values results in unnecessary data-loss.
#### Expected Output
```
date group
0 2015-06-19 05:33:20 a
1 2015-05-27 22:33:20 b
```
#### output of `pd.show_versions()`
```
INSTALLED VERSIONS
------------------
commit: None
python: 3.4.1.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
pandas: 0.18.1
nose: None
pip: 1.5.6
setuptools: 20.1.1
Cython: None
numpy: 1.11.0
scipy: 0.16.1
statsmodels: None
xarray: None
IPython: 4.1.1
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.0
openpyxl: 2.3.2
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 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/13180/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13180/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13181 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13181/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13181/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13181/events | https://github.com/pandas-dev/pandas/issues/13181 | 154,892,658 | MDU6SXNzdWUxNTQ4OTI2NTg= | 13,181 | The behavior of `DataFrame.ix` slicing with a negative index | {
"avatar_url": "https://avatars.githubusercontent.com/u/5564044?v=4",
"events_url": "https://api.github.com/users/c-bata/events{/privacy}",
"followers_url": "https://api.github.com/users/c-bata/followers",
"following_url": "https://api.github.com/users/c-bata/following{/other_user}",
"gists_url": "https://api.github.com/users/c-bata/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/c-bata",
"id": 5564044,
"login": "c-bata",
"node_id": "MDQ6VXNlcjU1NjQwNDQ=",
"organizations_url": "https://api.github.com/users/c-bata/orgs",
"received_events_url": "https://api.github.com/users/c-bata/received_events",
"repos_url": "https://api.github.com/users/c-bata/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/c-bata/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/c-bata/subscriptions",
"type": "User",
"url": "https://api.github.com/users/c-bata"
} | [
{
"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": 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 | 2016-05-15T06:04:28Z | 2016-05-15T14:02:30Z | 2016-05-15T12:49:59Z | NONE | null | #### Code Sample, a copy-pastable example if possible
``` python
>>> df = pd.DataFrame(np.arange(16).reshape(8, 2))
>>> df
0 1
0 0 1
1 2 3
2 4 5
3 6 7
4 8 9
5 10 11
6 12 13
7 14 15
>>> df[-4:]
0 1
4 8 9
5 10 11
6 12 13
7 14 15
```
But, `df.ix[-4:]` returns:
``` python
>>> df.ix[-4:]
0 1
0 0 1
1 2 3
2 4 5
3 6 7
4 8 9
5 10 11
6 12 13
7 14 15
```
#### Expected Output
The following code is the behavior of the python's slicing with negative index.
``` python
>>> x = list(range(10))
>>> x[-5:]
[5, 6, 7, 8, 9]
```
So, I think `df.ix[-4:]` should return the same output as `df[-4:]` like:
``` python
>>> df.ix[-4:]
0 1
4 8 9
5 10 11
6 12 13
7 14 15
```
#### output of `pd.show_versions()`
``` python
>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Darwin
OS-release: 15.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: ja_JP.UTF-8
pandas: 0.18.1
nose: None
pip: 8.1.2
setuptools: 21.0.0
Cython: None
numpy: 1.11.0
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 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/13181/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13181/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13182 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13182/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13182/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13182/events | https://github.com/pandas-dev/pandas/issues/13182 | 154,895,652 | MDU6SXNzdWUxNTQ4OTU2NTI= | 13,182 | x_compat has no effect | {
"avatar_url": "https://avatars.githubusercontent.com/u/7460499?v=4",
"events_url": "https://api.github.com/users/cschwem2er/events{/privacy}",
"followers_url": "https://api.github.com/users/cschwem2er/followers",
"following_url": "https://api.github.com/users/cschwem2er/following{/other_user}",
"gists_url": "https://api.github.com/users/cschwem2er/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cschwem2er",
"id": 7460499,
"login": "cschwem2er",
"node_id": "MDQ6VXNlcjc0NjA0OTk=",
"organizations_url": "https://api.github.com/users/cschwem2er/orgs",
"received_events_url": "https://api.github.com/users/cschwem2er/received_events",
"repos_url": "https://api.github.com/users/cschwem2er/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cschwem2er/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cschwem2er/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cschwem2er"
} | [
{
"color": "8AE234",
"default": false,
"description": null,
"id": 2413328,
"name": "Visualization",
"node_id": "MDU6TGFiZWwyNDEzMzI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Visualization"
},
{
"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 | 4 | 2016-05-15T07:49:25Z | 2016-05-15T12:53:14Z | 2016-05-15T12:16:47Z | NONE | null | When trying to use x_compat on an x-axis with string indicators the use of x_compat has no effect. What I would like is the plot to show every x-value and twist the angle, like in the corresponding [visualization example](http://pandas.pydata.org/pandas-docs/stable/visualization.html#suppressing-tick-resolution-adjustment).
#### Code Sample
```
posts.plot(figsize=(8,6), fontsize=10, x_compat = True);
```
#### Output

#### `pd.show_versions()`
---
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.1
setuptools: 20.7.0
Cython: 0.24
numpy: 1.10.4
scipy: 0.17.1
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: 1.3.1
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.8.6
lxml: 3.6.0
bs4: 4.4.1
html5lib: 0.9999999
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.40.0
pandas_datareader: 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/13182/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13182/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13183 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13183/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13183/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13183/events | https://github.com/pandas-dev/pandas/pull/13183 | 154,909,839 | MDExOlB1bGxSZXF1ZXN0NzAxMjE4OTQ= | 13,183 | BUG: Bug in .to_datetime() when passing integers or floats, no unit and errors=coerce | {
"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"
} | [
{
"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 | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 8 | 2016-05-15T13:54:32Z | 2018-08-18T07:59:16Z | 2016-05-20T14:06:49Z | CONTRIBUTOR | null | closes #13180
| {
"+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/13183/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13183/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13183.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13183",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13183.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13183"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13184 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13184/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13184/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13184/events | https://github.com/pandas-dev/pandas/issues/13184 | 154,911,146 | MDU6SXNzdWUxNTQ5MTExNDY= | 13,184 | Excel corrupted file when using to_csv method | {
"avatar_url": "https://avatars.githubusercontent.com/u/18058492?v=4",
"events_url": "https://api.github.com/users/brupelo/events{/privacy}",
"followers_url": "https://api.github.com/users/brupelo/followers",
"following_url": "https://api.github.com/users/brupelo/following{/other_user}",
"gists_url": "https://api.github.com/users/brupelo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brupelo",
"id": 18058492,
"login": "brupelo",
"node_id": "MDQ6VXNlcjE4MDU4NDky",
"organizations_url": "https://api.github.com/users/brupelo/orgs",
"received_events_url": "https://api.github.com/users/brupelo/received_events",
"repos_url": "https://api.github.com/users/brupelo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brupelo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brupelo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brupelo"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "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 | 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"
} | 9 | 2016-05-15T14:24:04Z | 2021-09-27T10:54:28Z | 2016-06-23T09:21:31Z | NONE | null | #### Input data
[foo1.csv](https://www.dropbox.com/s/peojg2ugn6m4dtt/foo1.csv?dl=0)
#### Code Sample, a copy-pastable example if possible
import pandas as pd
df = pd.read_csv('foo1.csv', sep='\t', encoding='utf-16le', engine='python')
df.to_csv("out.csv", mode='wb', sep='\t', encoding='utf-16le', engine='python')
#### Expected Output
out.csv should be exactly the same than foo1.csv, instead it becomes "corrupted". For example, trying to open it with excel will show a message saying the file is corrupted and it cannot be opened. Checking the output with an hex editor you can see some extra bytes have been added into the header of out.csv as well as other additional bytes.
#### output of `pd.show_versions()`
commit: None
python: 2.7.10.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.0
nose: None
pip: 8.1.1
setuptools: 20.10.1
Cython: None
numpy: 1.10.4
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.0
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.4.1
html5lib: 0.9999999
httplib2: 0.9.2
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 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/13184/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13184/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13185 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13185/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13185/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13185/events | https://github.com/pandas-dev/pandas/issues/13185 | 154,913,179 | MDU6SXNzdWUxNTQ5MTMxNzk= | 13,185 | FAIL: test_scatter_matrix_axis (pandas.tests.test_graphics_others.TestDataFramePlots) in 0.18.1 with py27 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1879063?v=4",
"events_url": "https://api.github.com/users/neirbowj/events{/privacy}",
"followers_url": "https://api.github.com/users/neirbowj/followers",
"following_url": "https://api.github.com/users/neirbowj/following{/other_user}",
"gists_url": "https://api.github.com/users/neirbowj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neirbowj",
"id": 1879063,
"login": "neirbowj",
"node_id": "MDQ6VXNlcjE4NzkwNjM=",
"organizations_url": "https://api.github.com/users/neirbowj/orgs",
"received_events_url": "https://api.github.com/users/neirbowj/received_events",
"repos_url": "https://api.github.com/users/neirbowj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neirbowj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neirbowj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neirbowj"
} | [
{
"color": "8AE234",
"default": false,
"description": null,
"id": 2413328,
"name": "Visualization",
"node_id": "MDU6TGFiZWwyNDEzMzI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Visualization"
},
{
"color": "5319e7",
"default": false,
"description": "Unit tests that occasionally fail",
"id": 76939933,
"name": "Unreliable Test",
"node_id": "MDU6TGFiZWw3NjkzOTkzMw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Unreliable%20Test"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 1 | 2016-05-15T15:07:51Z | 2016-07-05T23:14:36Z | 2016-07-05T23:14:36Z | CONTRIBUTOR | null | When run alone, `test_scatter_matrix_axis` passes. When run together with the rest of `TestDataFramePlots`, it fails.
I cannot test with py34 because matplotlib is not available on FreeBSD under py3k.
#### Code Sample, a copy-pastable example if possible
```
% nosetests-2.7 pandas.tests.test_graphics_others:TestDataFramePlots.test_scatter_matrix_axis
.
----------------------------------------------------------------------
Ran 1 test in 8.150s
OK
% nosetests-2.7 pandas.tests.test_graphics_others:TestDataFramePlots
..S/usr/local/lib/python2.7/site-packages/pandas/tools/plotting.py:3369: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared
"the passed axes is being cleared", UserWarning)
/usr/local/lib/python2.7/site-packages/pandas/tools/plotting.py:3369: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared
"the passed axes is being cleared", UserWarning)
/usr/local/lib/python2.7/site-packages/pandas/tools/plotting.py:3369: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared
"the passed axes is being cleared", UserWarning)
/usr/local/lib/python2.7/site-packages/pandas/tools/plotting.py:3369: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared
"the passed axes is being cleared", UserWarning)
/usr/local/lib/python2.7/site-packages/pandas/tools/plotting.py:3369: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared
"the passed axes is being cleared", UserWarning)
/usr/local/lib/python2.7/site-packages/matplotlib/artist.py:221: MatplotlibDeprecationWarning: This has been deprecated in mpl 1.5, please use the
axes property. A removal date has not been set.
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
/usr/local/lib/python2.7/site-packages/pandas/tools/plotting.py:3369: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared
"the passed axes is being cleared", UserWarning)
......F.
======================================================================
FAIL: test_scatter_matrix_axis (pandas.tests.test_graphics_others.TestDataFramePlots)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pandas/tests/test_graphics_others.py", line 431, in test_scatter_matrix_axis
frame=df, range_padding=.1)
File "/usr/local/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/usr/local/lib/python2.7/site-packages/pandas/util/testing.py", line 2318, in assert_produces_warning
% expected_warning.__name__)
AssertionError: Did not see expected warning of class 'UserWarning'.
----------------------------------------------------------------------
Ran 11 tests in 74.896s
FAILED (SKIP=1, failures=1)
```
#### Expected Output
I expect all tests to pass.
#### output of `pd.show_versions()`
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: FreeBSD
OS-release: 10.2-STABLE
machine: amd64
processor: amd64
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1
nose: 1.3.7
pip: 8.0.2
setuptools: 20.0
Cython: None
numpy: 1.11.0
scipy: 0.16.1
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.5.0
pytz: 2016.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.0
openpyxl: 2.3.5
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: 0.8.5
lxml: 3.5.0
bs4: 4.4.1
html5lib: 0.9999999
httplib2: None
apiclient: None
sqlalchemy: 0.7.10
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.39.0
pandas_datareader: 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/13185/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13185/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13186 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13186/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13186/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13186/events | https://github.com/pandas-dev/pandas/issues/13186 | 154,913,711 | MDU6SXNzdWUxNTQ5MTM3MTE= | 13,186 | FAIL: test_getitem_setitem_datetime_tz_dateutil (pandas.tests.series.test_timeseries.TestSeriesTimeSeries) in 0.18.1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1879063?v=4",
"events_url": "https://api.github.com/users/neirbowj/events{/privacy}",
"followers_url": "https://api.github.com/users/neirbowj/followers",
"following_url": "https://api.github.com/users/neirbowj/following{/other_user}",
"gists_url": "https://api.github.com/users/neirbowj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neirbowj",
"id": 1879063,
"login": "neirbowj",
"node_id": "MDQ6VXNlcjE4NzkwNjM=",
"organizations_url": "https://api.github.com/users/neirbowj/orgs",
"received_events_url": "https://api.github.com/users/neirbowj/received_events",
"repos_url": "https://api.github.com/users/neirbowj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neirbowj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neirbowj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neirbowj"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 3 | 2016-05-15T15:18:31Z | 2016-05-16T12:05:35Z | 2016-05-15T16:09:35Z | CONTRIBUTOR | null | This test fails under py27 and py34.
#### Code Sample, a copy-pastable example if possible
```
% nosetests-2.7 pandas.tests.series.test_timeseries:TestSeriesTimeSeries.test_getitem_setitem_datetime_tz_dateutil
F
======================================================================
FAIL: test_getitem_setitem_datetime_tz_dateutil (pandas.tests.series.test_timeseries.TestSeriesTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pandas/tests/series/test_timeseries.py", line 373, in test_getitem_setitem_datetime_tz_dateutil
assert_series_equal(result, ts)
File "/usr/local/lib/python2.7/site-packages/pandas/util/testing.py", line 1049, in assert_series_equal
check_less_precise, obj='{0}'.format(obj))
File "pandas/src/testing.pyx", line 58, in pandas._testing.assert_almost_equal (pandas/src/testing.c:3887)
File "pandas/src/testing.pyx", line 147, in pandas._testing.assert_almost_equal (pandas/src/testing.c:2769)
File "/usr/local/lib/python2.7/site-packages/pandas/util/testing.py", line 915, in raise_assert_detail
raise AssertionError(msg)
AssertionError: Series are different
Series values are different (2.0 %)
[left]: [-1.86439680803, -1.48753990623, 1.70014886271, -0.681093073082, -0.681093073082, -1.53036995139, -0.874340620421, -0.449379718617, 0.199006661768, -0.216851984269, 0.678233107275, 0.845483557984, -0.591939974933, -0.710426528489, -0.246902534317, 1.62090443334, -0.29205483777, 0.734444716348, -0.124417337768, -0.708111449895, -0.399676812698, -0.165487765543, -1.52919474544, -0.743328414533, -0.826169397925, -0.621684486914, -1.02101828767, 0.507572292251, 1.64945264051, -1.16729493131, -1.59575805184, 1.22194630958, -0.324260225115, -2.70908723091, 0.419972356697, 0.199954966493, 1.51343480756, 0.0528252604798, -1.59926845777, 1.72143823853, -0.391567581633, 0.302380438723, 0.151857495879, -0.770407214622, 1.11355519113, 0.373448388224, -0.0993048929725, -2.01116150929, -0.953752431803, -0.53637958571]
[right]: [-1.86439680803, -1.48753990623, 1.70014886271, 0.328450105526, -0.681093073082, -1.53036995139, -0.874340620421, -0.449379718617, 0.199006661768, -0.216851984269, 0.678233107275, 0.845483557984, -0.591939974933, -0.710426528489, -0.246902534317, 1.62090443334, -0.29205483777, 0.734444716348, -0.124417337768, -0.708111449895, -0.399676812698, -0.165487765543, -1.52919474544, -0.743328414533, -0.826169397925, -0.621684486914, -1.02101828767, 0.507572292251, 1.64945264051, -1.16729493131, -1.59575805184, 1.22194630958, -0.324260225115, -2.70908723091, 0.419972356697, 0.199954966493, 1.51343480756, 0.0528252604798, -1.59926845777, 1.72143823853, -0.391567581633, 0.302380438723, 0.151857495879, -0.770407214622, 1.11355519113, 0.373448388224, -0.0993048929725, -2.01116150929, -0.953752431803, -0.53637958571]
----------------------------------------------------------------------
Ran 1 test in 0.076s
FAILED (failures=1)
% nosetests-3.4 pandas.tests.series.test_timeseries:TestSeriesTimeSeries.test_getitem_setitem_datetime_tz_dateutil
F
======================================================================
FAIL: test_getitem_setitem_datetime_tz_dateutil (pandas.tests.series.test_timeseries.TestSeriesTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/pandas/tests/series/test_timeseries.py", line 373, in test_getitem_setitem_datetime_tz_dateutil
assert_series_equal(result, ts)
File "/usr/local/lib/python3.4/site-packages/pandas/util/testing.py", line 1049, in assert_series_equal
check_less_precise, obj='{0}'.format(obj))
File "pandas/src/testing.pyx", line 58, in pandas._testing.assert_almost_equal (pandas/src/testing.c:3887)
File "pandas/src/testing.pyx", line 147, in pandas._testing.assert_almost_equal (pandas/src/testing.c:2769)
File "/usr/local/lib/python3.4/site-packages/pandas/util/testing.py", line 915, in raise_assert_detail
raise AssertionError(msg)
AssertionError: Series are different
Series values are different (2.0 %)
[left]: [-1.62055133384, -0.40032873599, -0.0413126236653, -0.0874632372333, -0.0874632372333, 0.963355896157, -1.14800978329, 0.900767884316, -0.311906151027, -0.86659183859, 0.103124666827, -1.05425628959, 0.151391743507, 2.37804326267, -0.565799316283, 0.106545790548, 0.270492212263, -0.234666171836, 1.94563993527, 0.772557437014, 1.00327635974, 1.64773195089, -1.39852655695, 2.63998681932, -1.04312074403, 0.439769938036, -1.37277863866, -0.0158894503064, -0.436093446088, -0.14146511313, -0.641742768338, 2.34834910935, 0.203726407935, 0.107095272346, 1.88232213003, -1.19930651532, 0.247541076124, -1.85409991944, 0.403116803679, 0.198896287287, 1.04642546617, -0.351747059523, -0.760612947304, 1.0257071291, 1.02611993308, -0.83529928137, -0.223900372029, 0.140186002284, -0.352805019677, 0.311596888265]
[right]: [-1.62055133384, -0.40032873599, -0.0413126236653, 1.69209510358, -0.0874632372333, 0.963355896157, -1.14800978329, 0.900767884316, -0.311906151027, -0.86659183859, 0.103124666827, -1.05425628959, 0.151391743507, 2.37804326267, -0.565799316283, 0.106545790548, 0.270492212263, -0.234666171836, 1.94563993527, 0.772557437014, 1.00327635974, 1.64773195089, -1.39852655695, 2.63998681932, -1.04312074403, 0.439769938036, -1.37277863866, -0.0158894503064, -0.436093446088, -0.14146511313, -0.641742768338, 2.34834910935, 0.203726407935, 0.107095272346, 1.88232213003, -1.19930651532, 0.247541076124, -1.85409991944, 0.403116803679, 0.198896287287, 1.04642546617, -0.351747059523, -0.760612947304, 1.0257071291, 1.02611993308, -0.83529928137, -0.223900372029, 0.140186002284, -0.352805019677, 0.311596888265]
----------------------------------------------------------------------
Ran 1 test in 0.075s
FAILED (failures=1)
```
In both cases it is only the fourth element that disagrees: -0.681093073082 vs. 0.328450105526 for py27; and -0.0874632372333 vs. 1.69209510358 for py34.
#### Expected Output
I expect the test to pass.
#### output of `pd.show_versions()`
For py27:
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: FreeBSD
OS-release: 10.2-STABLE
machine: amd64
processor: amd64
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1
nose: 1.3.7
pip: 8.0.2
setuptools: 20.0
Cython: None
numpy: 1.11.0
scipy: 0.16.1
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.5.0
pytz: 2016.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.0
openpyxl: 2.3.5
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: 0.8.5
lxml: 3.5.0
bs4: 4.4.1
html5lib: 0.9999999
httplib2: None
apiclient: None
sqlalchemy: 0.7.10
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.39.0
pandas_datareader: None
```
For py34:
```
INSTALLED VERSIONS
------------------
commit: None
python: 3.4.4.final.0
python-bits: 64
OS: FreeBSD
OS-release: 10.2-STABLE
machine: amd64
processor: amd64
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1
nose: 1.3.7
pip: None
setuptools: 20.0
Cython: 0.23.5
numpy: 1.11.0
scipy: 0.16.1
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.5.0
pytz: 2016.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5.2
matplotlib: None
openpyxl: 2.3.5
xlrd: 0.9.3
xlwt: None
xlsxwriter: 0.8.5
lxml: 3.5.0
bs4: 4.4.1
html5lib: 0.9999999
httplib2: None
apiclient: None
sqlalchemy: 0.7.10
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.39.0
pandas_datareader: 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/13186/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13186/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13187 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13187/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13187/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13187/events | https://github.com/pandas-dev/pandas/pull/13187 | 154,914,033 | MDExOlB1bGxSZXF1ZXN0NzAxMjQyMzE= | 13,187 | ENH: Improved error message (issue 13084) | {
"avatar_url": "https://avatars.githubusercontent.com/u/9390695?v=4",
"events_url": "https://api.github.com/users/gregsifr/events{/privacy}",
"followers_url": "https://api.github.com/users/gregsifr/followers",
"following_url": "https://api.github.com/users/gregsifr/following{/other_user}",
"gists_url": "https://api.github.com/users/gregsifr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gregsifr",
"id": 9390695,
"login": "gregsifr",
"node_id": "MDQ6VXNlcjkzOTA2OTU=",
"organizations_url": "https://api.github.com/users/gregsifr/orgs",
"received_events_url": "https://api.github.com/users/gregsifr/received_events",
"repos_url": "https://api.github.com/users/gregsifr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gregsifr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gregsifr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gregsifr"
} | [
{
"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"
}
]
| 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 | 2016-05-15T15:25:43Z | 2017-03-17T09:45:30Z | 2016-05-31T15:19:20Z | NONE | null | - [ ] closes #13084
- [ ] tests passed
- [ ] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew:
As per issue 13084, made it clearer for the user to understand why a concat failed. No additional code was needed. This is because the _verify_integrity method inside the BlockManager class of pandas/core/internals.py already checked that the length of the concat data and index are the same. An alternative option was to pass the error in the e argument of the construction_error method of the SingleBlockManager. The alternative was not performed as there appeared to be no other reason why the shape of the dataframes would be different, as a result using the e argument would result in duplicating code. The method was also not extended to identify the dataframes with duplicate index values to avoid overcomplicating the code. The end user should be able to easily identify the dataframe/s causing the errors
| {
"+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/13187/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13187/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13187.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13187",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13187.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13187"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13188 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13188/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13188/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13188/events | https://github.com/pandas-dev/pandas/pull/13188 | 154,918,912 | MDExOlB1bGxSZXF1ZXN0NzAxMjY4NjU= | 13,188 | CLN: Check Warnings in test_graphics_others | {
"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": "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": "8AE234",
"default": false,
"description": null,
"id": 2413328,
"name": "Visualization",
"node_id": "MDU6TGFiZWwyNDEzMzI4",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Visualization"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 16 | 2016-05-15T17:11:08Z | 2017-04-05T02:06:59Z | 2016-07-05T23:14:36Z | CONTRIBUTOR | null | - [x] closes #13185 maybe
- [x] passes `git diff upstream/master | flake8 --diff`
Also a MatplotlibDeprecationWarning for use of `.get_axes()` vs. `.axes` in some tests.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/13188/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13188/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13188.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13188",
"merged_at": "2016-07-05T23:14:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/13188.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13188"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13189 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13189/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13189/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13189/events | https://github.com/pandas-dev/pandas/pull/13189 | 154,923,296 | MDExOlB1bGxSZXF1ZXN0NzAxMjkyOTE= | 13,189 | ENH: support decimal option in PythonParser #12933 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1499184?v=4",
"events_url": "https://api.github.com/users/camilocot/events{/privacy}",
"followers_url": "https://api.github.com/users/camilocot/followers",
"following_url": "https://api.github.com/users/camilocot/following{/other_user}",
"gists_url": "https://api.github.com/users/camilocot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/camilocot",
"id": 1499184,
"login": "camilocot",
"node_id": "MDQ6VXNlcjE0OTkxODQ=",
"organizations_url": "https://api.github.com/users/camilocot/orgs",
"received_events_url": "https://api.github.com/users/camilocot/received_events",
"repos_url": "https://api.github.com/users/camilocot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/camilocot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/camilocot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/camilocot"
} | [
{
"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": "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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 11 | 2016-05-15T18:44:45Z | 2016-05-22T20:03:12Z | 2016-05-22T20:02:38Z | CONTRIBUTOR | null | - [x] closes #12933
- [x] tests added / passed
- [x] passes `git diff upstream/master | 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/13189/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13189/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13189.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13189",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13189.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13189"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13190 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13190/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13190/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13190/events | https://github.com/pandas-dev/pandas/pull/13190 | 154,927,723 | MDExOlB1bGxSZXF1ZXN0NzAxMzE3MzI= | 13,190 | TST: Use compatible time zones (#13186) | {
"avatar_url": "https://avatars.githubusercontent.com/u/1879063?v=4",
"events_url": "https://api.github.com/users/neirbowj/events{/privacy}",
"followers_url": "https://api.github.com/users/neirbowj/followers",
"following_url": "https://api.github.com/users/neirbowj/following{/other_user}",
"gists_url": "https://api.github.com/users/neirbowj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neirbowj",
"id": 1879063,
"login": "neirbowj",
"node_id": "MDQ6VXNlcjE4NzkwNjM=",
"organizations_url": "https://api.github.com/users/neirbowj/orgs",
"received_events_url": "https://api.github.com/users/neirbowj/received_events",
"repos_url": "https://api.github.com/users/neirbowj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neirbowj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neirbowj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neirbowj"
} | [
{
"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"
},
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-15T20:13:29Z | 2016-05-16T12:05:24Z | 2016-05-16T12:05:24Z | CONTRIBUTOR | null | - resolves #13186, allowing `pandas.tests.series.test_timeseries.TestSeriesTimeSeries.test_getitem_setitem_datetime_tz_dateutil` to pass on platforms that do not supply zoneinfo for, e.g., "US/Central".
The test failures in Travis are all unrelated to the code affected by this 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/13190/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13190/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13190.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13190",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13190.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13190"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13191 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13191/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13191/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13191/events | https://github.com/pandas-dev/pandas/issues/13191 | 154,932,122 | MDU6SXNzdWUxNTQ5MzIxMjI= | 13,191 | BUG: Series _transform_fast fails for datetime with null groups | {
"avatar_url": "https://avatars.githubusercontent.com/u/1924092?v=4",
"events_url": "https://api.github.com/users/chris-b1/events{/privacy}",
"followers_url": "https://api.github.com/users/chris-b1/followers",
"following_url": "https://api.github.com/users/chris-b1/following{/other_user}",
"gists_url": "https://api.github.com/users/chris-b1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chris-b1",
"id": 1924092,
"login": "chris-b1",
"node_id": "MDQ6VXNlcjE5MjQwOTI=",
"organizations_url": "https://api.github.com/users/chris-b1/orgs",
"received_events_url": "https://api.github.com/users/chris-b1/received_events",
"repos_url": "https://api.github.com/users/chris-b1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chris-b1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chris-b1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chris-b1"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 0 | 2016-05-15T21:43:14Z | 2016-05-18T13:19:39Z | 2016-05-18T13:19:39Z | CONTRIBUTOR | null | xref #10972 - but not the same issue. I've got a fix for this + #12737 coming.
#### Code Sample, a copy-pastable example if possible
``` python
In [20]: df = pd.DataFrame({'grouping':[np.nan,1,1,3],
'v':[1.1, 2.1, 3.1, 4.5],
'd':pd.date_range('2014-1-1','2014-1-4')})
In [21]: df.groupby('grouping')['d'].transform('first')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-21-cb1ed73aabc3> in <module>()
----> 1 df.groupby('grouping')['d'].transform('first')
C:\Users\Chris\Anaconda\lib\site-packages\pandas\core\groupby.pyc in transform(self, func, *args, **kwargs)
2738 # cythonized aggregation and merge
2739 return self._transform_fast(
-> 2740 lambda: getattr(self, func)(*args, **kwargs))
2741
2742 # reg transform
C:\Users\Chris\Anaconda\lib\site-packages\pandas\core\groupby.pyc in _transform_fast(self, func)
2781 out = func().values[ids]
2782 if not mask.all():
-> 2783 out = np.where(mask, out, np.nan)
2784
2785 obs = np.zeros(ngroup, dtype='bool')
TypeError: invalid type promotion
```
| {
"+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/13191/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13191/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13192 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13192/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13192/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13192/events | https://github.com/pandas-dev/pandas/pull/13192 | 154,937,827 | MDExOlB1bGxSZXF1ZXN0NzAxMzY5NjM= | 13,192 | PERF: DataFrame transform | {
"avatar_url": "https://avatars.githubusercontent.com/u/1924092?v=4",
"events_url": "https://api.github.com/users/chris-b1/events{/privacy}",
"followers_url": "https://api.github.com/users/chris-b1/followers",
"following_url": "https://api.github.com/users/chris-b1/following{/other_user}",
"gists_url": "https://api.github.com/users/chris-b1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chris-b1",
"id": 1924092,
"login": "chris-b1",
"node_id": "MDQ6VXNlcjE5MjQwOTI=",
"organizations_url": "https://api.github.com/users/chris-b1/orgs",
"received_events_url": "https://api.github.com/users/chris-b1/received_events",
"repos_url": "https://api.github.com/users/chris-b1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chris-b1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chris-b1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chris-b1"
} | [
{
"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": "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": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 3 | 2016-05-15T23:23:09Z | 2016-05-18T13:19:53Z | 2016-05-18T13:19:39Z | CONTRIBUTOR | null | - [x] closes #12737,
closes #13191
- [ ] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
```
before after ratio
[2de2884 ] [4b352d9 ]
- 164.84ms 1.73ms 0.01 groupby.groupby_transform_dataframe.time_groupby_transform_dataframe
4.44ms 3.77ms 0.85 groupby.groupby_transform_series.time_groupby_transform_series
6.40ms 4.76ms 0.74 groupby.groupby_transform_series2.time_groupby_transform_series2
```
| {
"+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/13192/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13192/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13192.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13192",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13192.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13192"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13193 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13193/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13193/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13193/events | https://github.com/pandas-dev/pandas/issues/13193 | 154,940,933 | MDU6SXNzdWUxNTQ5NDA5MzM= | 13,193 | BUG: merging on int32 platforms with large blocks | {
"avatar_url": "https://avatars.githubusercontent.com/u/8282510?v=4",
"events_url": "https://api.github.com/users/randomgambit/events{/privacy}",
"followers_url": "https://api.github.com/users/randomgambit/followers",
"following_url": "https://api.github.com/users/randomgambit/following{/other_user}",
"gists_url": "https://api.github.com/users/randomgambit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/randomgambit",
"id": 8282510,
"login": "randomgambit",
"node_id": "MDQ6VXNlcjgyODI1MTA=",
"organizations_url": "https://api.github.com/users/randomgambit/orgs",
"received_events_url": "https://api.github.com/users/randomgambit/received_events",
"repos_url": "https://api.github.com/users/randomgambit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/randomgambit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/randomgambit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/randomgambit"
} | [
{
"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": "0e8a16",
"default": false,
"description": "32-bit systems",
"id": 563047854,
"name": "32bit",
"node_id": "MDU6TGFiZWw1NjMwNDc4NTQ=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/32bit"
}
]
| 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"
} | 16 | 2016-05-16T00:21:09Z | 2019-12-01T17:54:37Z | null | NONE | null | Hello everyone,
I am trying to merge a ridiculously large dataframe with another ridiculously smaller one and I get
`df=df.merge(slave,left_on='buyer',right_on='NAME',how='left')`
`OverflowError: Python int too large to convert to C long`
Ram is filled at 56% prior to the merge. Am I hitting some limitations here?
master dataframe
```
df.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 80162624 entries, 0 to 90320839
Data columns (total 38 columns):
index int64
dtypes: datetime64[ns](2), float32(1), int64(3), object(32)
memory usage: 23.0+ GB
```
```
dataframe I would like to merge to the master
slave.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 55394 entries, 0 to 55393
Data columns (total 6 columns):
dtypes: object(6)
memory usage: 2.5+ MB
```
I am using the latest Anaconda distribution (that is, with Pandas 18.0)
Thanks for your help!
| {
"+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/13193/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13193/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13194 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13194/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13194/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13194/events | https://github.com/pandas-dev/pandas/issues/13194 | 155,037,279 | MDU6SXNzdWUxNTUwMzcyNzk= | 13,194 | align with broadcast_axis specified always uses inner join when aligning dataframe and series on other axis. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1150402?v=4",
"events_url": "https://api.github.com/users/kdebrab/events{/privacy}",
"followers_url": "https://api.github.com/users/kdebrab/followers",
"following_url": "https://api.github.com/users/kdebrab/following{/other_user}",
"gists_url": "https://api.github.com/users/kdebrab/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kdebrab",
"id": 1150402,
"login": "kdebrab",
"node_id": "MDQ6VXNlcjExNTA0MDI=",
"organizations_url": "https://api.github.com/users/kdebrab/orgs",
"received_events_url": "https://api.github.com/users/kdebrab/received_events",
"repos_url": "https://api.github.com/users/kdebrab/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kdebrab/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kdebrab/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kdebrab"
} | [
{
"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"
}
]
| 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 | 2016-05-16T14:10:14Z | 2019-10-21T19:52:16Z | null | CONTRIBUTOR | null | Pandas version 0.18.1:
``` python
In[1]: import pandas as pd
In[2]: df = pd.DataFrame(np.array([[1., 2.], [3., 4.]]), columns=list('AB'))
In[3]: ts = pd.Series([5., 6., 7.])
In[4]: df.align(ts, join='outer', axis=0, broadcast_axis=1)
Out[4]:
( A B
0 1.0 2.0
1 3.0 4.0, A B
0 5.0 5.0
1 6.0 6.0)
```
However, as 'join' is specified to be 'outer', I would have expected the following result:
``` python
Out[4]:
( A B
0 1.0 2.0
1 3.0 4.0
2 NaN NaN, A B
0 5.0 5.0
1 6.0 6.0
2 7.0 7.0
dtype: float64)
```
Same problem occurs for:
``` python
df.align(ts, join='right', axis=0, broadcast_axis=1)
ts.align(df, join='outer', axis=0, broadcast_axis=1)
ts.align(df, join='left', axis=0, broadcast_axis=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/13194/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13194/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13195 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13195/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13195/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13195/events | https://github.com/pandas-dev/pandas/issues/13195 | 155,049,269 | MDU6SXNzdWUxNTUwNDkyNjk= | 13,195 | DOC: RangeIndex documentation missing from API | {
"avatar_url": "https://avatars.githubusercontent.com/u/537223?v=4",
"events_url": "https://api.github.com/users/AnkurDedania/events{/privacy}",
"followers_url": "https://api.github.com/users/AnkurDedania/followers",
"following_url": "https://api.github.com/users/AnkurDedania/following{/other_user}",
"gists_url": "https://api.github.com/users/AnkurDedania/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AnkurDedania",
"id": 537223,
"login": "AnkurDedania",
"node_id": "MDQ6VXNlcjUzNzIyMw==",
"organizations_url": "https://api.github.com/users/AnkurDedania/orgs",
"received_events_url": "https://api.github.com/users/AnkurDedania/received_events",
"repos_url": "https://api.github.com/users/AnkurDedania/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AnkurDedania/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AnkurDedania/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AnkurDedania"
} | [
{
"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": "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"
}
]
| 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"
} | 3 | 2016-05-16T15:06:04Z | 2016-05-16T16:48:26Z | 2016-05-16T16:48:11Z | NONE | null | The only mention of the RangeIndex is on http://pandas.pydata.org/pandas-docs/stable/whatsnew.html#range-index as of Pandas 0.18.1, should this also be mentioned within the API.
| {
"+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/13195/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13195/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13196 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13196/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13196/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13196/events | https://github.com/pandas-dev/pandas/issues/13196 | 155,130,757 | MDU6SXNzdWUxNTUxMzA3NTc= | 13,196 | Series accessed with timezoned timestamps inexplicably returns NaN | {
"avatar_url": "https://avatars.githubusercontent.com/u/835184?v=4",
"events_url": "https://api.github.com/users/jeremywhelchel/events{/privacy}",
"followers_url": "https://api.github.com/users/jeremywhelchel/followers",
"following_url": "https://api.github.com/users/jeremywhelchel/following{/other_user}",
"gists_url": "https://api.github.com/users/jeremywhelchel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jeremywhelchel",
"id": 835184,
"login": "jeremywhelchel",
"node_id": "MDQ6VXNlcjgzNTE4NA==",
"organizations_url": "https://api.github.com/users/jeremywhelchel/orgs",
"received_events_url": "https://api.github.com/users/jeremywhelchel/received_events",
"repos_url": "https://api.github.com/users/jeremywhelchel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jeremywhelchel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jeremywhelchel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jeremywhelchel"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "5319e7",
"default": false,
"description": "Timezone data dtype",
"id": 60458168,
"name": "Timezones",
"node_id": "MDU6TGFiZWw2MDQ1ODE2OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timezones"
}
]
| closed | false | null | []
| {
"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"
} | 3 | 2016-05-16T21:52:04Z | 2016-05-19T17:19:20Z | 2016-05-17T13:38:21Z | NONE | null | Somewhere between version 0.16.1 and 0.18.1 the behavior of Series[] called with an array of timestamps with timezones stopped working.
Is this expected behavior?
Here's our failing test case.
#### Code Sample, a copy-pastable example if possible
```
import pytz
import pandas as pp
MTV_TZ = pytz.timezone('America/Los_Angeles')
def D(*args):
return pp.Timestamp(pp.datetime(*args), tz=MTV_TZ)
series = pp.Series(
index=[
D(2011, 1, 1, 8),
D(2011, 1, 1, 9),
D(2011, 1, 1, 10),
D(2011, 2, 2, 1),
D(2011, 2, 2, 2),
D(2011, 2, 2, 3),
], data=[1, 2, 3, 4, 5, 6])
index = pp.Series(
index=[D(2011, 1, 1), D(2011, 2, 2)],
data=[D(2011, 1, 1, 9), D(2011, 2, 2, 3)])
expected = pp.Series(
index=[D(2011, 1, 1, 9), D(2011, 2, 2, 3)],
data=[2, 6])
# These are OK.
print (series[index] == expected).all()
print (series[(t for t in index)] == expected).all()
print series[index[0]]#, 2)
print series[index.values[0]]#, 2)
print series[index.values[1]]#, 6
# These fail. In 0.16.1 they passed
print (series[index.values] == expected).all()
print (series[(t for t in index.values)] == expected).all()
# Examining the output
print 'SERIES'
print series[index.values]
```
#### Expected Output
```
True
True
2
2
6
True
True
SERIES
2011-01-01 09:00:00-08:00 2
2011-02-02 03:00:00-08:00 6
dtype: int64
```
#### Actual Output
```
True
True
2
2
6
False
False
SERIES
2011-01-01 17:00:00 NaN
2011-02-02 11:00:00 NaN
dtype: float64
```
#### output of `pd.show_versions()`
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-83-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.16.1
nose: None
Cython: None
numpy: 1.9.2
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 2.0.0
sphinx: None
patsy: 0.2.1
dateutil: 2.4.2
pytz: 2016.4
bottleneck: None
tables: 3.1.1
numexpr: 2.5
matplotlib: 1.3.0
openpyxl: None
xlrd: 0.9.3
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.3.2
html5lib: 1.0b8
httplib2: 0.9.2
apiclient: 1.3.1
sqlalchemy: None
pymysql: None
psycopg2: 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/13196/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13196/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13197 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13197/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13197/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13197/events | https://github.com/pandas-dev/pandas/pull/13197 | 155,174,633 | MDExOlB1bGxSZXF1ZXN0NzAyOTgzMzU= | 13,197 | CLN: no return on init | {
"avatar_url": "https://avatars.githubusercontent.com/u/5635139?v=4",
"events_url": "https://api.github.com/users/max-sixty/events{/privacy}",
"followers_url": "https://api.github.com/users/max-sixty/followers",
"following_url": "https://api.github.com/users/max-sixty/following{/other_user}",
"gists_url": "https://api.github.com/users/max-sixty/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/max-sixty",
"id": 5635139,
"login": "max-sixty",
"node_id": "MDQ6VXNlcjU2MzUxMzk=",
"organizations_url": "https://api.github.com/users/max-sixty/orgs",
"received_events_url": "https://api.github.com/users/max-sixty/received_events",
"repos_url": "https://api.github.com/users/max-sixty/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/max-sixty/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/max-sixty/subscriptions",
"type": "User",
"url": "https://api.github.com/users/max-sixty"
} | [
{
"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": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-17T04:28:29Z | 2016-05-17T14:47:57Z | 2016-05-17T13:22:39Z | CONTRIBUTOR | null | `__init__` shouldn't return anything
| {
"+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/13197/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13197/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13197.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13197",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13197.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13197"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13198 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13198/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13198/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13198/events | https://github.com/pandas-dev/pandas/pull/13198 | 155,218,204 | MDExOlB1bGxSZXF1ZXN0NzAzMjc2OTY= | 13,198 | BUG: align with broadcast_axis, #13194 | {
"avatar_url": "https://avatars.githubusercontent.com/u/10297394?v=4",
"events_url": "https://api.github.com/users/pfrcks/events{/privacy}",
"followers_url": "https://api.github.com/users/pfrcks/followers",
"following_url": "https://api.github.com/users/pfrcks/following{/other_user}",
"gists_url": "https://api.github.com/users/pfrcks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pfrcks",
"id": 10297394,
"login": "pfrcks",
"node_id": "MDQ6VXNlcjEwMjk3Mzk0",
"organizations_url": "https://api.github.com/users/pfrcks/orgs",
"received_events_url": "https://api.github.com/users/pfrcks/received_events",
"repos_url": "https://api.github.com/users/pfrcks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pfrcks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pfrcks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pfrcks"
} | [
{
"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"
}
]
| closed | false | null | []
| null | 23 | 2016-05-17T09:46:32Z | 2016-11-22T11:46:35Z | 2016-11-22T11:46:35Z | CONTRIBUTOR | null | Closes #13194
- Implemented the _easy fix_
- Future work : To implement broadcast axis remaining functionality.
- All tests in test_generic.py passed.
| {
"+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/13198/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13198/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13198.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13198",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13198.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13198"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13199 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13199/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13199/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13199/events | https://github.com/pandas-dev/pandas/issues/13199 | 155,223,352 | MDU6SXNzdWUxNTUyMjMzNTI= | 13,199 | Apache Feather Pandas Inclusion? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1430861?v=4",
"events_url": "https://api.github.com/users/apiszcz/events{/privacy}",
"followers_url": "https://api.github.com/users/apiszcz/followers",
"following_url": "https://api.github.com/users/apiszcz/following{/other_user}",
"gists_url": "https://api.github.com/users/apiszcz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/apiszcz",
"id": 1430861,
"login": "apiszcz",
"node_id": "MDQ6VXNlcjE0MzA4NjE=",
"organizations_url": "https://api.github.com/users/apiszcz/orgs",
"received_events_url": "https://api.github.com/users/apiszcz/received_events",
"repos_url": "https://api.github.com/users/apiszcz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/apiszcz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/apiszcz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/apiszcz"
} | [
{
"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": "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 | 1 | 2016-05-17T10:11:36Z | 2016-05-17T10:29:24Z | 2016-05-17T10:28:17Z | NONE | null | Is there any possibility to consider including feather as built in PANDAS I/O module?
https://blog.rstudio.org/2016/03/29/feather/
| {
"+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/13199/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13199/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13200 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13200/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13200/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13200/events | https://github.com/pandas-dev/pandas/pull/13200 | 155,249,792 | MDExOlB1bGxSZXF1ZXN0NzAzNDk4ODA= | 13,200 | BUG: Period and Series/Index comparison raises TypeError | {
"avatar_url": "https://avatars.githubusercontent.com/u/1696302?v=4",
"events_url": "https://api.github.com/users/sinhrks/events{/privacy}",
"followers_url": "https://api.github.com/users/sinhrks/followers",
"following_url": "https://api.github.com/users/sinhrks/following{/other_user}",
"gists_url": "https://api.github.com/users/sinhrks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sinhrks",
"id": 1696302,
"login": "sinhrks",
"node_id": "MDQ6VXNlcjE2OTYzMDI=",
"organizations_url": "https://api.github.com/users/sinhrks/orgs",
"received_events_url": "https://api.github.com/users/sinhrks/received_events",
"repos_url": "https://api.github.com/users/sinhrks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sinhrks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sinhrks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sinhrks"
} | [
{
"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": "eb6420",
"default": false,
"description": "Period data type",
"id": 60635328,
"name": "Period",
"node_id": "MDU6TGFiZWw2MDYzNTMyOA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Period"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-17T12:43:12Z | 2016-05-17T17:21:02Z | 2016-05-17T17:21:02Z | MEMBER | null | - [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
`Period` and `Series/Index` comparison raises `TypeError` if `Period` is on left hand side.
```
# OK
pd.Series([pd.Period('2011-01-01', freq='D')]) > pd.Period('2011-01-01', freq='D')
#0 False
# dtype: bool
# NG
pd.Period('2011-01-01', freq='D') > pd.Series([pd.Period('2011-01-01', freq='D')])
# TypeError: Cannot compare type 'Period' with type 'Series'
```
| {
"+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/13200/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13200/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13200.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13200",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13200.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13200"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13201 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13201/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13201/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13201/events | https://github.com/pandas-dev/pandas/pull/13201 | 155,250,913 | MDExOlB1bGxSZXF1ZXN0NzAzNTA2NzY= | 13,201 | BUG: Sparse creation with object dtype may raise TypeError | {
"avatar_url": "https://avatars.githubusercontent.com/u/1696302?v=4",
"events_url": "https://api.github.com/users/sinhrks/events{/privacy}",
"followers_url": "https://api.github.com/users/sinhrks/followers",
"following_url": "https://api.github.com/users/sinhrks/following{/other_user}",
"gists_url": "https://api.github.com/users/sinhrks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sinhrks",
"id": 1696302,
"login": "sinhrks",
"node_id": "MDQ6VXNlcjE2OTYzMDI=",
"organizations_url": "https://api.github.com/users/sinhrks/orgs",
"received_events_url": "https://api.github.com/users/sinhrks/received_events",
"repos_url": "https://api.github.com/users/sinhrks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sinhrks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sinhrks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sinhrks"
} | [
{
"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": "Sparse Data Type",
"id": 49182326,
"name": "Sparse",
"node_id": "MDU6TGFiZWw0OTE4MjMyNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Sparse"
}
]
| closed | false | null | []
| {
"closed_at": "2016-10-03T08:52:13Z",
"closed_issues": 733,
"created_at": "2016-03-11T21:24:45Z",
"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": "2016-09-30T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/40",
"id": 1639795,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40/labels",
"node_id": "MDk6TWlsZXN0b25lMTYzOTc5NQ==",
"number": 40,
"open_issues": 0,
"state": "closed",
"title": "0.19.0",
"updated_at": "2017-11-06T02:01:14Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/40"
} | 2 | 2016-05-17T12:48:40Z | 2016-05-18T13:23:14Z | 2016-05-18T13:22:36Z | MEMBER | null | closes #11633
closes #11856
Added basic tests for `groupby` and `pivot_table`.
| {
"+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/13201/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13201/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/13201.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/13201",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/13201.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/13201"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/13202 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13202/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13202/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13202/events | https://github.com/pandas-dev/pandas/issues/13202 | 155,263,189 | MDU6SXNzdWUxNTUyNjMxODk= | 13,202 | DOC: pandas cheat sheet | {
"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"
} | [
{
"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": "2016-12-24T22:50:46Z",
"closed_issues": 107,
"created_at": "2016-11-12T15:44:46Z",
"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": "after 0.19.1",
"due_on": "2016-12-24T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/45",
"id": 2131068,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/45/labels",
"node_id": "MDk6TWlsZXN0b25lMjEzMTA2OA==",
"number": 45,
"open_issues": 0,
"state": "closed",
"title": "0.19.2",
"updated_at": "2017-01-29T09:53:52Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/45"
} | 25 | 2016-05-17T13:44:35Z | 2016-12-21T17:23:05Z | 2016-12-21T17:23:05Z | CONTRIBUTOR | null | https://www.rstudio.com/wp-content/uploads/2015/02/data-wrangling-cheatsheet.pdf
I think we could pretty much rip this off exactly as is and just substitute pandas functions directly.
Further could update `comparison with R` a bit.
anyone up for this?
| {
"+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/13202/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13202/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/13203 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/13203/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/13203/comments | https://api.github.com/repos/pandas-dev/pandas/issues/13203/events | https://github.com/pandas-dev/pandas/issues/13203 | 155,272,686 | MDU6SXNzdWUxNTUyNzI2ODY= | 13,203 | enhancement: add optional row/col paramater to to_latex formatter | {
"avatar_url": "https://avatars.githubusercontent.com/u/117456?v=4",
"events_url": "https://api.github.com/users/nbecker/events{/privacy}",
"followers_url": "https://api.github.com/users/nbecker/followers",
"following_url": "https://api.github.com/users/nbecker/following{/other_user}",
"gists_url": "https://api.github.com/users/nbecker/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nbecker",
"id": 117456,
"login": "nbecker",
"node_id": "MDQ6VXNlcjExNzQ1Ng==",
"organizations_url": "https://api.github.com/users/nbecker/orgs",
"received_events_url": "https://api.github.com/users/nbecker/received_events",
"repos_url": "https://api.github.com/users/nbecker/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nbecker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nbecker/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nbecker"
} | [
{
"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": "006b75",
"default": false,
"description": "to_latex",
"id": 251382258,
"name": "IO LaTeX",
"node_id": "MDU6TGFiZWwyNTEzODIyNTg=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20LaTeX"
}
]
| 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"
} | 6 | 2016-05-17T14:23:30Z | 2021-05-24T13:44:06Z | 2021-05-24T13:44:06Z | NONE | null | I need to have to_latex formatter function know the row/col of the item being formatted, so it can modify the formatting of certain items, e.g., set some items in color of bold based on the values in the table.
To do this in a backward compatible way, I propose adding a keyword to to_latex - which would then cause the formatter function to be called as
formatter (element value, row#, col#)
| {
"+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/13203/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/13203/timeline | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.