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/7401 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7401/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7401/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7401/events | https://github.com/pandas-dev/pandas/issues/7401 | 35,279,505 | MDU6SXNzdWUzNTI3OTUwNQ== | 7,401 | unstack with DatetimeIndex with NaN gives "ValueError: cannot convert float NaN to integer" | {
"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": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"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": "2015-03-23T10:50:37Z",
"closed_issues": 400,
"created_at": "2014-02-14T03:31:22Z",
"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.15 of course!",
"due_on": "2015-03-22T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/25",
"id": 569113,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25/labels",
"node_id": "MDk6TWlsZXN0b25lNTY5MTEz",
"number": 25,
"open_issues": 0,
"state": "closed",
"title": "0.16.0",
"updated_at": "2017-08-24T09:17:49Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25"
} | 9 | 2014-06-09T12:06:31Z | 2016-10-12T23:04:56Z | 2015-01-26T01:29:07Z | MEMBER | null | With following code:
```
df = pd.DataFrame({'A': list('aaaaabbbbb'),
'B':pd.date_range('2012-01-01', periods=5).tolist()*2,
'C':np.zeros(10)})
df.iloc[3,1] = np.NaN
df = df.set_index(['A', 'B'])
```
unstacking gives:
```
In [6]: df.unstack()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-9a91d46cdd8d> in <module>()
----> 1 df.unstack()
...
c:\users\vdbosscj\scipy\pandas-joris\pandas\tseries\index.pyc in _simple_new(cls
, values, name, freq, tz)
461 def _simple_new(cls, values, name, freq=None, tz=None):
462 if values.dtype != _NS_DTYPE:
--> 463 values = com._ensure_int64(values).view(_NS_DTYPE)
464
465 result = values.view(cls)
c:\users\vdbosscj\scipy\pandas-joris\pandas\algos.pyd in pandas.algos.ensure_int
64 (pandas\algos.c:47444)()
c:\users\vdbosscj\scipy\pandas-joris\pandas\algos.pyd in pandas.algos.ensure_int
64 (pandas\algos.c:47349)()
ValueError: cannot convert float NaN to integer
```
I don't know if this should work (unstacking with NaN in the index), but at least this is not a very clear error message to know what could be going wrong.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7401/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7401/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7402 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7402/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7402/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7402/events | https://github.com/pandas-dev/pandas/pull/7402 | 35,281,981 | MDExOlB1bGxSZXF1ZXN0MTY4ODM0ODg= | 7,402 | BUG: ix should return a Series for duplicate indices (GH7150) | {
"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"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-09T12:54:30Z | 2014-06-15T23:54:11Z | 2014-06-09T13:16:42Z | CONTRIBUTOR | null | closes #7150
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7402/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7402/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7402.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7402",
"merged_at": "2014-06-09T13:16:42Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7402.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7402"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7403 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7403/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7403/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7403/events | https://github.com/pandas-dev/pandas/issues/7403 | 35,283,431 | MDU6SXNzdWUzNTI4MzQzMQ== | 7,403 | BUG: incorrect unstacking with NaNs in the index | {
"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": "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": "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": "2015-03-23T10:50:37Z",
"closed_issues": 400,
"created_at": "2014-02-14T03:31:22Z",
"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.15 of course!",
"due_on": "2015-03-22T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/25",
"id": 569113,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25/labels",
"node_id": "MDk6TWlsZXN0b25lNTY5MTEz",
"number": 25,
"open_issues": 0,
"state": "closed",
"title": "0.16.0",
"updated_at": "2017-08-24T09:17:49Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25"
} | 2 | 2014-06-09T13:17:35Z | 2016-10-12T23:04:56Z | 2015-01-26T01:29:07Z | MEMBER | null | Related to #7401, but another issue I think. Some more strange behaviour with NaNs in the index when unstacking (but now not specifically to datetime).
First case:
```
In [9]: df = pd.DataFrame({'A': list('aaaabbbb'),
...: 'B':range(8),
...: 'C':range(8)})
In [10]: df.set_index(['A', 'B']).unstack(0)
Out[10]:
C
A a b
B
0 0 NaN
1 1 NaN
2 2 NaN
3 3 NaN
4 NaN 4
5 NaN 5
6 NaN 6
7 NaN 7
In [11]: df.iloc[3,1] = np.NaN
In [12]: df.set_index(['A', 'B']).unstack(0)
Out[12]:
C
A a b
B
0 3 NaN
1 0 NaN
2 1 NaN
NaN NaN NaN
4 NaN 2
5 NaN 4
6 NaN 5
7 6 7
```
The values in the first column are totally mixed up.
Second case (with repeating values in the second level):
```
In [13]: df = pd.DataFrame({'A': list('aaaabbbb'),
....: 'B':range(4)*2,
....: 'C':range(8)})
In [14]: df
Out[14]:
A B C
0 a 0 0
1 a 1 1
2 a 2 2
3 a 3 3
4 b 0 4
5 b 1 5
6 b 2 6
7 b 3 7
In [15]: df.set_index(['A', 'B']).unstack(0)
Out[15]:
C
A a b
B
0 0 4
1 1 5
2 2 6
3 3 7
In [16]: df.iloc[2,1] = np.NaN
In [17]: df.set_index(['A', 'B']).unstack(0)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-17-2f4735e48b98> in <module>()
----> 1 df.set_index(['A', 'B']).unstack(0)
...
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\reshape.pyc in _make_selectors(
self)
139
140 if mask.sum() < len(self.index):
--> 141 raise ValueError('Index contains duplicate entries, '
142 'cannot reshape')
143
ValueError: Index contains duplicate entries, cannot reshape
```
and another error message with the NaN on the last place (of the sublevel):
```
In [20]: df = pd.DataFrame({'A': list('aaaabbbb'),
....: 'B':range(4)*2,
....: 'C':range(8)})
In [21]: df.iloc[3,1] = np.NaN
In [22]: df.set_index(['A', 'B']).unstack(0)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
...
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\reshape.pyc in get_result(self)
173 values_indexer = com._ensure_int64(l[~mask])
174 for i, j in enumerate(values_indexer):
--> 175 values[j] = orig_values[i]
176 else:
177 index = index.take(self.unique_groups)
IndexError: index 4 is out of bounds for axis 0 with size 4
```
I know NaNs in the index is not really recommended, but just exploring this (as I was caught by such an issue, you don't always think of looking if you have NaNs if you get such 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/7403/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7403/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7404 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7404/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7404/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7404/events | https://github.com/pandas-dev/pandas/pull/7404 | 35,283,558 | MDExOlB1bGxSZXF1ZXN0MTY4ODQzNjg= | 7,404 | BUG: mi indexing bugs (GH7399,GH7400) | {
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-09T13:20:02Z | 2014-06-15T23:53:41Z | 2014-06-09T15:47:18Z | CONTRIBUTOR | null | closes #7399
closes #7400
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7404/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7404/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7404.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7404",
"merged_at": "2014-06-09T15:47:17Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7404.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7404"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7405 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7405/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7405/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7405/events | https://github.com/pandas-dev/pandas/issues/7405 | 35,287,154 | MDU6SXNzdWUzNTI4NzE1NA== | 7,405 | BUG: unstacking with partial selection and mixed dtype gives "ValueError: shape of passed values ..." | {
"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": "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": "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": "2015-03-23T10:50:37Z",
"closed_issues": 400,
"created_at": "2014-02-14T03:31:22Z",
"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.15 of course!",
"due_on": "2015-03-22T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/25",
"id": 569113,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25/labels",
"node_id": "MDk6TWlsZXN0b25lNTY5MTEz",
"number": 25,
"open_issues": 0,
"state": "closed",
"title": "0.16.0",
"updated_at": "2017-08-24T09:17:49Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25"
} | 1 | 2014-06-09T14:07:12Z | 2016-10-12T23:04:56Z | 2015-01-26T01:29:07Z | MEMBER | null | And yet another unstacking bug (but now not related to NaNs as in #7403). Getting a `ValueError: Shape of passed values is (2, 3), indices imply (2, 5)` (where 3 is the correct one, 5 is the original number of rows) in some specific conditions with mixed dtype and selection of the rows:
```
In [23]: df = pd.DataFrame({'A': ['a']*5,
....: 'B':pd.date_range('2012-01-01', periods=5),
....: 'C':np.zeros(5),
....: 'D':np.zeros(5)})
In [25]: df = df.set_index(['A', 'B'])
In [26]: df
Out[26]:
C D
A B
a 2012-01-01 0 0
2012-01-02 0 0
2012-01-03 0 0
2012-01-04 0 0
2012-01-05 0 0
```
Unstacking this or a selection of it, works as expected
```
In [27]: df.unstack(0)
Out[27]:
C D
A a a
B
2012-01-01 0 0
2012-01-02 0 0
2012-01-03 0 0
2012-01-04 0 0
2012-01-05 0 0
In [28]: df.iloc[:3].unstack(0)
Out[28]:
C D
A a a
B
2012-01-01 0 0
2012-01-02 0 0
2012-01-03 0 0
```
But when the dataframe has mixed dtypes:
```
In [29]: df['D'] = df['D'].astype('int64')
In [31]: df.dtypes
Out[31]:
C float64
D int64
dtype: object
```
unstacking still does work, but not anymore on the selection:
```
In [32]: df.unstack(0)
Out[32]:
C D
A a a
B
2012-01-01 0 0
2012-01-02 0 0
2012-01-03 0 0
2012-01-04 0 0
2012-01-05 0 0
In [33]: df.iloc[:3].unstack(0)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
...
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\internals.pyc in _verify_integr
ity(self)
2090 for block in self.blocks:
2091 if not block.is_sparse and block.shape[1:] != mgr_shape[1:]:
-> 2092 construction_error(tot_items, block.shape[1:], self.axes
)
2093 if len(self.items) != tot_items:
2094 raise AssertionError('Number of manager items must equal uni
on of '
c:\users\vdbosscj\scipy\pandas-joris\pandas\core\internals.pyc in construction_e
rror(tot_items, block_shape, axes, e)
3162 raise e
3163 raise ValueError("Shape of passed values is {0}, indices imply {1}".
format(
-> 3164 passed,implied))
3165
3166
ValueError: Shape of passed values is (2, 3), indices imply (2, 5)
```
If the index is resetted and setted again (so the levels and labels are recalculated based on the selection), it does work again:
```
In [34]: df.iloc[:3].reset_index().set_index(['A', 'B']).unstack(0)
Out[34]:
C D
A a a
B
2012-01-01 0 0
2012-01-02 0 0
2012-01-03 0 0
```
I am not sure about the exact circumstances this happens, because I can't reproduce it with a small example with different values in the `A` index level (now only `a`), but in the large real dataframe where I experienced it, there were multiple levels.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7405/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7405/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7406 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7406/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7406/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7406/events | https://github.com/pandas-dev/pandas/issues/7406 | 35,288,458 | MDU6SXNzdWUzNTI4ODQ1OA== | 7,406 | repr of MultiIndexed frame with NaT as the first element of level 0 of the index raises during repr | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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": "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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-09T14:23:31Z | 2014-06-09T22:34:38Z | 2014-06-09T22:34:38Z | MEMBER | null | world's longest PR title, for a very strange bug
```
In [145]: idx = pd.to_datetime([pd.NaT] + pd.date_range('20130101', periods=2).tolist())
In [146]: idx
Out[146]:
<class 'pandas.tseries.index.DatetimeIndex'>
[NaT, ..., 2013-01-02]
Length: 3, Freq: None, Timezone: None
In [149]: df = DataFrame({'X': range(len(idx))}, index=[idx, tm.choice(list('ab'), size=len(idx))])
In [150]: df
Out[150]: <repr(<pandas.core.frame.DataFrame at 0x7ff147824950>) failed: ValueError: boolean index array has too many values>
```
but strangely enough if I construct it with slightly different dates it works fine:
```
In [184]: idx = pd.to_datetime([pd.NaT, pd.Timestamp('2013-01-01'), pd.Timestamp('2013-01-02')])
In [185]: df = DataFrame({'X': range(len(idx))}, index=[idx, tm.choice(list('ab'), size=len(idx))])
In [186]: df
Out[186]: <repr(<pandas.core.frame.DataFrame at 0x7ff14792d1d0>) failed: ValueError: boolean index array has too many values>
In [187]: idx = pd.to_datetime([pd.NaT, pd.Timestamp('2013-01-03'), pd.Timestamp('2013-01-02')])
In [188]: df = DataFrame({'X': range(len(idx))}, index=[idx, tm.choice(list('ab'), size=len(idx))])
In [189]: df
Out[189]:
X
NaN a 0
2013-01-03 b 1
2013-01-02 a 2
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7406/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7406/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7407 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7407/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7407/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7407/events | https://github.com/pandas-dev/pandas/issues/7407 | 35,292,004 | MDU6SXNzdWUzNTI5MjAwNA== | 7,407 | BUG: Series.get w boolean accessor | {
"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"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-09T15:03:32Z | 2014-07-01T16:02:12Z | 2014-07-01T16:02:12Z | CONTRIBUTOR | null | from ML: https://groups.google.com/forum/#!topic/pydata/CDnF9cNR2ho
```
In [10]: df=pd.DataFrame({'i':[0]*10, 'b':[False]*10})
In [11]: vc_i=df.i.value_counts()
In [12]: vc_i.get(99,default='Missing')
Out[12]: 'Missing'
In [13]: vc_b=df.b.value_counts()
In [14]: vc_b
Out[14]:
False 10
dtype: int64
In [15]: vc_b.get(False,default='Missing')
Out[15]: 10
In [16]: vc_b.get(True,default='Missing')
IndexError: index out of bounds
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7407/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7407/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7408 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7408/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7408/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7408/events | https://github.com/pandas-dev/pandas/issues/7408 | 35,292,271 | MDU6SXNzdWUzNTI5MjI3MQ== | 7,408 | incorrect slicing for negative indexers in datetimeindex | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 1 | 2014-06-09T15:06:18Z | 2014-06-09T22:35:29Z | 2014-06-09T22:35:29Z | MEMBER | null | got a fix coming in a minute or so just wanted to track the issue
related #7406
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7408/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7408/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7409 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7409/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7409/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7409/events | https://github.com/pandas-dev/pandas/issues/7409 | 35,292,654 | MDU6SXNzdWUzNTI5MjY1NA== | 7,409 | multiindex repr of datetime nat is incorrect | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 1 | 2014-06-09T15:10:34Z | 2014-06-09T22:35:41Z | 2014-06-09T22:35:41Z | MEMBER | null | related to #7406, #7401
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7409/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7409/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7410 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7410/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7410/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7410/events | https://github.com/pandas-dev/pandas/pull/7410 | 35,292,765 | MDExOlB1bGxSZXF1ZXN0MTY4ODk4MjI= | 7,410 | BUG: fix repring of nat multiindex and fix neg indexing in datetimeindex | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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"
}
]
| closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-09T15:11:54Z | 2014-06-13T05:13:24Z | 2014-06-09T22:34:38Z | MEMBER | null | closes #7406, #7408, #7409
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7410/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7410/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7410.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7410",
"merged_at": "2014-06-09T22:34:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7410.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7410"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7411 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7411/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7411/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7411/events | https://github.com/pandas-dev/pandas/issues/7411 | 35,299,910 | MDU6SXNzdWUzNTI5OTkxMA== | 7,411 | BUG: Series/Dataframe has bad repr for Right-To-Left (RTL) data | {
"avatar_url": "https://avatars.githubusercontent.com/u/7840018?v=4",
"events_url": "https://api.github.com/users/David-Alkalai/events{/privacy}",
"followers_url": "https://api.github.com/users/David-Alkalai/followers",
"following_url": "https://api.github.com/users/David-Alkalai/following{/other_user}",
"gists_url": "https://api.github.com/users/David-Alkalai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/David-Alkalai",
"id": 7840018,
"login": "David-Alkalai",
"node_id": "MDQ6VXNlcjc4NDAwMTg=",
"organizations_url": "https://api.github.com/users/David-Alkalai/orgs",
"received_events_url": "https://api.github.com/users/David-Alkalai/received_events",
"repos_url": "https://api.github.com/users/David-Alkalai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/David-Alkalai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/David-Alkalai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/David-Alkalai"
} | [
{
"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": "444444",
"default": false,
"description": "Unicode strings",
"id": 36380025,
"name": "Unicode",
"node_id": "MDU6TGFiZWwzNjM4MDAyNQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Unicode"
}
]
| 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 | 2014-06-09T16:29:29Z | 2021-03-09T12:57:57Z | null | NONE | null | This code
``` python
df=pd.DataFrame([['שלום','עליכם', 'מלאכי השלום', 'ברוכים הבאים']])
df.columns=['A','B','C','D']
df
```
does this:

See that the data row is close to the right?
Half a workaround is to prepend the unicode LTR character to each row:
``` python
print u"\n\u200e".join(unicode(df).split("\n"))
```

but if you look you can see the data appears in reverse order, since:
``` python
In [49]: print df.iloc[0,0]
שלום
```
The same occurs even if the text is decoded into unicode strings.
I tried to understand the repr code in pandas but it's too complex
for me to follow, full of special cases. I hope the developers can fix this.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7411/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7411/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7412 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7412/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7412/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7412/events | https://github.com/pandas-dev/pandas/issues/7412 | 35,302,134 | MDU6SXNzdWUzNTMwMjEzNA== | 7,412 | Option to keep left/right join columns (or add _merge column) to merge() and concat() | {
"avatar_url": "https://avatars.githubusercontent.com/u/161965?v=4",
"events_url": "https://api.github.com/users/makmanalp/events{/privacy}",
"followers_url": "https://api.github.com/users/makmanalp/followers",
"following_url": "https://api.github.com/users/makmanalp/following{/other_user}",
"gists_url": "https://api.github.com/users/makmanalp/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makmanalp",
"id": 161965,
"login": "makmanalp",
"node_id": "MDQ6VXNlcjE2MTk2NQ==",
"organizations_url": "https://api.github.com/users/makmanalp/orgs",
"received_events_url": "https://api.github.com/users/makmanalp/received_events",
"repos_url": "https://api.github.com/users/makmanalp/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makmanalp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makmanalp/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makmanalp"
} | [
{
"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"
}
]
| closed | false | null | []
| {
"closed_at": "2015-06-13T17:49:05Z",
"closed_issues": 119,
"created_at": "2015-06-02T19:23:30Z",
"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": "2015-06-12T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/35",
"id": 1145853,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/35/labels",
"node_id": "MDk6TWlsZXN0b25lMTE0NTg1Mw==",
"number": 35,
"open_issues": 0,
"state": "closed",
"title": "0.16.2",
"updated_at": "2016-07-22T08:55:52Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/35"
} | 9 | 2014-06-09T16:54:12Z | 2016-03-25T01:13:39Z | 2014-07-23T03:18:11Z | CONTRIBUTOR | null | Hello!
I just heard from a colleague that they're looking for the analogue of STATA's merge command (http://www.stata.com/help.cgi?merge) which generates a `_merge` column that includes a code which specifies in an outer join whether the row existed in the right table, the left table or both. I know you can hack your way around this by doing set operations on the join columns / indices or creating new columns, but there could be an argument for having this be included functionality if it could be done simultaneously during the merge or just for sheer convenience.
The use case specified was that after they merged, they were checking over the data to find inconsistencies and rows that should have been merged but somehow didn't.
Let me know if there would be any interest in this, and I could maybe have a first shot at implementing it.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7412/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7412/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7413 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7413/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7413/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7413/events | https://github.com/pandas-dev/pandas/issues/7413 | 35,346,273 | MDU6SXNzdWUzNTM0NjI3Mw== | 7,413 | DOC: clarify the behavior of the .as_matrix method | {
"avatar_url": "https://avatars.githubusercontent.com/u/4166648?v=4",
"events_url": "https://api.github.com/users/clham/events{/privacy}",
"followers_url": "https://api.github.com/users/clham/followers",
"following_url": "https://api.github.com/users/clham/following{/other_user}",
"gists_url": "https://api.github.com/users/clham/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/clham",
"id": 4166648,
"login": "clham",
"node_id": "MDQ6VXNlcjQxNjY2NDg=",
"organizations_url": "https://api.github.com/users/clham/orgs",
"received_events_url": "https://api.github.com/users/clham/received_events",
"repos_url": "https://api.github.com/users/clham/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/clham/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/clham/subscriptions",
"type": "User",
"url": "https://api.github.com/users/clham"
} | [
{
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 15 | 2014-06-10T03:06:27Z | 2016-10-12T23:04:56Z | 2014-06-14T08:36:47Z | CONTRIBUTOR | null | When using `df.as_matrix()` method, rows and columns do not render as 1xN or Nx1 matricies, rather as 1xN arrays.
```
In [4]: df.ix['foo']=[5,3]
In [5]: df.ix['bar']=[2,6]
In [6]: df
Out[6]:
A B
foo 5 3
bar 2 6
[2 rows x 2 columns]
In [7]: df['A'].as_matrix()
Out[7]: array([ 5., 2.])
In [8]: df.ix['foo'].as_matrix()
Out[8]: array([ 5., 3.])
```
Expected :
```
In [9]: np.matrix('5; 2')
Out[9]:
matrix([[5],
[2]])
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7413/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7413/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7414 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7414/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7414/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7414/events | https://github.com/pandas-dev/pandas/pull/7414 | 35,370,894 | MDExOlB1bGxSZXF1ZXN0MTY5MzM0ODA= | 7,414 | TST7337: Fix more tests in windows | {
"avatar_url": "https://avatars.githubusercontent.com/u/6034908?v=4",
"events_url": "https://api.github.com/users/dbew/events{/privacy}",
"followers_url": "https://api.github.com/users/dbew/followers",
"following_url": "https://api.github.com/users/dbew/following{/other_user}",
"gists_url": "https://api.github.com/users/dbew/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dbew",
"id": 6034908,
"login": "dbew",
"node_id": "MDQ6VXNlcjYwMzQ5MDg=",
"organizations_url": "https://api.github.com/users/dbew/orgs",
"received_events_url": "https://api.github.com/users/dbew/received_events",
"repos_url": "https://api.github.com/users/dbew/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dbew/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dbew/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dbew"
} | [
{
"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": "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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-10T10:58:11Z | 2014-06-12T20:12:48Z | 2014-06-10T12:45:03Z | CONTRIBUTOR | null | Hopefully final attempt at fixing the windows test issues from dateutil timezone work. Related discussion on previous pull request [here](https://github.com/pydata/pandas/pull/7362).
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7414/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7414/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7414.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7414",
"merged_at": "2014-06-10T12:45:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7414.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7414"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7415 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7415/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7415/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7415/events | https://github.com/pandas-dev/pandas/issues/7415 | 35,373,206 | MDU6SXNzdWUzNTM3MzIwNg== | 7,415 | BUG: nanops._ensure_numeric can't handle object dtypes containing complex objects | {
"avatar_url": "https://avatars.githubusercontent.com/u/2272878?v=4",
"events_url": "https://api.github.com/users/toddrjen/events{/privacy}",
"followers_url": "https://api.github.com/users/toddrjen/followers",
"following_url": "https://api.github.com/users/toddrjen/following{/other_user}",
"gists_url": "https://api.github.com/users/toddrjen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/toddrjen",
"id": 2272878,
"login": "toddrjen",
"node_id": "MDQ6VXNlcjIyNzI4Nzg=",
"organizations_url": "https://api.github.com/users/toddrjen/orgs",
"received_events_url": "https://api.github.com/users/toddrjen/received_events",
"repos_url": "https://api.github.com/users/toddrjen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/toddrjen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/toddrjen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/toddrjen"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "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": "2015-03-23T10:50:37Z",
"closed_issues": 400,
"created_at": "2014-02-14T03:31:22Z",
"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.15 of course!",
"due_on": "2015-03-22T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/25",
"id": 569113,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25/labels",
"node_id": "MDk6TWlsZXN0b25lNTY5MTEz",
"number": 25,
"open_issues": 0,
"state": "closed",
"title": "0.16.0",
"updated_at": "2017-08-24T09:17:49Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25"
} | 2 | 2014-06-10T11:36:08Z | 2014-06-22T15:29:59Z | 2014-06-22T15:29:36Z | CONTRIBUTOR | null | `nanops._ensure_numeric` is used to make sure ndarrays are a numeric dtype. However, it can't handle the case where the dtype is `object` and one or more of the axes is `complex`:
``` Python
>>> from pandas.core.nanops import nanmean
>>> import numpy as np
>>>
>>> value = np.vstack([np.array(np.nan).astype('O'), np.array(1+1j).astype('O')])
>>> nanmean(value, axis=0)
TypeError: can't convert complex to float
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7415/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7415/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7416 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7416/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7416/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7416/events | https://github.com/pandas-dev/pandas/pull/7416 | 35,390,057 | MDExOlB1bGxSZXF1ZXN0MTY5NDQ1MzI= | 7,416 | BUG/DTYPES: preserve bools in convert_objects | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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": "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": "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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 16 | 2014-06-10T14:54:38Z | 2014-06-13T05:13:26Z | 2014-06-10T21:52:01Z | MEMBER | null | closes #7126
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7416/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7416/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7416.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7416",
"merged_at": "2014-06-10T21:52:01Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7416.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7416"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7417 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7417/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7417/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7417/events | https://github.com/pandas-dev/pandas/pull/7417 | 35,395,216 | MDExOlB1bGxSZXF1ZXN0MTY5NDc1MzM= | 7,417 | DOC: update df.as_matrix and df.values. Closes gh7413 | {
"avatar_url": "https://avatars.githubusercontent.com/u/4166648?v=4",
"events_url": "https://api.github.com/users/clham/events{/privacy}",
"followers_url": "https://api.github.com/users/clham/followers",
"following_url": "https://api.github.com/users/clham/following{/other_user}",
"gists_url": "https://api.github.com/users/clham/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/clham",
"id": 4166648,
"login": "clham",
"node_id": "MDQ6VXNlcjQxNjY2NDg=",
"organizations_url": "https://api.github.com/users/clham/orgs",
"received_events_url": "https://api.github.com/users/clham/received_events",
"repos_url": "https://api.github.com/users/clham/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/clham/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/clham/subscriptions",
"type": "User",
"url": "https://api.github.com/users/clham"
} | []
| closed | false | null | []
| null | 3 | 2014-06-10T15:41:11Z | 2015-01-17T05:25:19Z | 2014-06-14T08:36:00Z | 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/7417/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7417/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7417.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7417",
"merged_at": "2014-06-14T08:36:00Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7417.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7417"
} |
|
https://api.github.com/repos/pandas-dev/pandas/issues/7418 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7418/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7418/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7418/events | https://github.com/pandas-dev/pandas/issues/7418 | 35,397,318 | MDU6SXNzdWUzNTM5NzMxOA== | 7,418 | BUG: hour/hours (and other plurals) should the same as singulars | {
"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": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
},
{
"color": "5319e7",
"default": false,
"description": "Functionality to remove in pandas",
"id": 87485152,
"name": "Deprecate",
"node_id": "MDU6TGFiZWw4NzQ4NTE1Mg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Deprecate"
}
]
| 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 | 2014-06-10T16:01:20Z | 2021-04-11T04:46:21Z | null | CONTRIBUTOR | null | discovered in #5292
This seems odd to me, documented anywhere?
```
In [2]: t = pd.Timestamp('2014-06-10 8am')
In [3]: t + pd.DateOffset(hour=9)
Out[3]: Timestamp('2014-06-10 09:00:00', tz=None)
In [4]: t + pd.DateOffset(hours=9)
Out[4]: Timestamp('2014-06-10 17:00:00', tz=None)
```
note that
```
t + pd.offsets.Hour(9) == t + timedelta(hours=9)
```
so this definitly seems suspect
(also problematic for `second/seconds` and `minute/minutes`)
this is only an issue in `DateOffset` constructions.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7418/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7418/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7419 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7419/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7419/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7419/events | https://github.com/pandas-dev/pandas/issues/7419 | 35,419,028 | MDU6SXNzdWUzNTQxOTAyOA== | 7,419 | openpyxl version issue for things that depend on pandas | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
]
| closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 6 | 2014-06-10T19:59:18Z | 2014-06-18T20:05:35Z | 2014-06-10T20:08:29Z | MEMBER | null | ML conversation: https://groups.google.com/forum/#!topic/pydata/gontRY254Xo
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7419/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7419/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7420 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7420/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7420/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7420/events | https://github.com/pandas-dev/pandas/issues/7420 | 35,420,873 | MDU6SXNzdWUzNTQyMDg3Mw== | 7,420 | TST: test failures on 3.4/windows for timezones | {
"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": "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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 17 | 2014-06-10T20:19:00Z | 2014-06-17T00:18:00Z | 2014-06-17T00:18:00Z | CONTRIBUTOR | null | ```
======================================================================
ERROR: test_string_index_alias_tz_aware (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-3.4\pandas\tseries\tests\test_timezones.py", line 561, in test_string_index_alias_tz_aware
self.assertAlmostEqual(result, ts[2])
File "C:\Python34-64\lib\unittest\case.py", line 818, in assertAlmostEqual
if first == second:
File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-3.4\pandas\core\generic.py", line 692, in __nonzero__
.format(self.__class__.__name__))
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
======================================================================
FAIL: test_series_frame_tz_convert (pandas.tseries.tests.test_timezones.TestTimeZones)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-3.4\pandas\tseries\tests\test_timezones.py", line 870, in test_series_frame_tz_convert
assert_frame_equal(result, expected.T)
File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-3.4\pandas\util\testing.py", line 578, in assert_frame_equal
assert col in right
AssertionError
----------------------------------------------------------------------
Ran 7330 tests in 533.475s
FAILED (SKIP=220, errors=1, failures=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/7420/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7420/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7421 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7421/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7421/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7421/events | https://github.com/pandas-dev/pandas/pull/7421 | 35,423,338 | MDExOlB1bGxSZXF1ZXN0MTY5NjQzNzc= | 7,421 | PERF: Series.transform speedups (GH6496) | {
"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": "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"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-10T20:44:05Z | 2014-06-12T17:45:45Z | 2014-06-11T14:06:07Z | CONTRIBUTOR | null | closes #6496
turns out indexing into an array rather than building it up as a list
using `concat` is faster (but have to be careful of type changes).
```
# this PR
In [11]: %timeit df['signal'].groupby(g).transform(np.mean)
10 loops, best of 3: 158 ms per loop
# master
In [11]: %timeit df['signal'].groupby(g).transform(np.mean)
1 loops, best of 3: 601 ms per loop
```
```
In [1]: np.random.seed(0)
In [2]: N = 120000
In [3]: N_TRANSITIONS = 1400
In [5]: transition_points = np.random.permutation(np.arange(N))[:N_TRANSITIONS]
In [6]: transition_points.sort()
In [7]: transitions = np.zeros((N,), dtype=np.bool)
In [8]: transitions[transition_points] = True
In [9]: g = transitions.cumsum()
In [10]: df = DataFrame({ 'signal' : np.random.rand(N)})
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7421/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7421/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7421.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7421",
"merged_at": "2014-06-11T14:06:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7421.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7421"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7422 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7422/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7422/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7422/events | https://github.com/pandas-dev/pandas/issues/7422 | 35,423,895 | MDU6SXNzdWUzNTQyMzg5NQ== | 7,422 | to_sql if_exists argument with SQL server and other schema | {
"avatar_url": "https://avatars.githubusercontent.com/u/5935200?v=4",
"events_url": "https://api.github.com/users/aergener/events{/privacy}",
"followers_url": "https://api.github.com/users/aergener/followers",
"following_url": "https://api.github.com/users/aergener/following{/other_user}",
"gists_url": "https://api.github.com/users/aergener/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aergener",
"id": 5935200,
"login": "aergener",
"node_id": "MDQ6VXNlcjU5MzUyMDA=",
"organizations_url": "https://api.github.com/users/aergener/orgs",
"received_events_url": "https://api.github.com/users/aergener/received_events",
"repos_url": "https://api.github.com/users/aergener/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aergener/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aergener/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aergener"
} | [
{
"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": "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": "2014-10-23T11:43:09Z",
"closed_issues": 530,
"created_at": "2014-07-06T18:44:54Z",
"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.14.1 of course!",
"due_on": "2014-10-19T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/28",
"id": 711567,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/28/labels",
"node_id": "MDk6TWlsZXN0b25lNzExNTY3",
"number": 28,
"open_issues": 0,
"state": "closed",
"title": "0.15.0",
"updated_at": "2017-11-24T10:50:44Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/28"
} | 20 | 2014-06-10T20:50:01Z | 2014-09-05T13:19:53Z | 2014-09-05T13:19:53Z | NONE | null | The `if_exists` argument of the `to_sql` function doesn't check all schema for the table while checking if it exists. Furthermore, it inserts to the default schema, causing somewhat contradictory behavior.
For example, while using SQL Server with my default schema set to `test`, `to_sql` inserts the table into `test.table_name`. However, trying this again, with `if_exists='replace'`, `to_sql` finds no table of the name `dbo.table_name`, and then tries to create `test.table_name`, causing an error.
Details :
http://stackoverflow.com/questions/24126883/pandas-dataframe-to-sql-function-if-exists-parameter-not-working
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7422/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7422/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7423 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7423/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7423/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7423/events | https://github.com/pandas-dev/pandas/issues/7423 | 35,438,278 | MDU6SXNzdWUzNTQzODI3OA== | 7,423 | value counts NaT doesn't count as NaN | {
"avatar_url": "https://avatars.githubusercontent.com/u/1931852?v=4",
"events_url": "https://api.github.com/users/hayd/events{/privacy}",
"followers_url": "https://api.github.com/users/hayd/followers",
"following_url": "https://api.github.com/users/hayd/following{/other_user}",
"gists_url": "https://api.github.com/users/hayd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hayd",
"id": 1931852,
"login": "hayd",
"node_id": "MDQ6VXNlcjE5MzE4NTI=",
"organizations_url": "https://api.github.com/users/hayd/orgs",
"received_events_url": "https://api.github.com/users/hayd/received_events",
"repos_url": "https://api.github.com/users/hayd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hayd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hayd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hayd"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "5319e7",
"default": false,
"description": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-10T23:58:08Z | 2014-06-17T12:01:37Z | 2014-06-17T12:01:37Z | CONTRIBUTOR | null | fix on the way.
```
dt = pd.to_datetime(['NaT', '2014-01-01'])
value_counts(dt) # should have one entry
```
(Actually there is an issue with timedeltas too (you can't create an timedelta 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/7423/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7423/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7424 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7424/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7424/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7424/events | https://github.com/pandas-dev/pandas/pull/7424 | 35,438,408 | MDExOlB1bGxSZXF1ZXN0MTY5NzMzNzQ= | 7,424 | FIX value_counts should skip NaT | {
"avatar_url": "https://avatars.githubusercontent.com/u/1931852?v=4",
"events_url": "https://api.github.com/users/hayd/events{/privacy}",
"followers_url": "https://api.github.com/users/hayd/followers",
"following_url": "https://api.github.com/users/hayd/following{/other_user}",
"gists_url": "https://api.github.com/users/hayd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hayd",
"id": 1931852,
"login": "hayd",
"node_id": "MDQ6VXNlcjE5MzE4NTI=",
"organizations_url": "https://api.github.com/users/hayd/orgs",
"received_events_url": "https://api.github.com/users/hayd/received_events",
"repos_url": "https://api.github.com/users/hayd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hayd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hayd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hayd"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "5319e7",
"default": false,
"description": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 9 | 2014-06-11T00:00:33Z | 2014-06-17T15:21:34Z | 2014-06-17T12:01:37Z | CONTRIBUTOR | null | fixes #7423
fixes #5569.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7424/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7424/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7424.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7424",
"merged_at": "2014-06-17T12:01:37Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7424.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7424"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7425 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7425/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7425/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7425/events | https://github.com/pandas-dev/pandas/issues/7425 | 35,438,597 | MDU6SXNzdWUzNTQzODU5Nw== | 7,425 | time delta index | {
"avatar_url": "https://avatars.githubusercontent.com/u/1931852?v=4",
"events_url": "https://api.github.com/users/hayd/events{/privacy}",
"followers_url": "https://api.github.com/users/hayd/followers",
"following_url": "https://api.github.com/users/hayd/following{/other_user}",
"gists_url": "https://api.github.com/users/hayd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hayd",
"id": 1931852,
"login": "hayd",
"node_id": "MDQ6VXNlcjE5MzE4NTI=",
"organizations_url": "https://api.github.com/users/hayd/orgs",
"received_events_url": "https://api.github.com/users/hayd/received_events",
"repos_url": "https://api.github.com/users/hayd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hayd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hayd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hayd"
} | [
{
"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": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
]
| closed | false | null | []
| {
"closed_at": "2015-03-23T10:50:37Z",
"closed_issues": 400,
"created_at": "2014-02-14T03:31:22Z",
"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.15 of course!",
"due_on": "2015-03-22T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/25",
"id": 569113,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25/labels",
"node_id": "MDk6TWlsZXN0b25lNTY5MTEz",
"number": 25,
"open_issues": 0,
"state": "closed",
"title": "0.16.0",
"updated_at": "2017-08-24T09:17:49Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25"
} | 5 | 2014-06-11T00:03:45Z | 2014-06-11T07:15:21Z | 2014-06-11T07:15:21Z | CONTRIBUTOR | null | You can't seem to create a time delta index, even if you force object dtype:
```
In [4]: td = pd.Series([np.timedelta64(10000), pd.NaT], dtype='timedelta64[ns]')
In [5]: pd.Index(td)
Out[5]: Int64Index([10000, -9223372036854775808], dtype='int64')
In [6]: pd.Index(td, dtype= 'timedelta64[ns]')
Out[6]: Int64Index([10000, -9223372036854775808], dtype='int64')
```
_related to #7423_
Perhaps there is already an issue for this?
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7425/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7425/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7426 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7426/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7426/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7426/events | https://github.com/pandas-dev/pandas/issues/7426 | 35,444,020 | MDU6SXNzdWUzNTQ0NDAyMA== | 7,426 | ENH: Create dataframes using every combination of given values, like R's expand.grid() | {
"avatar_url": "https://avatars.githubusercontent.com/u/1460294?v=4",
"events_url": "https://api.github.com/users/onesandzeroes/events{/privacy}",
"followers_url": "https://api.github.com/users/onesandzeroes/followers",
"following_url": "https://api.github.com/users/onesandzeroes/following{/other_user}",
"gists_url": "https://api.github.com/users/onesandzeroes/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/onesandzeroes",
"id": 1460294,
"login": "onesandzeroes",
"node_id": "MDQ6VXNlcjE0NjAyOTQ=",
"organizations_url": "https://api.github.com/users/onesandzeroes/orgs",
"received_events_url": "https://api.github.com/users/onesandzeroes/received_events",
"repos_url": "https://api.github.com/users/onesandzeroes/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/onesandzeroes/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/onesandzeroes/subscriptions",
"type": "User",
"url": "https://api.github.com/users/onesandzeroes"
} | [
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 1 | 2014-06-11T02:04:08Z | 2014-06-25T05:01:27Z | 2014-06-25T05:01:27Z | CONTRIBUTOR | null | I find R's `expand.grid()` function quite useful for quick creation of example datasets. For example:
``` R
expand.grid(height = seq(60, 70, 5), weight = seq(100, 180, 40), sex = c("Male","Female"))
```
```
height weight sex
1 60 100 Male
2 65 100 Male
3 70 100 Male
4 60 140 Male
5 65 140 Male
6 70 140 Male
7 60 180 Male
8 65 180 Male
9 70 180 Male
10 60 100 Female
11 65 100 Female
12 70 100 Female
13 60 140 Female
14 65 140 Female
15 70 140 Female
16 60 180 Female
17 65 180 Female
18 70 180 Female
```
A simple implementation of this for `pandas` is easy to put together:
``` python
def expand_grid(dct):
rows = itertools.product(*dct.values())
return pd.DataFrame.from_records(rows, columns=dct.keys())
df = expand_grid(
{'height': range(60, 71, 5),
'weight': range(100, 181, 40),
'sex': ['Male', 'Female']}
)
print(df)
```
Do people think this would be a useful addition?
If so, what kind of features should it have beyond the basics? A `dtypes` argument, specifying which column should be the index, etc.?
I'm also not sure if `expand_grid` is the most intuitive name, but given that it's duplicating
R functionality, maybe it's best just to leave it as is.
| {
"+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/7426/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7426/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7427 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7427/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7427/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7427/events | https://github.com/pandas-dev/pandas/pull/7427 | 35,471,942 | MDExOlB1bGxSZXF1ZXN0MTY5OTA5NTE= | 7,427 | add unit tests for nanops | {
"avatar_url": "https://avatars.githubusercontent.com/u/2272878?v=4",
"events_url": "https://api.github.com/users/toddrjen/events{/privacy}",
"followers_url": "https://api.github.com/users/toddrjen/followers",
"following_url": "https://api.github.com/users/toddrjen/following{/other_user}",
"gists_url": "https://api.github.com/users/toddrjen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/toddrjen",
"id": 2272878,
"login": "toddrjen",
"node_id": "MDQ6VXNlcjIyNzI4Nzg=",
"organizations_url": "https://api.github.com/users/toddrjen/orgs",
"received_events_url": "https://api.github.com/users/toddrjen/received_events",
"repos_url": "https://api.github.com/users/toddrjen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/toddrjen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/toddrjen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/toddrjen"
} | [
{
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 2 | 2014-06-11T10:55:32Z | 2014-06-20T14:42:51Z | 2014-06-11T12:30:46Z | CONTRIBUTOR | null | This adds unit tests for `pandas.core.nanops`. It also moves existing nanops tests from `test_common` to `test_nanops`.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7427/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7427/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7427.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7427",
"merged_at": "2014-06-11T12:30:46Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7427.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7427"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7428 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7428/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7428/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7428/events | https://github.com/pandas-dev/pandas/pull/7428 | 35,481,845 | MDExOlB1bGxSZXF1ZXN0MTY5OTY3OTE= | 7,428 | make nanops._maybe_null_out work with complex numbers ( issue #7353 ) | {
"avatar_url": "https://avatars.githubusercontent.com/u/2272878?v=4",
"events_url": "https://api.github.com/users/toddrjen/events{/privacy}",
"followers_url": "https://api.github.com/users/toddrjen/followers",
"following_url": "https://api.github.com/users/toddrjen/following{/other_user}",
"gists_url": "https://api.github.com/users/toddrjen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/toddrjen",
"id": 2272878,
"login": "toddrjen",
"node_id": "MDQ6VXNlcjIyNzI4Nzg=",
"organizations_url": "https://api.github.com/users/toddrjen/orgs",
"received_events_url": "https://api.github.com/users/toddrjen/received_events",
"repos_url": "https://api.github.com/users/toddrjen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/toddrjen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/toddrjen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/toddrjen"
} | [
{
"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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-11T13:17:42Z | 2014-06-12T11:03:13Z | 2014-06-12T10:46:48Z | CONTRIBUTOR | null | This fixes #7353 where `nanops._maybe_null_out`, and thus other functions that call on it, don't work with complex numbers.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7428/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7428/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7428.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7428",
"merged_at": "2014-06-12T10:46:48Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7428.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7428"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7429 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7429/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7429/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7429/events | https://github.com/pandas-dev/pandas/issues/7429 | 35,482,245 | MDU6SXNzdWUzNTQ4MjI0NQ== | 7,429 | BUG: multi-index slicing buggy with datetime selectors | {
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-11T13:22:41Z | 2014-06-11T14:48:35Z | 2014-06-11T14:43:24Z | CONTRIBUTOR | null | http://stackoverflow.com/questions/24152509/slicing-a-pandas-multiindex-using-datetime-datatype
```
dates = pd.DatetimeIndex([datetime.datetime(2012,1,1,12,12,12)+datetime.timedelta(days = i) for i in range(6)])
freq = [1,2]
iterables = [dates, freq]
index = pd.MultiIndex.from_product(iterables, names=['date','frequency'])
df = pd.DataFrame(np.random.randn(6*2,4),index=index,columns=list('ABCD'))
```
- This should work in a single step
- show this using `pd.IndexSlice` notation
- accept strings / partial strings as indexers
```
df_temp = df.loc[(slice(pd.Timestamp('2012-01-01 12:12:12'),pd.Timestamp('2012-01-03 12:12:12'))), slice('A','B')]
df_temp.loc[(slice(None),slice(1,1)),:]
```
After #7430, the following works (just using `IndexSlice` as a conven)
```
idx = pd.IndexSlice
df.loc[(idx[pd.Timestamp('2012-01-01 12:12:12'),pd.Timestamp('2012-01-03 12:12:12'),idx[1:1]], idx['A','B']]
```
as well as partial string slicing
```
df.loc[idx['2012-01-01 12:12:12':'2012-01-03 12:12:12',1],idx['A':'B']]
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7429/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7429/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7430 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7430/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7430/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7430/events | https://github.com/pandas-dev/pandas/pull/7430 | 35,486,137 | MDExOlB1bGxSZXF1ZXN0MTY5OTkyNDM= | 7,430 | BUG: Bug in multi-index slicing with datetimelike ranges (strings and Timestamps) (GH7429) | {
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-11T14:02:04Z | 2014-06-12T07:02:34Z | 2014-06-11T14:43:24Z | CONTRIBUTOR | null | closes #7429
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7430/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7430/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7430.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7430",
"merged_at": "2014-06-11T14:43:24Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7430.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7430"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7431 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7431/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7431/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7431/events | https://github.com/pandas-dev/pandas/issues/7431 | 35,494,089 | MDU6SXNzdWUzNTQ5NDA4OQ== | 7,431 | series created with DatetimeIndex when index is [None] | {
"avatar_url": "https://avatars.githubusercontent.com/u/6034908?v=4",
"events_url": "https://api.github.com/users/dbew/events{/privacy}",
"followers_url": "https://api.github.com/users/dbew/followers",
"following_url": "https://api.github.com/users/dbew/following{/other_user}",
"gists_url": "https://api.github.com/users/dbew/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dbew",
"id": 6034908,
"login": "dbew",
"node_id": "MDQ6VXNlcjYwMzQ5MDg=",
"organizations_url": "https://api.github.com/users/dbew/orgs",
"received_events_url": "https://api.github.com/users/dbew/received_events",
"repos_url": "https://api.github.com/users/dbew/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dbew/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dbew/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dbew"
} | [
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-11T15:16:39Z | 2014-06-13T15:22:05Z | 2014-06-13T15:22:05Z | CONTRIBUTOR | null | This looks like a change from 0.13.1 to HEAD. If you create a series like this:
``` python
pd.Series(index=np.array([None]))
```
Then in 0.13.1 the result is:
``` python
Out[16]:
NaN NaN
dtype: float64
In [19]: x.index.dtype
Out[19]: dtype('O')
In [20]: type(x.index)
Out[20]: pandas.core.index.Index
```
but in HEAD the result is
``` python
Out[191]:
NaT NaN
dtype: float64
In[192]: x.index.dtype
Out[192]: dtype('<M8[ns]')
In[193]: type(x.index)
Out[193]: pandas.tseries.index.DatetimeIndex
```
So the index has changed from Index/object to DatetimeIndex/datetime64.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7431/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7431/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7432 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7432/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7432/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7432/events | https://github.com/pandas-dev/pandas/issues/7432 | 35,494,459 | MDU6SXNzdWUzNTQ5NDQ1OQ== | 7,432 | Confusing error message on frame.__set_item__ with duplicate index entries | {
"avatar_url": "https://avatars.githubusercontent.com/u/4764631?v=4",
"events_url": "https://api.github.com/users/roblevy/events{/privacy}",
"followers_url": "https://api.github.com/users/roblevy/followers",
"following_url": "https://api.github.com/users/roblevy/following{/other_user}",
"gists_url": "https://api.github.com/users/roblevy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/roblevy",
"id": 4764631,
"login": "roblevy",
"node_id": "MDQ6VXNlcjQ3NjQ2MzE=",
"organizations_url": "https://api.github.com/users/roblevy/orgs",
"received_events_url": "https://api.github.com/users/roblevy/received_events",
"repos_url": "https://api.github.com/users/roblevy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/roblevy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/roblevy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/roblevy"
} | [
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 1 | 2014-06-11T15:20:09Z | 2014-06-13T19:34:50Z | 2014-06-13T19:34:50Z | CONTRIBUTOR | null | Struggled with this for a while to work out why I was getting `TypeError: incompatible index of inserted column with frame index` when doing df['new_col'] = my_series.
Turns out the the series had duplicates in its index. This occured because I was importing a CSV and then setting the index. Perhaps we need a warning when setting an index with duplicate values?
```
In [2]: df = pd.DataFrame({'foo':['a', 'b', 'c'], 'bar':[1,2,3], 'baz':['d','e','f']}).set_index('foo')
In [3]: df
Out[3]:
bar baz
foo
a 1 d
b 2 e
c 3 f
[3 rows x 2 columns]
In [5]: ser = pd.DataFrame({'foo':['a', 'b', 'c', 'a'], 'fiz':['g','h','i','j']}).set_index('foo')
In [6]: ser
Out[6]:
fiz
foo
a g
b h
c i
a j
[4 rows x 1 columns]
In [8]: df['newcol'] = ser
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-8-a8d535085de2> in <module>()
----> 1 df['newcol'] = ser
C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\pandas-0.13.1-py2.7-win-amd64.egg\pandas\core\frame.pyc in __setitem__(self, key, value)
1885 else:
1886 # set column
-> 1887 self._set_item(key, value)
1888
1889 def _setitem_slice(self, key, value):
C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\pandas-0.13.1-py2.7-win-amd64.egg\pandas\core\frame.pyc in _set_item(self, key, value)
1965 is_existing = key in self.columns
1966 self._ensure_valid_index(value)
-> 1967 value = self._sanitize_column(key, value)
1968 NDFrame._set_item(self, key, value)
1969
C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\pandas-0.13.1-py2.7-win-amd64.egg\pandas\core\frame.pyc in _sanitize_column(self, key, value)
2008 value = value.reindex(self.index).values
2009 except:
-> 2010 raise TypeError('incompatible index of inserted column '
2011 'with frame index')
2012
TypeError: incompatible index of inserted column with frame 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/7432/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7432/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7433 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7433/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7433/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7433/events | https://github.com/pandas-dev/pandas/issues/7433 | 35,506,846 | MDU6SXNzdWUzNTUwNjg0Ng== | 7,433 | SQLAlchemy MySQL df.to_sql() creates 32 bit int MySQL columns for int64 df cols | {
"avatar_url": "https://avatars.githubusercontent.com/u/417058?v=4",
"events_url": "https://api.github.com/users/davidljung/events{/privacy}",
"followers_url": "https://api.github.com/users/davidljung/followers",
"following_url": "https://api.github.com/users/davidljung/following{/other_user}",
"gists_url": "https://api.github.com/users/davidljung/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidljung",
"id": 417058,
"login": "davidljung",
"node_id": "MDQ6VXNlcjQxNzA1OA==",
"organizations_url": "https://api.github.com/users/davidljung/orgs",
"received_events_url": "https://api.github.com/users/davidljung/received_events",
"repos_url": "https://api.github.com/users/davidljung/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidljung/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidljung/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidljung"
} | [
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-11T17:30:26Z | 2014-07-05T13:48:39Z | 2014-07-05T13:48:39Z | CONTRIBUTOR | null | Using SQLAlchemy engine for MySQL connection and DataFrame.to_sql(), MySQLdb throws a DataError as a result of 64 bit integer out-of-range as a 32bit integer was created for the table schema.
```
engine = create_engine('mysql://mysql@localhost/db')
df = pd.DataFrame(data={'i64':2**62},index=[1])
df.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 1 entries, 1 to 1
Data columns (total 1 columns):
i64 1 non-null int64
dtypes: int64(1)
df.to_sql('itest',engine,index=False)
```
yields:
```
DataError: (DataError) (1264, "Out of range value for column 'i64' at row 1") 'INSERT INTO itest (i64) VALUES (%s)' (4611686018427387904L,)
```
and inspection of the MySQL table schema shows the i64 column has MySQL datatype int(11), which is only 32bits wide. It should be a bigint 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/7433/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7433/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7434 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7434/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7434/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7434/events | https://github.com/pandas-dev/pandas/pull/7434 | 35,511,708 | MDExOlB1bGxSZXF1ZXN0MTcwMTQ0MjM= | 7,434 | ENH: select_dypes impl | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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": "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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 66 | 2014-06-11T18:22:54Z | 2014-07-09T20:53:14Z | 2014-07-07T16:22:20Z | MEMBER | null | closes #7316
examples:
```
In [8]: paste
df = DataFrame({'a': list('abc'),
'b': list(range(1, 4)),
'c': np.arange(3, 6).astype('u1'),
'd': np.arange(4.0, 7.0),
'e': [True, False, True],
'f': [False, True, False],
'g': pd.date_range('now', periods=3).values})
df['h'] = df.g.diff()
df['i'] = np.arange(3, 6).astype('u8')
df['j'] = pd.date_range('20130101', periods=3).values
df
## -- End pasted text --
Out[8]:
a b c d e f g h i j
0 a 1 3 4 True False 2014-06-22 23:40:53 NaT 3 2013-01-01
1 b 2 4 5 False True 2014-06-23 23:40:53 1 days 4 2013-01-02
2 c 3 5 6 True False 2014-06-24 23:40:53 1 days 5 2013-01-03
In [9]: paste
df.select_type(include=[bool])
## -- End pasted text --
Out[9]:
e f
0 True False
1 False True
2 True False
In [10]: paste
df.select_type(include=['number', 'bool'], exclude=['unsignedinteger'])
## -- End pasted text --
Out[10]:
b d e f h
0 1 4 True False NaT
1 2 5 False True 1 days
2 3 6 True False 1 days
In [11]: np.timedelta64.mro() # this is an integer type
Out[11]:
[numpy.timedelta64,
numpy.signedinteger,
numpy.integer,
numpy.number,
numpy.generic,
object]
In [13]: paste
df.select_type(include=['object'])
## -- End pasted text --
Out[13]:
a
0 a
1 b
2 c
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7434/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7434/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7434.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7434",
"merged_at": "2014-07-07T16:22:20Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7434.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7434"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7435 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7435/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7435/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7435/events | https://github.com/pandas-dev/pandas/pull/7435 | 35,514,350 | MDExOlB1bGxSZXF1ZXN0MTcwMTU5OTY= | 7,435 | API: Improved inference of datetime/timedelta with mixed null objects. (GH7431) | {
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 2 | 2014-06-11T18:51:00Z | 2014-06-13T15:26:37Z | 2014-06-13T15:22:05Z | CONTRIBUTOR | null | - regression from 0.13.1 in interpretation of an object Index
- additional tests to validate datetimelike inferences
closes #7431
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7435/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7435/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7435.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7435",
"merged_at": "2014-06-13T15:22:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7435.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7435"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7436 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7436/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7436/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7436/events | https://github.com/pandas-dev/pandas/issues/7436 | 35,515,423 | MDU6SXNzdWUzNTUxNTQyMw== | 7,436 | tm.TestCase.assert_numpy_array_equal(...) and np.nan | {
"avatar_url": "https://avatars.githubusercontent.com/u/890156?v=4",
"events_url": "https://api.github.com/users/jankatins/events{/privacy}",
"followers_url": "https://api.github.com/users/jankatins/followers",
"following_url": "https://api.github.com/users/jankatins/following{/other_user}",
"gists_url": "https://api.github.com/users/jankatins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jankatins",
"id": 890156,
"login": "jankatins",
"node_id": "MDQ6VXNlcjg5MDE1Ng==",
"organizations_url": "https://api.github.com/users/jankatins/orgs",
"received_events_url": "https://api.github.com/users/jankatins/received_events",
"repos_url": "https://api.github.com/users/jankatins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jankatins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jankatins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jankatins"
} | []
| closed | false | null | []
| null | 7 | 2014-06-11T19:02:19Z | 2014-06-12T22:40:07Z | 2014-06-11T19:07:24Z | CONTRIBUTOR | null | Is this intended:
``` python
# In a testcase:
exp = np.array([1,2,4,np.nan])
self.assert_numpy_array_equal(exp, exp)
Traceback (most recent call last):
File "C:\data\external\pandas\pandas\tests\test_categorical.py", line 490, in test_groupby_categorical_no_compress
self.assert_numpy_array_equal(exp, exp)
File "C:\data\external\pandas\pandas\util\testing.py", line 91, in assert_numpy_array_equal
raise AssertionError('{0} is not equal to {1}.'.format(np_array, assert_equal))
AssertionError: [ 1. 2. 4. nan] is not equal to [ 1. 2. 4. 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/7436/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7436/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7437 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7437/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7437/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7437/events | https://github.com/pandas-dev/pandas/pull/7437 | 35,574,570 | MDExOlB1bGxSZXF1ZXN0MTcwNDkwNzA= | 7,437 | make nanops work when ndim==1 and axis==0 ( issue #7354 ) | {
"avatar_url": "https://avatars.githubusercontent.com/u/2272878?v=4",
"events_url": "https://api.github.com/users/toddrjen/events{/privacy}",
"followers_url": "https://api.github.com/users/toddrjen/followers",
"following_url": "https://api.github.com/users/toddrjen/following{/other_user}",
"gists_url": "https://api.github.com/users/toddrjen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/toddrjen",
"id": 2272878,
"login": "toddrjen",
"node_id": "MDQ6VXNlcjIyNzI4Nzg=",
"organizations_url": "https://api.github.com/users/toddrjen/orgs",
"received_events_url": "https://api.github.com/users/toddrjen/received_events",
"repos_url": "https://api.github.com/users/toddrjen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/toddrjen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/toddrjen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/toddrjen"
} | [
{
"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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 5 | 2014-06-12T11:09:11Z | 2014-06-12T13:12:55Z | 2014-06-12T12:59:15Z | CONTRIBUTOR | null | This fixes issue #7354, where some `nanops` functions fail for 1-dimensional arrays for the argument `axis=0`.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7437/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7437/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7437.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7437",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/7437.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7437"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7438 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7438/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7438/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7438/events | https://github.com/pandas-dev/pandas/issues/7438 | 35,574,767 | MDU6SXNzdWUzNTU3NDc2Nw== | 7,438 | Arithmetic by DataFrame index | {
"avatar_url": "https://avatars.githubusercontent.com/u/5279578?v=4",
"events_url": "https://api.github.com/users/mmajewsk/events{/privacy}",
"followers_url": "https://api.github.com/users/mmajewsk/followers",
"following_url": "https://api.github.com/users/mmajewsk/following{/other_user}",
"gists_url": "https://api.github.com/users/mmajewsk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mmajewsk",
"id": 5279578,
"login": "mmajewsk",
"node_id": "MDQ6VXNlcjUyNzk1Nzg=",
"organizations_url": "https://api.github.com/users/mmajewsk/orgs",
"received_events_url": "https://api.github.com/users/mmajewsk/received_events",
"repos_url": "https://api.github.com/users/mmajewsk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mmajewsk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mmajewsk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mmajewsk"
} | []
| closed | false | null | []
| null | 0 | 2014-06-12T11:12:43Z | 2014-06-12T11:15:40Z | 2014-06-12T11:15:40Z | NONE | null | I encountered a problem with doing any arythmetic from index, in other words, when a index is time (datetime64) and i would like to count something by it, i have no other option than to assign it to some column in dataframe object.
import pandas as pd
```
import pandas as pd
rng = pd.date_range('1/1/2011', periods=4, freq='H')
ts = pd.Series(rng, index=rng)
print "Data:"
print ts
print "\nSubstraction from column"
print ts-ts[0]
print "\nIndex to column"
ts['lol']=ts.index
print ts['lol']-ts['lol'][0]
print "\nSubstraction by index"
df = ts.index
print df-df[0]
```
result:
```
Data:
2011-01-01 00:00:00 2011-01-01 00:00:00
2011-01-01 01:00:00 2011-01-01 01:00:00
2011-01-01 02:00:00 2011-01-01 02:00:00
2011-01-01 03:00:00 2011-01-01 03:00:00
Freq: H, dtype: datetime64[ns]
Substraction from column
2011-01-01 00:00:00 00:00:00
2011-01-01 01:00:00 01:00:00
2011-01-01 02:00:00 02:00:00
2011-01-01 03:00:00 03:00:00
Freq: H, dtype: timedelta64[ns]
Index to column
lol 00:00:00
lol 01:00:00
lol 02:00:00
lol 03:00:00
dtype: timedelta64[ns]
Substraction by index
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-146-5a8539747b5a> in <module>()
13 print "\nSubstraction by index"
14 df = ts.index
---> 15 print df-df[0]
16
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\core\index.pyc in __sub__(self, other)
853
854 def __sub__(self, other):
--> 855 return self.diff(other)
856
857 def __and__(self, other):
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\core\index.pyc in diff(self, other)
981
982 if not hasattr(other, '__iter__'):
--> 983 raise TypeError('Input must be iterable!')
984
985 if self.equals(other):
TypeError: Input must be iterable!
```
Maybe it's just conceptional problem, but if i want to make something with date index i have to keep additional column (with the same values as index!).
When it comes to huge datasets this can be a problem, because i have to store the same thing twice, or make additional column for calculations, which is not better.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7438/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7438/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7439 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7439/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7439/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7439/events | https://github.com/pandas-dev/pandas/issues/7439 | 35,574,909 | MDU6SXNzdWUzNTU3NDkwOQ== | 7,439 | Arithmetic by DataFrame index | {
"avatar_url": "https://avatars.githubusercontent.com/u/5279578?v=4",
"events_url": "https://api.github.com/users/mmajewsk/events{/privacy}",
"followers_url": "https://api.github.com/users/mmajewsk/followers",
"following_url": "https://api.github.com/users/mmajewsk/following{/other_user}",
"gists_url": "https://api.github.com/users/mmajewsk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mmajewsk",
"id": 5279578,
"login": "mmajewsk",
"node_id": "MDQ6VXNlcjUyNzk1Nzg=",
"organizations_url": "https://api.github.com/users/mmajewsk/orgs",
"received_events_url": "https://api.github.com/users/mmajewsk/received_events",
"repos_url": "https://api.github.com/users/mmajewsk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mmajewsk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mmajewsk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mmajewsk"
} | [
{
"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": "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"
} | 15 | 2014-06-12T11:15:17Z | 2016-02-24T16:03:45Z | 2016-02-24T16:03:15Z | NONE | null | I encountered a problem with doing any arythmetic from index, in other words, when a index is time (datetime64) and i would like to count something by it, i have no other option than to assign it to some column in dataframe object.
import pandas as pd
```
import pandas as pd
rng = pd.date_range('1/1/2011', periods=4, freq='H')
ts = pd.Series(rng, index=rng)
print "Data:"
print ts
print "\nSubstraction from column"
print ts-ts[0]
print "\nIndex to column"
ts['lol']=ts.index
print ts['lol']-ts['lol'][0]
print "\nSubstraction by index"
df = ts.index
print df-df[0]
```
result:
```
Data:
2011-01-01 00:00:00 2011-01-01 00:00:00
2011-01-01 01:00:00 2011-01-01 01:00:00
2011-01-01 02:00:00 2011-01-01 02:00:00
2011-01-01 03:00:00 2011-01-01 03:00:00
Freq: H, dtype: datetime64[ns]
Substraction from column
2011-01-01 00:00:00 00:00:00
2011-01-01 01:00:00 01:00:00
2011-01-01 02:00:00 02:00:00
2011-01-01 03:00:00 03:00:00
Freq: H, dtype: timedelta64[ns]
Index to column
lol 00:00:00
lol 01:00:00
lol 02:00:00
lol 03:00:00
dtype: timedelta64[ns]
Substraction by index
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-146-5a8539747b5a> in <module>()
13 print "\nSubstraction by index"
14 df = ts.index
---> 15 print df-df[0]
16
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\core\index.pyc in __sub__(self, other)
853
854 def __sub__(self, other):
--> 855 return self.diff(other)
856
857 def __and__(self, other):
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\core\index.pyc in diff(self, other)
981
982 if not hasattr(other, '__iter__'):
--> 983 raise TypeError('Input must be iterable!')
984
985 if self.equals(other):
TypeError: Input must be iterable!
```
Maybe it's just conceptional problem, but if i want to make something with date index i have to keep additional column (with the same values as index!).
When it comes to huge datasets this can be a problem, because i have to store the same thing twice, or make additional column for calculations, which is not better.
P.S. pd.show_versions():
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 37 Stepping 2, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.13.1
Cython: 0.20.1
numpy: 1.8.1
scipy: 0.13.3
statsmodels: 0.5.0
IPython: 2.0.0
sphinx: 1.2.2
patsy: 0.2.1
scikits.timeseries: None
dateutil: 2.2
pytz: 2013.9
bottleneck: None
tables: 3.1.1
numexpr: 2.3.1
matplotlib: 1.3.1
openpyxl: None
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: None
sqlalchemy: 0.9.4
lxml: None
bs4: None
html5lib: None
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/7439/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7439/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7440 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7440/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7440/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7440/events | https://github.com/pandas-dev/pandas/pull/7440 | 35,582,648 | MDExOlB1bGxSZXF1ZXN0MTcwNTQwNzE= | 7,440 | support axis=None for nanmedian ( issue #7352 ) | {
"avatar_url": "https://avatars.githubusercontent.com/u/2272878?v=4",
"events_url": "https://api.github.com/users/toddrjen/events{/privacy}",
"followers_url": "https://api.github.com/users/toddrjen/followers",
"following_url": "https://api.github.com/users/toddrjen/following{/other_user}",
"gists_url": "https://api.github.com/users/toddrjen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/toddrjen",
"id": 2272878,
"login": "toddrjen",
"node_id": "MDQ6VXNlcjIyNzI4Nzg=",
"organizations_url": "https://api.github.com/users/toddrjen/orgs",
"received_events_url": "https://api.github.com/users/toddrjen/received_events",
"repos_url": "https://api.github.com/users/toddrjen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/toddrjen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/toddrjen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/toddrjen"
} | [
{
"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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 10 | 2014-06-12T13:18:52Z | 2014-06-13T13:23:36Z | 2014-06-12T22:41:29Z | CONTRIBUTOR | null | This fixes #7352, where `nanmedian` does not work when `axis==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/7440/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7440/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7440.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7440",
"merged_at": "2014-06-12T22:41:29Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7440.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7440"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7441 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7441/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7441/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7441/events | https://github.com/pandas-dev/pandas/issues/7441 | 35,584,398 | MDU6SXNzdWUzNTU4NDM5OA== | 7,441 | [ENH] Allow passing MetaData (or meta kwargs) to high-level SQL functions | {
"avatar_url": "https://avatars.githubusercontent.com/u/2418513?v=4",
"events_url": "https://api.github.com/users/aldanor/events{/privacy}",
"followers_url": "https://api.github.com/users/aldanor/followers",
"following_url": "https://api.github.com/users/aldanor/following{/other_user}",
"gists_url": "https://api.github.com/users/aldanor/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aldanor",
"id": 2418513,
"login": "aldanor",
"node_id": "MDQ6VXNlcjI0MTg1MTM=",
"organizations_url": "https://api.github.com/users/aldanor/orgs",
"received_events_url": "https://api.github.com/users/aldanor/received_events",
"repos_url": "https://api.github.com/users/aldanor/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aldanor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aldanor/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aldanor"
} | [
{
"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 | []
| {
"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 | 2014-06-12T13:40:50Z | 2020-06-20T19:41:24Z | null | CONTRIBUTOR | null | Use case: I want to query an Oracle table but I'm not the owner, so `meta.reflect(engine)` would do nothing and always return an empty list of tables rendering `read_sql_table` useless. This works: `meta.reflect(engine, schema='the_real_owner')`, however there's no way of passing the metadata / schema to the high-level pandas.io.sql functions. One may also want to use a `meta.reflect(engine, only=[...])` or `meta.reflect(engine, oracle_resolve_synonyms=True)` or any other dialect-specific argument.
`PandasSQLAlchemy` class already support passing `meta` in the constructor, so it's just a matter of a adding an extra keyword argument to the three io.sql.read_sql\* functions. Or maybe allow passing through arbitrary kwargs to meta's reflect method, like `read_sql_table(table, engine, reflect=dict(schema='my_schema', oracle_resolve_synonyms=True))` -- ugly but functional.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7441/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7441/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7442 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7442/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7442/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7442/events | https://github.com/pandas-dev/pandas/pull/7442 | 35,600,430 | MDExOlB1bGxSZXF1ZXN0MTcwNjUwOTM= | 7,442 | _sanitize_column now reports proper duplicate error | {
"avatar_url": "https://avatars.githubusercontent.com/u/4764631?v=4",
"events_url": "https://api.github.com/users/roblevy/events{/privacy}",
"followers_url": "https://api.github.com/users/roblevy/followers",
"following_url": "https://api.github.com/users/roblevy/following{/other_user}",
"gists_url": "https://api.github.com/users/roblevy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/roblevy",
"id": 4764631,
"login": "roblevy",
"node_id": "MDQ6VXNlcjQ3NjQ2MzE=",
"organizations_url": "https://api.github.com/users/roblevy/orgs",
"received_events_url": "https://api.github.com/users/roblevy/received_events",
"repos_url": "https://api.github.com/users/roblevy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/roblevy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/roblevy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/roblevy"
} | [
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 5 | 2014-06-12T16:27:55Z | 2014-06-14T10:58:15Z | 2014-06-13T19:34:50Z | CONTRIBUTOR | null | closes #7432
A very simple fix for GH7432. `internals.py` (line 3240) actually raises the correct exception (`ValueError: cannot reindex from a duplicate axis`) but the except: doesn't allow it to be raised. Here I've just allowed the exception itself to be raised since it's more useful to the user than the weird `TypeError` message.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7442/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7442/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7442.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7442",
"merged_at": "2014-06-13T19:34:50Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7442.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7442"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7443 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7443/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7443/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7443/events | https://github.com/pandas-dev/pandas/issues/7443 | 35,618,072 | MDU6SXNzdWUzNTYxODA3Mg== | 7,443 | Mouse-over in DataFrame plot shows wrong dates | {
"avatar_url": "https://avatars.githubusercontent.com/u/7874108?v=4",
"events_url": "https://api.github.com/users/Poquaruse/events{/privacy}",
"followers_url": "https://api.github.com/users/Poquaruse/followers",
"following_url": "https://api.github.com/users/Poquaruse/following{/other_user}",
"gists_url": "https://api.github.com/users/Poquaruse/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Poquaruse",
"id": 7874108,
"login": "Poquaruse",
"node_id": "MDQ6VXNlcjc4NzQxMDg=",
"organizations_url": "https://api.github.com/users/Poquaruse/orgs",
"received_events_url": "https://api.github.com/users/Poquaruse/received_events",
"repos_url": "https://api.github.com/users/Poquaruse/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Poquaruse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Poquaruse/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Poquaruse"
} | []
| closed | false | null | []
| null | 3 | 2014-06-12T20:01:24Z | 2014-06-13T06:39:45Z | 2014-06-12T21:04:06Z | NONE | null | In a new IPython Notebook session:
import pandas as pd
import numpy as np
%matplotlib
dt_rng = pd.date_range(start='2014-01-01', end='2014-01-31', freq='1min')
df = pd.DataFrame(np.random.randn(len(dt_rng)), index=dt_rng)
ax = df.plot()
The DataFrame is plotted correctly. However, a mouse-over shows wrong dates starting in the year 1970. The axis-labelling is correct.
Editing the format_coord function shows something interesting:
ax.format_coord = lambda x,y: "{} {}".format(x,y)
231422240.[....] and so on. This float value obviously isn't parsed correctly. Any ideas?
Thanks for making pandas so great and best regards!
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7443/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7443/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7444 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7444/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7444/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7444/events | https://github.com/pandas-dev/pandas/pull/7444 | 35,618,139 | MDExOlB1bGxSZXF1ZXN0MTcwNzYzODg= | 7,444 | WIP/DO NOT MERGE: Categorical improvements | {
"avatar_url": "https://avatars.githubusercontent.com/u/890156?v=4",
"events_url": "https://api.github.com/users/jankatins/events{/privacy}",
"followers_url": "https://api.github.com/users/jankatins/followers",
"following_url": "https://api.github.com/users/jankatins/following{/other_user}",
"gists_url": "https://api.github.com/users/jankatins/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jankatins",
"id": 890156,
"login": "jankatins",
"node_id": "MDQ6VXNlcjg5MDE1Ng==",
"organizations_url": "https://api.github.com/users/jankatins/orgs",
"received_events_url": "https://api.github.com/users/jankatins/received_events",
"repos_url": "https://api.github.com/users/jankatins/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jankatins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jankatins/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jankatins"
} | [
{
"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": "2014-10-23T11:43:09Z",
"closed_issues": 530,
"created_at": "2014-07-06T18:44:54Z",
"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.14.1 of course!",
"due_on": "2014-10-19T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/28",
"id": 711567,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/28/labels",
"node_id": "MDk6TWlsZXN0b25lNzExNTY3",
"number": 28,
"open_issues": 0,
"state": "closed",
"title": "0.15.0",
"updated_at": "2017-11-24T10:50:44Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/28"
} | 61 | 2014-06-12T20:02:16Z | 2014-07-14T21:46:02Z | 2014-07-14T21:46:02Z | CONTRIBUTOR | null | This is a PR to make discussing the doc changes easier. See https://github.com/pydata/pandas/pull/7217 for the main PR
TODO List: now in #7217
## The Docs (updated 1st july, 4pm CEST)
<div class="section" id="categorical">
<span id="id1"></span><h1>Categorical<a class="headerlink" href="#categorical" title="Permalink to this headline">¶</a></h1>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.15.</span></p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">While there was in <cite>pandas.Categorical</cite> in earlier versions, the ability to use
<cite>Categorical</cite> data in <cite>Series</cite> and <cite>DataFrame</cite> is new.</p>
</div>
<p>This is a short introduction to pandas <cite>Categorical</cite> type, including a short comparison with R’s
<cite>factor</cite>.</p>
<p><cite>Categoricals</cite> are a pandas data type, which correspond to categorical variables in
statistics: a variable, which can take on only a limited, and usually fixed,
number of possible values (commonly called <cite>levels</cite>). Examples are gender, social class,
blood types, country affiliations, observation time or ratings via Likert scales.</p>
<p>In contrast to statistical categorical variables, a <cite>Categorical</cite> might have an order (e.g.
‘strongly agree’ vs ‘agree’ or ‘first observation’ vs. ‘second observation’), but numerical
operations (additions, divisions, ...) are not possible.</p>
<p>All values of the <cite>Categorical</cite> are either in <cite>levels</cite> or <cite>np.nan</cite>. Order is defined by
the order of the <cite>levels</cite>, not lexical order of the values. Internally, the data structure
consists of a levels array and an integer array of level_codes which point to the real value in the
levels array.</p>
<p><cite>Categoricals</cite> are useful in the following cases:</p>
<ul class="simple">
<li>A string variable consisting of only a few different values. Converting such a string
variable to a categorical variable will save some memory.</li>
<li>The lexical order of a variable is not the same as the logical order (“one”, “two”, “three”).
By converting to a categorical and specifying an order on the levels, sorting and
min/max will use the logical order instead of the lexical order.</li>
<li>As a signal to other python libraries that this column should be treated as a categorical
variable (e.g. to use suitable statistical methods or plot types)</li>
</ul>
<p>See also the <a class="reference internal" href="api.html#api-categorical"><em>API docs on Categoricals</em></a>.</p>
<div class="section" id="object-creation">
<h2>Object Creation<a class="headerlink" href="#object-creation" title="Permalink to this headline">¶</a></h2>
<p>Categorical <cite>Series</cite> or columns in a <cite>DataFrame</cite> can be crated in several ways:</p>
<p>By passing a <cite>Categorical</cite> object to a <cite>Series</cite> or assigning it to a <cite>DataFrame</cite>:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [1]: </span><span class="n">raw_cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">])</span>
<span class="gp">In [2]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">raw_cat</span><span class="p">)</span>
<span class="gp">In [3]: </span><span class="n">s</span>
<span class="gr">Out[3]: </span>
<span class="go">0 a</span>
<span class="go">1 b</span>
<span class="go">2 c</span>
<span class="go">3 a</span>
<span class="go">dtype: category</span>
<span class="gp">In [4]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"A"</span><span class="p">:[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">]})</span>
<span class="gp">In [5]: </span><span class="n">df</span><span class="p">[</span><span class="s">"B"</span><span class="p">]</span> <span class="o">=</span> <span class="n">raw_cat</span>
<span class="gp">In [6]: </span><span class="n">df</span>
<span class="gr">Out[6]: </span>
<span class="go"> A B</span>
<span class="go">0 a a</span>
<span class="go">1 b b</span>
<span class="go">2 c c</span>
<span class="go">3 a a</span>
</pre></div>
</div>
<p>By converting an existing <cite>Series</cite> or column to a <tt class="docutils literal"><span class="pre">category</span></tt> type:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [7]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"A"</span><span class="p">:[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">]})</span>
<span class="gp">In [8]: </span><span class="n">df</span><span class="p">[</span><span class="s">"B"</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="s">"A"</span><span class="p">]</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="s">'category'</span><span class="p">)</span>
<span class="gp">In [9]: </span><span class="n">df</span>
<span class="gr">Out[9]: </span>
<span class="go"> A B</span>
<span class="go">0 a a</span>
<span class="go">1 b b</span>
<span class="go">2 c c</span>
<span class="go">3 a a</span>
</pre></div>
</div>
<p>By using some special functions:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [10]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">'value'</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">,</span> <span class="mi">20</span><span class="p">)})</span>
<span class="gp">In [11]: </span><span class="n">labels</span> <span class="o">=</span> <span class="p">[</span> <span class="s">"{0} - {1}"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">i</span> <span class="o">+</span> <span class="mi">9</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span> <span class="p">]</span>
<span class="gp">In [12]: </span><span class="n">df</span><span class="p">[</span><span class="s">'group'</span><span class="p">]</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">cut</span><span class="p">(</span><span class="n">df</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">105</span><span class="p">,</span> <span class="mi">10</span><span class="p">),</span> <span class="n">right</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">labels</span><span class="o">=</span><span class="n">labels</span><span class="p">)</span>
<span class="gp">In [13]: </span><span class="n">df</span><span class="o">.</span><span class="n">head</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
<span class="gr">Out[13]: </span>
<span class="go"> value group</span>
<span class="go">0 65 60 - 69</span>
<span class="go">1 49 40 - 49</span>
<span class="go">2 56 50 - 59</span>
<span class="go">3 43 40 - 49</span>
<span class="go">4 43 40 - 49</span>
<span class="go">5 91 90 - 99</span>
<span class="go">6 32 30 - 39</span>
<span class="go">7 87 80 - 89</span>
<span class="go">8 36 30 - 39</span>
<span class="go">9 8 0 - 9</span>
</pre></div>
</div>
<p><cite>Categoricals</cite> have a specific <tt class="docutils literal"><span class="pre">category</span></tt> <a class="reference internal" href="basics.html#basics-dtypes"><em>dtype</em></a>:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [14]: </span><span class="n">df</span><span class="o">.</span><span class="n">dtypes</span>
<span class="gr">Out[14]: </span>
<span class="go">value int32</span>
<span class="go">group category</span>
<span class="go">dtype: object</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In contrast to R’s <cite>factor</cite> function, a <cite>Categorical</cite> is not converting input values to
string and levels will end up the same data type as the original values.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">I contrast to R’s <cite>factor</cite> function, there is currently no way to assign/change labels at
creation time. Use <cite>levels</cite> to change the levels after creation time.</p>
</div>
<p>To get back to the original Series or <cite>numpy</cite> array, use <tt class="docutils literal"><span class="pre">Series.astype(original_dtype)</span></tt> or
<tt class="docutils literal"><span class="pre">np.asarray(categorical)</span></tt>:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [15]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">])</span>
<span class="gp">In [16]: </span><span class="n">s</span>
<span class="gr">Out[16]: </span>
<span class="go">0 a</span>
<span class="go">1 b</span>
<span class="go">2 c</span>
<span class="go">3 a</span>
<span class="go">dtype: object</span>
<span class="gp">In [17]: </span><span class="n">s2</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="s">'category'</span><span class="p">)</span>
<span class="gp">In [18]: </span><span class="n">s2</span>
<span class="gr">Out[18]: </span>
<span class="go">0 a</span>
<span class="go">1 b</span>
<span class="go">2 c</span>
<span class="go">3 a</span>
<span class="go">dtype: category</span>
<span class="gp">In [19]: </span><span class="n">s3</span> <span class="o">=</span> <span class="n">s2</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="s">'string'</span><span class="p">)</span>
<span class="gp">In [20]: </span><span class="n">s3</span>
<span class="gr">Out[20]: </span>
<span class="go">0 a</span>
<span class="go">1 b</span>
<span class="go">2 c</span>
<span class="go">3 a</span>
<span class="go">dtype: object</span>
<span class="gp">In [21]: </span><span class="n">np</span><span class="o">.</span><span class="n">asarray</span><span class="p">(</span><span class="n">s2</span><span class="o">.</span><span class="n">cat</span><span class="p">)</span>
<span class="gr">Out[21]: </span><span class="n">array</span><span class="p">([</span><span class="s">'a'</span><span class="p">,</span> <span class="s">'b'</span><span class="p">,</span> <span class="s">'c'</span><span class="p">,</span> <span class="s">'a'</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="nb">object</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="working-with-levels">
<h2>Working with levels<a class="headerlink" href="#working-with-levels" title="Permalink to this headline">¶</a></h2>
<p><cite>Categoricals</cite> have a <cite>levels</cite> property, which list their possible values. If you don’t
manually specify levels, they are inferred from the passed in values. <cite>Series</cite> of type
<tt class="docutils literal"><span class="pre">category</span></tt> expose the same interface via their <cite>cat</cite> property.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [22]: </span><span class="n">raw_cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">])</span>
<span class="gp">In [23]: </span><span class="n">raw_cat</span><span class="o">.</span><span class="n">levels</span>
<span class="gr">Out[23]: </span><span class="n">Index</span><span class="p">([</span><span class="s">u'a'</span><span class="p">,</span> <span class="s">u'b'</span><span class="p">,</span> <span class="s">u'c'</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'object'</span><span class="p">)</span>
<span class="gp">In [24]: </span><span class="n">raw_cat</span><span class="o">.</span><span class="n">ordered</span>
<span class="gr">Out[24]: </span><span class="bp">True</span>
<span class="c"># Series of type "category" also expose these interface via the .cat property:</span>
<span class="gp">In [25]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">raw_cat</span><span class="p">)</span>
<span class="gp">In [26]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span>
<span class="gr">Out[26]: </span><span class="n">Index</span><span class="p">([</span><span class="s">u'a'</span><span class="p">,</span> <span class="s">u'b'</span><span class="p">,</span> <span class="s">u'c'</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'object'</span><span class="p">)</span>
<span class="gp">In [27]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">ordered</span>
<span class="gr">Out[27]: </span><span class="bp">True</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">New <cite>Categorical</cite> are automatically ordered if the passed in values are sortable or a
<cite>levels</cite> argument is supplied. This is a difference to R’s <cite>factors</cite>, which are unordered
unless explicitly told to be ordered (<tt class="docutils literal"><span class="pre">ordered=TRUE</span></tt>).</p>
</div>
<p>It’s also possible to pass in the levels in a specific order:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [28]: </span><span class="n">raw_cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"c"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"a"</span><span class="p">])</span>
<span class="gp">In [29]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">raw_cat</span><span class="p">)</span>
<span class="gp">In [30]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span>
<span class="gr">Out[30]: </span><span class="n">Index</span><span class="p">([</span><span class="s">u'c'</span><span class="p">,</span> <span class="s">u'b'</span><span class="p">,</span> <span class="s">u'a'</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'object'</span><span class="p">)</span>
<span class="gp">In [31]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">ordered</span>
<span class="gr">Out[31]: </span><span class="bp">True</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Passing in a <cite>levels</cite> argument implies <tt class="docutils literal"><span class="pre">ordered=True</span></tt>.</p>
</div>
<p>Any value omitted in the levels argument will be replaced by <cite>np.nan</cite>:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [32]: </span><span class="n">raw_cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">])</span>
<span class="gp">In [33]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">raw_cat</span><span class="p">)</span>
<span class="gp">In [34]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span>
<span class="gr">Out[34]: </span><span class="n">Index</span><span class="p">([</span><span class="s">u'a'</span><span class="p">,</span> <span class="s">u'b'</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'object'</span><span class="p">)</span>
<span class="gp">In [35]: </span><span class="n">s</span>
<span class="gr">Out[35]: </span>
<span class="go">0 a</span>
<span class="go">1 b</span>
<span class="go">2 NaN</span>
<span class="go">3 a</span>
<span class="go">dtype: category</span>
</pre></div>
</div>
<p>Renaming levels is done by assigning new values to the <tt class="docutils literal"><span class="pre">Category.levels</span></tt> or
<tt class="docutils literal"><span class="pre">Series.cat.levels</span></tt> property:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [36]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">]))</span>
<span class="gp">In [37]: </span><span class="n">s</span>
<span class="gr">Out[37]: </span>
<span class="go">0 a</span>
<span class="go">1 b</span>
<span class="go">2 c</span>
<span class="go">3 a</span>
<span class="go">dtype: category</span>
<span class="gp">In [38]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="s">"Group </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="n">g</span> <span class="k">for</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span><span class="p">]</span>
<span class="gp">In [39]: </span><span class="n">s</span>
<span class="gr">Out[39]: </span>
<span class="go">0 Group a</span>
<span class="go">1 Group b</span>
<span class="go">2 Group c</span>
<span class="go">3 Group a</span>
<span class="go">dtype: category</span>
<span class="gp">In [40]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span>
<span class="gp">In [41]: </span><span class="n">s</span>
<span class="gr">Out[41]: </span>
<span class="go">0 1</span>
<span class="go">1 2</span>
<span class="go">2 3</span>
<span class="go">3 1</span>
<span class="go">dtype: category</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">I contrast to R’s <cite>factor</cite> function, a <cite>Categorical</cite> can have levels of other types than
string.</p>
</div>
<p>Levels must be unique or a <cite>ValueError</cite> is raised:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [42]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> ....:</span> <span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
<span class="gp"> ....:</span> <span class="k">except</span> <span class="ne">ValueError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> ....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"ValueError: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> ....:</span>
<span class="go">ValueError: Categorical levels must be unique</span>
</pre></div>
</div>
<p>Appending a level can be done by assigning a levels list longer than the current levels:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [43]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]</span>
<span class="gp">In [44]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span>
<span class="gr">Out[44]: </span><span class="n">Int64Index</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'int64'</span><span class="p">)</span>
<span class="gp">In [45]: </span><span class="n">s</span>
<span class="gr">Out[45]: </span>
<span class="go">0 1</span>
<span class="go">1 2</span>
<span class="go">2 3</span>
<span class="go">3 1</span>
<span class="go">dtype: category</span>
</pre></div>
</div>
<p>Removing a level is also possible, but only the last level(s) can be removed by assigning a
shorter list than current levels. Values which are omitted are replaced by <cite>np.nan</cite>.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [46]: </span><span class="n">s</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">]</span>
<span class="gp">In [47]: </span><span class="n">s</span>
<span class="gr">Out[47]: </span>
<span class="go">0 1</span>
<span class="go">1 2</span>
<span class="go">2 3</span>
<span class="go">3 1</span>
<span class="go">dtype: category</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">It’s only possible to remove or add a level at the last position. If that’s not where you want
to remove an old or add a new level, use <tt class="docutils literal"><span class="pre">Category.reorder_levels(new_order)</span></tt> or
<tt class="docutils literal"><span class="pre">Series.cat.reorder_levels(new_order)</span></tt> methods before or after.</p>
</div>
<p>Removing unused levels can also be done:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [48]: </span><span class="n">raw</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"a"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"d"</span><span class="p">])</span>
<span class="gp">In [49]: </span><span class="n">c</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">raw</span><span class="p">)</span>
<span class="gp">In [50]: </span><span class="n">raw</span>
<span class="gr">Out[50]: </span>
<span class="go"> a</span>
<span class="go"> b</span>
<span class="go"> a</span>
<span class="go">Levels (4): Index(['a', 'b', 'c', 'd'], dtype=object), ordered</span>
<span class="gp">In [51]: </span><span class="n">raw</span><span class="o">.</span><span class="n">remove_unused_levels</span><span class="p">()</span>
<span class="gp">In [52]: </span><span class="n">raw</span>
<span class="gr">Out[52]: </span>
<span class="go"> a</span>
<span class="go"> b</span>
<span class="go"> a</span>
<span class="go">Levels (2): Index(['a', 'b'], dtype=object), ordered</span>
<span class="gp">In [53]: </span><span class="n">c</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">remove_unused_levels</span><span class="p">()</span>
<span class="gp">In [54]: </span><span class="n">c</span>
<span class="gr">Out[54]: </span>
<span class="go">0 a</span>
<span class="go">1 b</span>
<span class="go">2 a</span>
<span class="go">dtype: category</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In contrast to R’s <cite>factor</cite> function, passing a <cite>Categorical</cite> as the sole input to the
<cite>Categorical</cite> constructor will <em>not</em> remove unused levels but create a new <cite>Categorical</cite>
which is equal to the passed in one!</p>
</div>
</div>
<div class="section" id="ordered-or-not">
<h2>Ordered or not...<a class="headerlink" href="#ordered-or-not" title="Permalink to this headline">¶</a></h2>
<p>If a <cite>Categoricals</cite> is ordered (<tt class="docutils literal"><span class="pre">cat.ordered</span> <span class="pre">==</span> <span class="pre">True</span></tt>), then the order of the levels has a
meaning and certain operations are possible. If the categorical is unordered, a <cite>TypeError</cite> is
raised.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [55]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">],</span> <span class="n">ordered</span><span class="o">=</span><span class="bp">False</span><span class="p">))</span>
<span class="gp">In [56]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> ....:</span> <span class="n">s</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
<span class="gp"> ....:</span> <span class="k">except</span> <span class="ne">TypeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> ....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"TypeError: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> ....:</span>
<span class="go">TypeError: Categorical not ordered</span>
<span class="gp">In [57]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">],</span> <span class="n">ordered</span><span class="o">=</span><span class="bp">True</span><span class="p">))</span>
<span class="gp">In [58]: </span><span class="n">s</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
<span class="gp">In [59]: </span><span class="n">s</span>
<span class="gr">Out[59]: </span>
<span class="go">0 a</span>
<span class="go">3 a</span>
<span class="go">1 b</span>
<span class="go">2 c</span>
<span class="go">dtype: category</span>
<span class="gp">In [60]: </span><span class="k">print</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">min</span><span class="p">(),</span> <span class="n">s</span><span class="o">.</span><span class="n">max</span><span class="p">())</span>
<span class="go">('a', 'c')</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><tt class="docutils literal"><span class="pre">ordered=True</span></tt> is not necessary needed in the second case, as lists of strings are sortable
and so the resulting <cite>Categorical</cite> is ordered.</p>
</div>
<p>Sorting will use the order defined by levels, not any lexical order present on the data type.
This is even true for strings and numeric data:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [61]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">]))</span>
<span class="gp">In [62]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
<span class="gp">In [63]: </span><span class="n">s</span>
<span class="gr">Out[63]: </span>
<span class="go">0 2</span>
<span class="go">1 3</span>
<span class="go">2 1</span>
<span class="go">3 2</span>
<span class="go">dtype: category</span>
<span class="gp">In [64]: </span><span class="n">s</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
<span class="gp">In [65]: </span><span class="n">s</span>
<span class="gr">Out[65]: </span>
<span class="go">0 2</span>
<span class="go">3 2</span>
<span class="go">1 3</span>
<span class="go">2 1</span>
<span class="go">dtype: category</span>
<span class="gp">In [66]: </span><span class="k">print</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">min</span><span class="p">(),</span> <span class="n">s</span><span class="o">.</span><span class="n">max</span><span class="p">())</span>
<span class="go">(2, 1)</span>
</pre></div>
</div>
<p>Reordering the levels is possible via the <tt class="docutils literal"><span class="pre">Categorical.reorder_levels(new_levels)</span></tt> or
<tt class="docutils literal"><span class="pre">Series.cat.reorder_levels(new_levels)</span></tt> methods:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [67]: </span><span class="n">s2</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">]))</span>
<span class="gp">In [68]: </span><span class="n">s2</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">reorder_levels</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">])</span>
<span class="gp">In [69]: </span><span class="n">s2</span>
<span class="gr">Out[69]: </span>
<span class="go">0 1</span>
<span class="go">1 2</span>
<span class="go">2 3</span>
<span class="go">3 1</span>
<span class="go">dtype: category</span>
<span class="gp">In [70]: </span><span class="n">s2</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
<span class="gp">In [71]: </span><span class="n">s2</span>
<span class="gr">Out[71]: </span>
<span class="go">1 2</span>
<span class="go">2 3</span>
<span class="go">0 1</span>
<span class="go">3 1</span>
<span class="go">dtype: category</span>
<span class="gp">In [72]: </span><span class="k">print</span><span class="p">(</span><span class="n">s2</span><span class="o">.</span><span class="n">min</span><span class="p">(),</span> <span class="n">s2</span><span class="o">.</span><span class="n">max</span><span class="p">())</span>
<span class="go">(2, 1)</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Note the difference between assigning new level names and reordering the levels: the first
renames levels and therefore the individual values in the <cite>Series</cite>, but if the first
position was sorted last, the renamed value will still be sorted last. Reordering means that the
way values are sorted is different afterwards, but not that individual values in the
<cite>Series</cite> are changed.</p>
</div>
</div>
<div class="section" id="operations">
<h2>Operations<a class="headerlink" href="#operations" title="Permalink to this headline">¶</a></h2>
<p>The following operations are possible with categorical data:</p>
<p>Getting the minimum and maximum, if the categorical is ordered:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [73]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"d"</span><span class="p">]))</span>
<span class="gp">In [74]: </span><span class="k">print</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">min</span><span class="p">(),</span> <span class="n">s</span><span class="o">.</span><span class="n">max</span><span class="p">())</span>
<span class="go">('c', 'b')</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If the <cite>Categorical</cite> is not ordered, <tt class="docutils literal"><span class="pre">Categorical.min()</span></tt> and <tt class="docutils literal"><span class="pre">Categorical.max()</span></tt> and the
corresponding operations on <cite>Series</cite> will raise <cite>TypeError</cite>.</p>
</div>
<p>The mode:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [75]: </span><span class="n">raw_cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"c"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"d"</span><span class="p">])</span>
<span class="gp">In [76]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">raw_cat</span><span class="p">)</span>
<span class="gp">In [77]: </span><span class="n">raw_cat</span><span class="o">.</span><span class="n">mode</span><span class="p">()</span>
<span class="gr">Out[77]: </span>
<span class="go"> c</span>
<span class="go">Levels (4): Index(['c', 'a', 'b', 'd'], dtype=object), ordered</span>
<span class="gp">In [78]: </span><span class="n">s</span><span class="o">.</span><span class="n">mode</span><span class="p">()</span>
<span class="gr">Out[78]: </span>
<span class="go">0 c</span>
<span class="go">dtype: category</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Numeric operations like <tt class="docutils literal"><span class="pre">+</span></tt>, <tt class="docutils literal"><span class="pre">-</span></tt>, <tt class="docutils literal"><span class="pre">*</span></tt>, <tt class="docutils literal"><span class="pre">/</span></tt> and operations based on them (e.g.
<tt class="docutils literal"><span class="pre">.median()</span></tt>, which would need to compute the mean between two values if the length of an
array is even) do not work and raise a <cite>TypeError</cite>.</p>
</div>
<p><cite>Series</cite> methods like <cite>Series.value_counts()</cite> will use all levels, even if some levels are not
present in the data:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [79]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"c"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"d"</span><span class="p">]))</span>
<span class="gp">In [80]: </span><span class="n">s</span><span class="o">.</span><span class="n">value_counts</span><span class="p">()</span>
<span class="gr">Out[80]: </span>
<span class="go">c 2</span>
<span class="go">b 1</span>
<span class="go">a 1</span>
<span class="go">d 0</span>
<span class="go">dtype: int64</span>
</pre></div>
</div>
<p>Groupby will also show “unused” levels:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [81]: </span><span class="n">cats</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"c"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"d"</span><span class="p">])</span>
<span class="gp">In [82]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"cats"</span><span class="p">:</span><span class="n">cats</span><span class="p">,</span><span class="s">"values"</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">]})</span>
<span class="gp">In [83]: </span><span class="n">df</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s">"cats"</span><span class="p">)</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span>
<span class="gr">Out[83]: </span>
<span class="go"> values</span>
<span class="go">cats </span>
<span class="go">a 1</span>
<span class="go">b 2</span>
<span class="go">c 4</span>
<span class="go">d NaN</span>
<span class="gp">In [84]: </span><span class="n">cats2</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"b"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">])</span>
<span class="gp">In [85]: </span><span class="n">df2</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"cats"</span><span class="p">:</span><span class="n">cats2</span><span class="p">,</span><span class="s">"B"</span><span class="p">:[</span><span class="s">"c"</span><span class="p">,</span><span class="s">"d"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"d"</span><span class="p">],</span> <span class="s">"values"</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]})</span>
<span class="c"># This doesn't work yet with two columns -> see failing unittests</span>
<span class="gp">In [86]: </span><span class="n">df2</span><span class="o">.</span><span class="n">groupby</span><span class="p">([</span><span class="s">"cats"</span><span class="p">,</span><span class="s">"B"</span><span class="p">])</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span>
<span class="gr">Out[86]: </span>
<span class="go"> values</span>
<span class="go">cats B </span>
<span class="go">a c 1</span>
<span class="go"> d 2</span>
<span class="go">b c 3</span>
<span class="go"> d 4</span>
</pre></div>
</div>
<p>Pivot tables:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [87]: </span><span class="n">raw_cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"b"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">])</span>
<span class="gp">In [88]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"A"</span><span class="p">:</span><span class="n">raw_cat</span><span class="p">,</span><span class="s">"B"</span><span class="p">:[</span><span class="s">"c"</span><span class="p">,</span><span class="s">"d"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"d"</span><span class="p">],</span> <span class="s">"values"</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]})</span>
<span class="gp">In [89]: </span><span class="n">pd</span><span class="o">.</span><span class="n">pivot_table</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">values</span><span class="o">=</span><span class="s">'values'</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="p">[</span><span class="s">'A'</span><span class="p">,</span> <span class="s">'B'</span><span class="p">])</span>
<span class="gr">Out[89]: </span>
<span class="go">A B</span>
<span class="go">a c 1</span>
<span class="go"> d 2</span>
<span class="go">b c 3</span>
<span class="go"> d 4</span>
<span class="go">Name: values, dtype: int64</span>
</pre></div>
</div>
</div>
<div class="section" id="data-munging">
<h2>Data munging<a class="headerlink" href="#data-munging" title="Permalink to this headline">¶</a></h2>
<p>The optimized pandas data access methods <tt class="docutils literal"><span class="pre">.loc</span></tt>, <tt class="docutils literal"><span class="pre">.iloc</span></tt>, <tt class="docutils literal"><span class="pre">.ix</span></tt> <tt class="docutils literal"><span class="pre">.at</span></tt>, and <tt class="docutils literal"><span class="pre">.iat</span></tt>,
work as normal, the only difference is the return type (for getting) and
that only values already in the levels can be assigned.</p>
<div class="section" id="getting">
<h3>Getting<a class="headerlink" href="#getting" title="Permalink to this headline">¶</a></h3>
<p>If the slicing operation returns either a <cite>DataFrame</cite> or a a column of type <cite>Series</cite>,
the <tt class="docutils literal"><span class="pre">category</span></tt> dtype is preserved.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [90]: </span><span class="n">cats</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"c"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">])</span>
<span class="gp">In [91]: </span><span class="n">idx</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Index</span><span class="p">([</span><span class="s">"h"</span><span class="p">,</span><span class="s">"i"</span><span class="p">,</span><span class="s">"j"</span><span class="p">,</span><span class="s">"k"</span><span class="p">,</span><span class="s">"l"</span><span class="p">,</span><span class="s">"m"</span><span class="p">,</span><span class="s">"n"</span><span class="p">,])</span>
<span class="gp">In [92]: </span><span class="n">values</span><span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">]</span>
<span class="gp">In [93]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"cats"</span><span class="p">:</span><span class="n">cats</span><span class="p">,</span><span class="s">"values"</span><span class="p">:</span><span class="n">values</span><span class="p">},</span> <span class="n">index</span><span class="o">=</span><span class="n">idx</span><span class="p">)</span>
<span class="gp">In [94]: </span><span class="n">df</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">2</span><span class="p">:</span><span class="mi">4</span><span class="p">,:]</span>
<span class="gr">Out[94]: </span>
<span class="go"> cats values</span>
<span class="go">j b 2</span>
<span class="go">k b 2</span>
<span class="gp">In [95]: </span><span class="n">df</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">2</span><span class="p">:</span><span class="mi">4</span><span class="p">,:]</span><span class="o">.</span><span class="n">dtypes</span>
<span class="gr">Out[95]: </span>
<span class="go">cats category</span>
<span class="go">values int64</span>
<span class="go">dtype: object</span>
<span class="gp">In [96]: </span><span class="n">df</span><span class="o">.</span><span class="n">loc</span><span class="p">[</span><span class="s">"h"</span><span class="p">:</span><span class="s">"j"</span><span class="p">,</span><span class="s">"cats"</span><span class="p">]</span>
<span class="gr">Out[96]: </span>
<span class="go">h a</span>
<span class="go">i b</span>
<span class="go">j b</span>
<span class="go">Name: cats, dtype: category</span>
<span class="gp">In [97]: </span><span class="n">df</span><span class="o">.</span><span class="n">ix</span><span class="p">[</span><span class="s">"h"</span><span class="p">:</span><span class="s">"j"</span><span class="p">,</span><span class="mi">0</span><span class="p">:</span><span class="mi">1</span><span class="p">]</span>
<span class="gr">Out[97]: </span>
<span class="go"> cats</span>
<span class="go">h a</span>
<span class="go">i b</span>
<span class="go">j b</span>
<span class="gp">In [98]: </span><span class="n">df</span><span class="p">[</span><span class="n">df</span><span class="p">[</span><span class="s">"cats"</span><span class="p">]</span> <span class="o">==</span> <span class="s">"b"</span><span class="p">]</span>
<span class="gr">Out[98]: </span>
<span class="go"> cats values</span>
<span class="go">i b 2</span>
<span class="go">j b 2</span>
<span class="go">k b 2</span>
</pre></div>
</div>
<p>An example where the <cite>Categorical</cite> is not preserved is if you take one single row: the
resulting <cite>Series</cite> is of dtype <tt class="docutils literal"><span class="pre">object</span></tt>:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="c"># get the complete "h" row as a Series</span>
<span class="gp">In [99]: </span><span class="n">df</span><span class="o">.</span><span class="n">loc</span><span class="p">[</span><span class="s">"h"</span><span class="p">,</span> <span class="p">:]</span>
<span class="gr">Out[99]: </span>
<span class="go">cats a</span>
<span class="go">values 1</span>
<span class="go">Name: h, dtype: object</span>
</pre></div>
</div>
<p>Returning a single item from a <cite>Categorical</cite> will also return the value, not a <cite>Categorical</cite>
of length “1”.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [100]: </span><span class="n">df</span><span class="o">.</span><span class="n">iat</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">]</span>
<span class="gr">Out[100]: </span><span class="s">'a'</span>
<span class="gp">In [101]: </span><span class="n">df</span><span class="p">[</span><span class="s">"cats"</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="s">"x"</span><span class="p">,</span><span class="s">"y"</span><span class="p">,</span><span class="s">"z"</span><span class="p">]</span>
<span class="gp">In [102]: </span><span class="n">df</span><span class="o">.</span><span class="n">at</span><span class="p">[</span><span class="s">"h"</span><span class="p">,</span><span class="s">"cats"</span><span class="p">]</span> <span class="c"># returns a string</span>
<span class="gr">Out[102]: </span><span class="s">'x'</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This is a difference to R’s <cite>factor</cite> function, where <tt class="docutils literal"><span class="pre">factor(c(1,2,3))[1]</span></tt>
returns a single value <cite>factor</cite>.</p>
</div>
<p>To get a single value <cite>Series</cite> of type <tt class="docutils literal"><span class="pre">category</span></tt> pass in a single value list:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [103]: </span><span class="n">df</span><span class="o">.</span><span class="n">loc</span><span class="p">[[</span><span class="s">"h"</span><span class="p">],</span><span class="s">"cats"</span><span class="p">]</span>
<span class="gr">Out[103]: </span>
<span class="go">h x</span>
<span class="go">Name: cats, dtype: category</span>
</pre></div>
</div>
</div>
<div class="section" id="setting">
<h3>Setting<a class="headerlink" href="#setting" title="Permalink to this headline">¶</a></h3>
<p>Setting values in a categorical column (or <cite>Series</cite>) works as long as the value is included in the
<cite>levels</cite>:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [104]: </span><span class="n">cats</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">])</span>
<span class="gp">In [105]: </span><span class="n">idx</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Index</span><span class="p">([</span><span class="s">"h"</span><span class="p">,</span><span class="s">"i"</span><span class="p">,</span><span class="s">"j"</span><span class="p">,</span><span class="s">"k"</span><span class="p">,</span><span class="s">"l"</span><span class="p">,</span><span class="s">"m"</span><span class="p">,</span><span class="s">"n"</span><span class="p">])</span>
<span class="gp">In [106]: </span><span class="n">values</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
<span class="gp">In [107]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"cats"</span><span class="p">:</span><span class="n">cats</span><span class="p">,</span><span class="s">"values"</span><span class="p">:</span><span class="n">values</span><span class="p">},</span> <span class="n">index</span><span class="o">=</span><span class="n">idx</span><span class="p">)</span>
<span class="gp">In [108]: </span><span class="n">df</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">2</span><span class="p">:</span><span class="mi">4</span><span class="p">,:]</span> <span class="o">=</span> <span class="p">[[</span><span class="s">"b"</span><span class="p">,</span><span class="mi">2</span><span class="p">],[</span><span class="s">"b"</span><span class="p">,</span><span class="mi">2</span><span class="p">]]</span>
<span class="gp">In [109]: </span><span class="n">df</span>
<span class="gr">Out[109]: </span>
<span class="go"> cats values</span>
<span class="go">h a 1</span>
<span class="go">i a 1</span>
<span class="go">j b 2</span>
<span class="go">k b 2</span>
<span class="go">l a 1</span>
<span class="go">m a 1</span>
<span class="go">n a 1</span>
<span class="gp">In [110]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="n">df</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">2</span><span class="p">:</span><span class="mi">4</span><span class="p">,:]</span> <span class="o">=</span> <span class="p">[[</span><span class="s">"c"</span><span class="p">,</span><span class="mi">3</span><span class="p">],[</span><span class="s">"c"</span><span class="p">,</span><span class="mi">3</span><span class="p">]]</span>
<span class="gp"> .....:</span> <span class="k">except</span> <span class="ne">ValueError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"ValueError: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> .....:</span>
<span class="go">ValueError: cannot setitem on a Categorical with a new level, set the levels first</span>
</pre></div>
</div>
<p>Setting values by assigning a <cite>Categorical</cite> will also check that the <cite>levels</cite> match:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [111]: </span><span class="n">df</span><span class="o">.</span><span class="n">loc</span><span class="p">[</span><span class="s">"j"</span><span class="p">:</span><span class="s">"k"</span><span class="p">,</span><span class="s">"cats"</span><span class="p">]</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">])</span>
<span class="gp">In [112]: </span><span class="n">df</span>
<span class="gr">Out[112]: </span>
<span class="go"> cats values</span>
<span class="go">h a 1</span>
<span class="go">i a 1</span>
<span class="go">j a 2</span>
<span class="go">k a 2</span>
<span class="go">l a 1</span>
<span class="go">m a 1</span>
<span class="go">n a 1</span>
<span class="gp">In [113]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="n">df</span><span class="o">.</span><span class="n">loc</span><span class="p">[</span><span class="s">"j"</span><span class="p">:</span><span class="s">"k"</span><span class="p">,</span><span class="s">"cats"</span><span class="p">]</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"b"</span><span class="p">,</span><span class="s">"b"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">])</span>
<span class="gp"> .....:</span> <span class="k">except</span> <span class="ne">ValueError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"ValueError: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> .....:</span>
<span class="go">ValueError: cannot set a Categorical with another, without identical levels</span>
</pre></div>
</div>
<p>Assigning a <cite>Categorical</cite> to parts of a column of other types will use the values:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [114]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"a"</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">],</span> <span class="s">"b"</span><span class="p">:[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">,</span><span class="s">"a"</span><span class="p">]})</span>
<span class="gp">In [115]: </span><span class="n">df</span><span class="o">.</span><span class="n">loc</span><span class="p">[</span><span class="mi">1</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="s">"a"</span><span class="p">]</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"b"</span><span class="p">,</span><span class="s">"b"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">])</span>
<span class="gp">In [116]: </span><span class="n">df</span><span class="o">.</span><span class="n">loc</span><span class="p">[</span><span class="mi">2</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="s">"b"</span><span class="p">]</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"b"</span><span class="p">,</span><span class="s">"b"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">])</span>
<span class="gp">In [117]: </span><span class="n">df</span>
<span class="gr">Out[117]: </span>
<span class="go"> a b</span>
<span class="go">0 1 a</span>
<span class="go">1 b a</span>
<span class="go">2 b b</span>
<span class="go">3 1 b</span>
<span class="go">4 1 a</span>
<span class="gp">In [118]: </span><span class="n">df</span><span class="o">.</span><span class="n">dtypes</span>
<span class="gr">Out[118]: </span>
<span class="go">a object</span>
<span class="go">b object</span>
<span class="go">dtype: object</span>
</pre></div>
</div>
</div>
<div class="section" id="merging">
<h3>Merging<a class="headerlink" href="#merging" title="Permalink to this headline">¶</a></h3>
<p>You can concat two <cite>DataFrames</cite> containing categorical data together,
but the levels of these <cite>Categoricals</cite> need to be the same:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [119]: </span><span class="n">cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">])</span>
<span class="gp">In [120]: </span><span class="n">vals</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">]</span>
<span class="gp">In [121]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"cats"</span><span class="p">:</span><span class="n">cat</span><span class="p">,</span> <span class="s">"vals"</span><span class="p">:</span><span class="n">vals</span><span class="p">})</span>
<span class="gp">In [122]: </span><span class="n">res</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">([</span><span class="n">df</span><span class="p">,</span><span class="n">df</span><span class="p">])</span>
<span class="gp">In [123]: </span><span class="n">res</span>
<span class="gr">Out[123]: </span>
<span class="go"> cats vals</span>
<span class="go">0 a 1</span>
<span class="go">1 b 2</span>
<span class="go">0 a 1</span>
<span class="go">1 b 2</span>
<span class="gp">In [124]: </span><span class="n">res</span><span class="o">.</span><span class="n">dtypes</span>
<span class="gr">Out[124]: </span>
<span class="go">cats category</span>
<span class="go">vals int64</span>
<span class="go">dtype: object</span>
<span class="gp">In [125]: </span><span class="n">df_different</span> <span class="o">=</span> <span class="n">df</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="gp">In [126]: </span><span class="n">df_different</span><span class="p">[</span><span class="s">"cats"</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">]</span>
<span class="gp">In [127]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">([</span><span class="n">df</span><span class="p">,</span><span class="n">df</span><span class="p">])</span>
<span class="gp"> .....:</span> <span class="k">except</span> <span class="ne">ValueError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"ValueError: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> .....:</span>
</pre></div>
</div>
<p>The same applies to <tt class="docutils literal"><span class="pre">df.append(df)</span></tt>.</p>
</div>
</div>
<div class="section" id="getting-data-in-out">
<h2>Getting Data In/Out<a class="headerlink" href="#getting-data-in-out" title="Permalink to this headline">¶</a></h2>
<p>Writing data (<cite>Series</cite>, <cite>Frames</cite>) to a HDF store and reading it in entirety works. Querying the hdf
store does not yet work.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [128]: </span><span class="n">hdf_file</span> <span class="o">=</span> <span class="s">"test.h5"</span>
<span class="gp">In [129]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">'a'</span><span class="p">,</span> <span class="s">'b'</span><span class="p">,</span> <span class="s">'b'</span><span class="p">,</span> <span class="s">'a'</span><span class="p">,</span> <span class="s">'a'</span><span class="p">,</span> <span class="s">'c'</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="s">'a'</span><span class="p">,</span><span class="s">'b'</span><span class="p">,</span><span class="s">'c'</span><span class="p">,</span><span class="s">'d'</span><span class="p">]))</span>
<span class="gp">In [130]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"s"</span><span class="p">:</span><span class="n">s</span><span class="p">,</span> <span class="s">"vals"</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">]})</span>
<span class="gp">In [131]: </span><span class="n">df</span><span class="o">.</span><span class="n">to_hdf</span><span class="p">(</span><span class="n">hdf_file</span><span class="p">,</span> <span class="s">"frame"</span><span class="p">)</span>
<span class="gp">In [132]: </span><span class="n">df2</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_hdf</span><span class="p">(</span><span class="n">hdf_file</span><span class="p">,</span> <span class="s">"frame"</span><span class="p">)</span>
<span class="gp">In [133]: </span><span class="n">df2</span>
<span class="gr">Out[133]: </span>
<span class="go"> s vals</span>
<span class="go">0 a 1</span>
<span class="go">1 b 2</span>
<span class="go">2 b 3</span>
<span class="go">3 a 4</span>
<span class="go">4 a 5</span>
<span class="go">5 c 6</span>
<span class="gp">In [134]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_hdf</span><span class="p">(</span><span class="n">hdf_file</span><span class="p">,</span> <span class="s">"frame"</span><span class="p">,</span> <span class="n">where</span> <span class="o">=</span> <span class="p">[</span><span class="s">'index>2'</span><span class="p">])</span>
<span class="gp"> .....:</span> <span class="k">except</span> <span class="ne">TypeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"TypeError: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> .....:</span>
<span class="go">TypeError: cannot pass a where specification when reading from a Fixed format store. this store must be selected in its entirety</span>
</pre></div>
</div>
<p>Writing to a csv file will convert the data, effectively removing any information about the
<cite>Categorical</cite> (levels and ordering). So if you read back the csv file you have to convert the
relevant columns back to <cite>category</cite> and assign the right levels and level ordering.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [135]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">'a'</span><span class="p">,</span> <span class="s">'b'</span><span class="p">,</span> <span class="s">'b'</span><span class="p">,</span> <span class="s">'a'</span><span class="p">,</span> <span class="s">'a'</span><span class="p">,</span> <span class="s">'d'</span><span class="p">]))</span>
<span class="c"># rename the levels</span>
<span class="gp">In [136]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="s">"very good"</span><span class="p">,</span> <span class="s">"good"</span><span class="p">,</span> <span class="s">"bad"</span><span class="p">]</span>
<span class="c"># add new levels at the end</span>
<span class="gp">In [137]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="s">"medium"</span><span class="p">,</span> <span class="s">"very bad"</span><span class="p">]</span>
<span class="c"># reorder the levels</span>
<span class="gp">In [138]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">reorder_levels</span><span class="p">([</span><span class="s">"very bad"</span><span class="p">,</span> <span class="s">"bad"</span><span class="p">,</span> <span class="s">"medium"</span><span class="p">,</span> <span class="s">"good"</span><span class="p">,</span> <span class="s">"very good"</span><span class="p">])</span>
<span class="gp">In [139]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"s"</span><span class="p">:</span><span class="n">s</span><span class="p">,</span> <span class="s">"vals"</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">]})</span>
<span class="gp">In [140]: </span><span class="n">df</span><span class="o">.</span><span class="n">to_csv</span><span class="p">(</span><span class="n">csv_file</span><span class="p">)</span>
<span class="go">---------------------------------------------------------------------------</span>
<span class="go">IndexError Traceback (most recent call last)</span>
<span class="go"><ipython-input-140-72bb1b843e60> in <module>()</span>
<span class="go">----> 1 df.to_csv(csv_file)</span>
<span class="go">c:\data\external\pandas\pandas\util\decorators.pyc in wrapper(*args, **kwargs)</span>
<span class="go"> 58 else:</span>
<span class="go"> 59 kwargs[new_arg_name] = old_arg_value</span>
<span class="go">---> 60 return func(*args, **kwargs)</span>
<span class="go"> 61 return wrapper</span>
<span class="go"> 62 return _deprecate_kwarg</span>
<span class="go">c:\data\external\pandas\pandas\core\frame.pyc in to_csv(self, path_or_buf, sep, na_rep, float_format, columns, header, index, index_label, mode, encoding, quoting, quotechar, line_terminator, chunksize, tupleize_cols, date_format, doublequote, escapechar, **kwds)</span>
<span class="go"> 1139 doublequote=doublequote,</span>
<span class="go"> 1140 escapechar=escapechar)</span>
<span class="go">-> 1141 formatter.save()</span>
<span class="go"> 1142 </span>
<span class="go"> 1143 if path_or_buf is None:</span>
<span class="go">c:\data\external\pandas\pandas\core\format.pyc in save(self)</span>
<span class="go"> 1312 </span>
<span class="go"> 1313 else:</span>
<span class="go">-> 1314 self._save()</span>
<span class="go"> 1315 </span>
<span class="go"> 1316 finally:</span>
<span class="go">c:\data\external\pandas\pandas\core\format.pyc in _save(self)</span>
<span class="go"> 1412 break</span>
<span class="go"> 1413 </span>
<span class="go">-> 1414 self._save_chunk(start_i, end_i)</span>
<span class="go"> 1415 </span>
<span class="go"> 1416 def _save_chunk(self, start_i, end_i):</span>
<span class="go">c:\data\external\pandas\pandas\core\format.pyc in _save_chunk(self, start_i, end_i)</span>
<span class="go"> 1424 d = b.to_native_types(slicer=slicer, na_rep=self.na_rep,</span>
<span class="go"> 1425 float_format=self.float_format,</span>
<span class="go">-> 1426 date_format=self.date_format)</span>
<span class="go"> 1427 </span>
<span class="go"> 1428 for col_loc, col in zip(b.mgr_locs, d):</span>
<span class="go">c:\data\external\pandas\pandas\core\internals.pyc in to_native_types(self, slicer, na_rep, **kwargs)</span>
<span class="go"> 446 values = self.values</span>
<span class="go"> 447 if slicer is not None:</span>
<span class="go">--> 448 values = values[:, slicer]</span>
<span class="go"> 449 values = np.array(values, dtype=object)</span>
<span class="go"> 450 mask = isnull(values)</span>
<span class="go">c:\data\external\pandas\pandas\core\categorical.pyc in __getitem__(self, key)</span>
<span class="go"> 669 return self.levels[i]</span>
<span class="go"> 670 else:</span>
<span class="go">--> 671 return Categorical(values=self._codes[key], levels=self.levels,</span>
<span class="go"> 672 ordered=self.ordered, fastpath=True)</span>
<span class="go"> 673 </span>
<span class="go">IndexError: too many indices</span>
<span class="gp">In [141]: </span><span class="n">df2</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="n">csv_file</span><span class="p">)</span>
<span class="go">---------------------------------------------------------------------------</span>
<span class="go">CParserError Traceback (most recent call last)</span>
<span class="go"><ipython-input-141-8d612f40488f> in <module>()</span>
<span class="go">----> 1 df2 = pd.read_csv(csv_file)</span>
<span class="go">c:\data\external\pandas\pandas\io\parsers.pyc in parser_f(filepath_or_buffer, sep, dialect, compression, doublequote, escapechar, quotechar, quoting, skipinitialspace, lineterminator, header, index_col, names, prefix, skiprows, skipfooter, skip_footer, na_values, na_fvalues, true_values, false_values, delimiter, converters, dtype, usecols, engine, delim_whitespace, as_recarray, na_filter, compact_ints, use_unsigned, low_memory, buffer_lines, warn_bad_lines, error_bad_lines, keep_default_na, thousands, comment, decimal, parse_dates, keep_date_col, dayfirst, date_parser, memory_map, nrows, iterator, chunksize, verbose, encoding, squeeze, mangle_dupe_cols, tupleize_cols, infer_datetime_format)</span>
<span class="go"> 450 infer_datetime_format=infer_datetime_format)</span>
<span class="go"> 451 </span>
<span class="go">--> 452 return _read(filepath_or_buffer, kwds)</span>
<span class="go"> 453 </span>
<span class="go"> 454 parser_f.__name__ = name</span>
<span class="go">c:\data\external\pandas\pandas\io\parsers.pyc in _read(filepath_or_buffer, kwds)</span>
<span class="go"> 232 </span>
<span class="go"> 233 # Create the parser.</span>
<span class="go">--> 234 parser = TextFileReader(filepath_or_buffer, **kwds)</span>
<span class="go"> 235 </span>
<span class="go"> 236 if (nrows is not None) and (chunksize is not None):</span>
<span class="go">c:\data\external\pandas\pandas\io\parsers.pyc in __init__(self, f, engine, **kwds)</span>
<span class="go"> 540 self.options['has_index_names'] = kwds['has_index_names']</span>
<span class="go"> 541 </span>
<span class="go">--> 542 self._make_engine(self.engine)</span>
<span class="go"> 543 </span>
<span class="go"> 544 def _get_options_with_defaults(self, engine):</span>
<span class="go">c:\data\external\pandas\pandas\io\parsers.pyc in _make_engine(self, engine)</span>
<span class="go"> 677 def _make_engine(self, engine='c'):</span>
<span class="go"> 678 if engine == 'c':</span>
<span class="go">--> 679 self._engine = CParserWrapper(self.f, **self.options)</span>
<span class="go"> 680 else:</span>
<span class="go"> 681 if engine == 'python':</span>
<span class="go">c:\data\external\pandas\pandas\io\parsers.pyc in __init__(self, src, **kwds)</span>
<span class="go"> 1039 kwds['allow_leading_cols'] = self.index_col is not False</span>
<span class="go"> 1040 </span>
<span class="go">-> 1041 self._reader = _parser.TextReader(src, **kwds)</span>
<span class="go"> 1042 </span>
<span class="go"> 1043 # XXX</span>
<span class="go">c:\data\external\pandas\pandas\parser.pyd in pandas.parser.TextReader.__cinit__ (pandas\parser.c:4629)()</span>
<span class="go">c:\data\external\pandas\pandas\parser.pyd in pandas.parser.TextReader._get_header (pandas\parser.c:6092)()</span>
<span class="go">CParserError: Passed header=0 but only 0 lines in file</span>
<span class="gp">In [142]: </span><span class="n">df2</span><span class="o">.</span><span class="n">dtypes</span>
<span class="gr">Out[142]: </span>
<span class="go">s category</span>
<span class="go">vals int64</span>
<span class="go">dtype: object</span>
<span class="gp">In [143]: </span><span class="n">df2</span><span class="p">[</span><span class="s">"vals"</span><span class="p">]</span>
<span class="gr">Out[143]: </span>
<span class="go">0 1</span>
<span class="go">1 2</span>
<span class="go">2 3</span>
<span class="go">3 4</span>
<span class="go">4 5</span>
<span class="go">5 6</span>
<span class="go">Name: vals, dtype: int64</span>
<span class="c"># Redo the category</span>
<span class="gp">In [144]: </span><span class="n">df2</span><span class="p">[</span><span class="s">"vals"</span><span class="p">]</span> <span class="o">=</span> <span class="n">df2</span><span class="p">[</span><span class="s">"vals"</span><span class="p">]</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="s">"category"</span><span class="p">)</span>
<span class="gp">In [145]: </span><span class="n">df2</span><span class="p">[</span><span class="s">"vals"</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">df2</span><span class="p">[</span><span class="s">"vals"</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="s">"medium"</span><span class="p">,</span> <span class="s">"very bad"</span><span class="p">]</span>
<span class="gp">In [146]: </span><span class="n">df2</span><span class="p">[</span><span class="s">"vals"</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">reorder_levels</span><span class="p">([</span><span class="s">"very bad"</span><span class="p">,</span> <span class="s">"bad"</span><span class="p">,</span> <span class="s">"medium"</span><span class="p">,</span> <span class="s">"good"</span><span class="p">,</span> <span class="s">"very good"</span><span class="p">])</span>
<span class="go">---------------------------------------------------------------------------</span>
<span class="go">ValueError Traceback (most recent call last)</span>
<span class="go"><ipython-input-146-d48b87b27d90> in <module>()</span>
<span class="go">----> 1 df2["vals"].cat.reorder_levels(["very bad", "bad", "medium", "good", "very good"])</span>
<span class="go">c:\data\external\pandas\pandas\core\categorical.pyc in reorder_levels(self, new_levels, ordered)</span>
<span class="go"> 342 </span>
<span class="go"> 343 if len(new_levels) != len(self._levels):</span>
<span class="go">--> 344 raise ValueError('Reordered levels must be of same length as old levels')</span>
<span class="go"> 345 if len(new_levels-self._levels):</span>
<span class="go"> 346 raise ValueError('Reordered levels be the same as the original levels')</span>
<span class="go">ValueError: Reordered levels must be of same length as old levels</span>
<span class="gp">In [147]: </span><span class="n">df2</span><span class="o">.</span><span class="n">dtypes</span>
<span class="gr">Out[147]: </span>
<span class="go">s category</span>
<span class="go">vals category</span>
<span class="go">dtype: object</span>
<span class="gp">In [148]: </span><span class="n">df2</span><span class="p">[</span><span class="s">"vals"</span><span class="p">]</span>
<span class="gr">Out[148]: </span>
<span class="go">0 1</span>
<span class="go">1 2</span>
<span class="go">2 3</span>
<span class="go">3 4</span>
<span class="go">4 5</span>
<span class="go">5 6</span>
<span class="go">Name: vals, dtype: category</span>
</pre></div>
</div>
</div>
<div class="section" id="missing-data">
<h2>Missing Data<a class="headerlink" href="#missing-data" title="Permalink to this headline">¶</a></h2>
<p>pandas primarily uses the value <cite>np.nan</cite> to represent missing data. It is by
default not included in computations. See the <a class="reference internal" href="missing_data.html#missing-data"><em>Missing Data section</em></a></p>
<p>There are two ways a <cite>np.nan</cite> can be represented in <cite>Categorical</cite>: either the value is not
available or <cite>np.nan</cite> is a valid level.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [149]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="n">np</span><span class="o">.</span><span class="n">nan</span><span class="p">,</span><span class="s">"a"</span><span class="p">]))</span>
<span class="gp">In [150]: </span><span class="n">s</span>
<span class="gr">Out[150]: </span>
<span class="go">0 a</span>
<span class="go">1 b</span>
<span class="go">2 NaN</span>
<span class="go">3 a</span>
<span class="go">dtype: category</span>
<span class="c"># only two levels</span>
<span class="gp">In [151]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span>
<span class="gr">Out[151]: </span><span class="n">Index</span><span class="p">([</span><span class="s">u'a'</span><span class="p">,</span> <span class="s">u'b'</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'object'</span><span class="p">)</span>
<span class="gp">In [152]: </span><span class="n">s2</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"a"</span><span class="p">]))</span>
<span class="gp">In [153]: </span><span class="n">s2</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="n">np</span><span class="o">.</span><span class="n">nan</span><span class="p">]</span>
<span class="gp">In [154]: </span><span class="n">s2</span>
<span class="gr">Out[154]: </span>
<span class="go">0 1</span>
<span class="go">1 2</span>
<span class="go">2 NaN</span>
<span class="go">3 1</span>
<span class="go">dtype: category</span>
<span class="c"># three levels, np.nan included</span>
<span class="c"># Note: as int arrays can't hold NaN the levels were converted to float</span>
<span class="gp">In [155]: </span><span class="n">s2</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span>
<span class="gr">Out[155]: </span><span class="n">Float64Index</span><span class="p">([</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">,</span> <span class="n">nan</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'float64'</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="gotchas">
<h2>Gotchas<a class="headerlink" href="#gotchas" title="Permalink to this headline">¶</a></h2>
<div class="section" id="categorical-is-not-a-numpy-array">
<h3><cite>Categorical</cite> is not a <cite>numpy</cite> array<a class="headerlink" href="#categorical-is-not-a-numpy-array" title="Permalink to this headline">¶</a></h3>
<p>Currently, <cite>Categorical</cite> and the corresponding <tt class="docutils literal"><span class="pre">category</span></tt> <cite>Series</cite> is implemented as a python
object and not as a low level <cite>numpy</cite> array dtype. This leads to some problems.</p>
<p><cite>numpy</cite> itself doesn’t know about the new <cite>dtype</cite>:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [156]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="n">np</span><span class="o">.</span><span class="n">dtype</span><span class="p">(</span><span class="s">"category"</span><span class="p">)</span>
<span class="gp"> .....:</span> <span class="k">except</span> <span class="ne">TypeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"TypeError: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> .....:</span>
<span class="go">TypeError: data type "category" not understood</span>
<span class="gp">In [157]: </span><span class="n">dtype</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="s">"a"</span><span class="p">])</span><span class="o">.</span><span class="n">dtype</span>
<span class="gp">In [158]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="n">np</span><span class="o">.</span><span class="n">dtype</span><span class="p">(</span><span class="n">dtype</span><span class="p">)</span>
<span class="gp"> .....:</span> <span class="k">except</span> <span class="ne">TypeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"TypeError: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> .....:</span>
<span class="go">TypeError: data type not understood</span>
<span class="c"># dtype comparisons work:</span>
<span class="gp">In [159]: </span><span class="n">dtype</span> <span class="o">==</span> <span class="n">np</span><span class="o">.</span><span class="n">str_</span>
<span class="gr">Out[159]: </span><span class="bp">False</span>
<span class="gp">In [160]: </span><span class="n">np</span><span class="o">.</span><span class="n">str_</span> <span class="o">==</span> <span class="n">dtype</span>
<span class="gr">Out[160]: </span><span class="bp">False</span>
</pre></div>
</div>
<p>Using <cite>numpy</cite> functions on a <cite>Series</cite> of type <tt class="docutils literal"><span class="pre">category</span></tt> should not work as <cite>Categoricals</cite>
are not numeric data (even in the case that <tt class="docutils literal"><span class="pre">.levels</span></tt> is numeric).</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [161]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]))</span>
<span class="gp">In [162]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
<span class="gp"> .....:</span> <span class="k">except</span> <span class="ne">TypeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"TypeError: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> .....:</span>
<span class="go">TypeError: Categorical cannot perform the operation sum</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If such a function works, please file a bug at <a class="reference external" href="https://github.com/pydata/pandas">https://github.com/pydata/pandas</a>!</p>
</div>
</div>
<div class="section" id="side-effects">
<h3>Side effects<a class="headerlink" href="#side-effects" title="Permalink to this headline">¶</a></h3>
<p>Constructing a <cite>Series</cite> from a <cite>Categorical</cite> will not copy the input <cite>Categorical</cite>. This
means that changes to the <cite>Series</cite> will in most cases change the original <cite>Categorical</cite>:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [163]: </span><span class="n">cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">10</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">10</span><span class="p">])</span>
<span class="gp">In [164]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">cat</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">"cat"</span><span class="p">)</span>
<span class="gp">In [165]: </span><span class="n">cat</span>
<span class="gr">Out[165]: </span>
<span class="go"> 1</span>
<span class="go"> 2</span>
<span class="go"> 3</span>
<span class="go"> 10</span>
<span class="go">Levels (5): Int64Index([ 1, 2, 3, 4, 10], dtype=int64), ordered</span>
<span class="gp">In [166]: </span><span class="n">s</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">2</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10</span>
<span class="gp">In [167]: </span><span class="n">cat</span>
<span class="gr">Out[167]: </span>
<span class="go"> 10</span>
<span class="go"> 10</span>
<span class="go"> 3</span>
<span class="go"> 10</span>
<span class="go">Levels (5): Int64Index([ 1, 2, 3, 4, 10], dtype=int64), ordered</span>
<span class="gp">In [168]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
<span class="gp">In [169]: </span><span class="n">df</span><span class="p">[</span><span class="s">"cat"</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">]</span>
<span class="gp">In [170]: </span><span class="n">cat</span>
<span class="gr">Out[170]: </span>
<span class="go"> 5</span>
<span class="go"> 5</span>
<span class="go"> 3</span>
<span class="go"> 5</span>
<span class="go">Levels (5): Int64Index([1, 2, 3, 4, 5], dtype=int64), ordered</span>
</pre></div>
</div>
<p>Use <tt class="docutils literal"><span class="pre">copy=True</span></tt> to prevent such a behaviour:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [171]: </span><span class="n">cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">10</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">10</span><span class="p">])</span>
<span class="gp">In [172]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">cat</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">"cat"</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="gp">In [173]: </span><span class="n">cat</span>
<span class="gr">Out[173]: </span>
<span class="go"> 1</span>
<span class="go"> 2</span>
<span class="go"> 3</span>
<span class="go"> 10</span>
<span class="go">Levels (5): Int64Index([ 1, 2, 3, 4, 10], dtype=int64), ordered</span>
<span class="gp">In [174]: </span><span class="n">s</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">2</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10</span>
<span class="gp">In [175]: </span><span class="n">cat</span>
<span class="gr">Out[175]: </span>
<span class="go"> 1</span>
<span class="go"> 2</span>
<span class="go"> 3</span>
<span class="go"> 10</span>
<span class="go">Levels (5): Int64Index([ 1, 2, 3, 4, 10], dtype=int64), ordered</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This also happens in some cases when you supply a <cite>numpy</cite> array instea dof a <cite>Categorical</cite>:
using an int array (e.g. <tt class="docutils literal"><span class="pre">np.array([1,2,3,4])</span></tt>) will exhibit the same behaviour, but using
a string array (e.g. <tt class="docutils literal"><span class="pre">np.array(["a","b","c","a"])</span></tt>) will not.</p>
</div>
</div>
<div class="section" id="danger-of-confusion">
<h3>Danger of confusion<a class="headerlink" href="#danger-of-confusion" title="Permalink to this headline">¶</a></h3>
<p>Both <cite>Series</cite> and <cite>Categorical</cite> have a method <tt class="docutils literal"><span class="pre">.reorder_levels()</span></tt> but for different things. For
Series of type <tt class="docutils literal"><span class="pre">category</span></tt> this means that there is some danger to confuse both methods.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [176]: </span><span class="n">s</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]))</span>
<span class="gp">In [177]: </span><span class="k">print</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span><span class="p">)</span>
<span class="go">Int64Index([1, 2, 3, 4], dtype='int64')</span>
<span class="c"># wrong and raises an error:</span>
<span class="gp">In [178]: </span><span class="k">try</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="n">s</span><span class="o">.</span><span class="n">reorder_levels</span><span class="p">([</span><span class="mi">4</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">1</span><span class="p">])</span>
<span class="gp"> .....:</span> <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp"> .....:</span> <span class="k">print</span><span class="p">(</span><span class="s">"Exception: "</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="gp"> .....:</span>
<span class="go">Exception: Can only reorder levels on a hierarchical axis.</span>
<span class="c"># right</span>
<span class="gp">In [179]: </span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">reorder_levels</span><span class="p">([</span><span class="mi">4</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">1</span><span class="p">])</span>
<span class="gp">In [180]: </span><span class="k">print</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">levels</span><span class="p">)</span>
<span class="go">Int64Index([4, 3, 2, 1], dtype='int64')</span>
</pre></div>
</div>
<p>See also the API documentation for <a class="reference internal" href="generated/pandas.Series.reorder_levels.html#pandas.Series.reorder_levels" title="pandas.Series.reorder_levels"><tt class="xref py py-func docutils literal"><span class="pre">pandas.Series.reorder_levels()</span></tt></a> and
<tt class="xref py py-func docutils literal"><span class="pre">pandas.Categorical.reorder_levels()</span></tt></p>
</div>
<div class="section" id="old-style-constructor-usage">
<h3>Old style constructor usage<a class="headerlink" href="#old-style-constructor-usage" title="Permalink to this headline">¶</a></h3>
<p>I earlier versions, a <cite>Categorical</cite> could be constructed by passing in precomputed <cite>level_codes</cite>
(called then <cite>labels</cite>) instead of values with levels. The <cite>level_codes</cite> are interpreted as pointers
to the levels with <cite>-1</cite> as <cite>NaN</cite>. This usage is now deprecated and not available unless
<tt class="docutils literal"><span class="pre">compat=True</span></tt> is passed to the constructor of <cite>Categorical</cite>.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [181]: </span><span class="n">cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">compat</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="gp">In [182]: </span><span class="n">cat</span><span class="o">.</span><span class="n">get_values</span><span class="p">()</span>
<span class="gr">Out[182]: </span><span class="n">array</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="n">int64</span><span class="p">)</span>
</pre></div>
</div>
<p>In the default case (<tt class="docutils literal"><span class="pre">compat=False</span></tt>) the first argument is interpreted as values.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [183]: </span><span class="n">cat</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">compat</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<span class="gp">In [184]: </span><span class="n">cat</span><span class="o">.</span><span class="n">get_values</span><span class="p">()</span>
<span class="gr">Out[184]: </span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="n">int64</span><span class="p">)</span>
</pre></div>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Using Categorical with precomputed level_codes and levels is deprecated and a <cite>FutureWarning</cite>
is raised. Please change your code to use one of the proper constructor modes instead of
adding <tt class="docutils literal"><span class="pre">compat=False</span></tt>.</p>
</div>
</div>
<div class="section" id="no-categorical-index">
<h3>No categorical index<a class="headerlink" href="#no-categorical-index" title="Permalink to this headline">¶</a></h3>
<p>There is currently no index of type <tt class="docutils literal"><span class="pre">category</span></tt>, so setting the index to a <cite>Categorical</cite> will
convert the <cite>Categorical</cite> to a normal <cite>numpy</cite> array first and therefore remove any custom
ordering of the levels:</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [185]: </span><span class="n">cats</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">],</span> <span class="n">levels</span><span class="o">=</span><span class="p">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">])</span>
<span class="gp">In [186]: </span><span class="n">strings</span> <span class="o">=</span> <span class="p">[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"d"</span><span class="p">]</span>
<span class="gp">In [187]: </span><span class="n">values</span> <span class="o">=</span> <span class="p">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
<span class="gp">In [188]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"strings"</span><span class="p">:</span><span class="n">strings</span><span class="p">,</span> <span class="s">"values"</span><span class="p">:</span><span class="n">values</span><span class="p">},</span> <span class="n">index</span><span class="o">=</span><span class="n">cats</span><span class="p">)</span>
<span class="gp">In [189]: </span><span class="n">df</span><span class="o">.</span><span class="n">index</span>
<span class="gr">Out[189]: </span><span class="n">Int64Index</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'int64'</span><span class="p">)</span>
<span class="c"># This should sort by levels but does not as there is no CategoricalIndex!</span>
<span class="gp">In [190]: </span><span class="n">df</span><span class="o">.</span><span class="n">sort_index</span><span class="p">()</span>
<span class="gr">Out[190]: </span>
<span class="go"> strings values</span>
<span class="go">1 a 4</span>
<span class="go">2 b 2</span>
<span class="go">3 c 3</span>
<span class="go">4 d 1</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This could change if a <cite>CategoricalIndex</cite> is implemented (see
<a class="reference external" href="https://github.com/pydata/pandas/issues/7629">https://github.com/pydata/pandas/issues/7629</a>)</p>
</div>
</div>
<div class="section" id="dtype-in-apply">
<h3>dtype in apply<a class="headerlink" href="#dtype-in-apply" title="Permalink to this headline">¶</a></h3>
<p>Pandas currently does not preserve the dtype in apply functions: If you apply along rows you get
a <cite>Series</cite> of <tt class="docutils literal"><span class="pre">object</span></tt> <cite>dtype</cite> (same as getting a row -> getting one element will return a
basic type) and applying along columns will also convert to object.</p>
<div class="highlight-ipython"><div class="highlight"><pre><span class="gp">In [191]: </span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="s">"a"</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">],</span> <span class="s">"b"</span><span class="p">:[</span><span class="s">"a"</span><span class="p">,</span><span class="s">"b"</span><span class="p">,</span><span class="s">"c"</span><span class="p">,</span><span class="s">"d"</span><span class="p">],</span> <span class="s">"cats"</span><span class="p">:</span><span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">])})</span>
<span class="gp">In [192]: </span><span class="n">df</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="k">lambda</span> <span class="n">row</span><span class="p">:</span> <span class="nb">type</span><span class="p">(</span><span class="n">row</span><span class="p">[</span><span class="s">"cats"</span><span class="p">]),</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="gr">Out[192]: </span>
<span class="go">0 <type 'long'></span>
<span class="go">1 <type 'long'></span>
<span class="go">2 <type 'long'></span>
<span class="go">3 <type 'long'></span>
<span class="go">dtype: object</span>
<span class="gp">In [193]: </span><span class="n">df</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="k">lambda</span> <span class="n">col</span><span class="p">:</span> <span class="n">col</span><span class="o">.</span><span class="n">dtype</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
<span class="gr">Out[193]: </span>
<span class="go">a object</span>
<span class="go">b object</span>
<span class="go">cats object</span>
<span class="go">dtype: object</span>
</pre></div>
</div>
</div>
<div class="section" id="future-compatibility">
<h3>Future compatibility<a class="headerlink" href="#future-compatibility" title="Permalink to this headline">¶</a></h3>
<p>As <cite>Categorical</cite> is not a native <cite>numpy</cite> dtype, the implementation details of
<cite>Series.cat</cite> can change if such a <cite>numpy</cite> dtype is implemented.</p>
</div>
</div>
</div>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7444/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7444/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7444.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7444",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/7444.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7444"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7445 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7445/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7445/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7445/events | https://github.com/pandas-dev/pandas/issues/7445 | 35,623,283 | MDU6SXNzdWUzNTYyMzI4Mw== | 7,445 | Column information lost in to_json() if data frame is empty | {
"avatar_url": "https://avatars.githubusercontent.com/u/5302763?v=4",
"events_url": "https://api.github.com/users/aizvorski/events{/privacy}",
"followers_url": "https://api.github.com/users/aizvorski/followers",
"following_url": "https://api.github.com/users/aizvorski/following{/other_user}",
"gists_url": "https://api.github.com/users/aizvorski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aizvorski",
"id": 5302763,
"login": "aizvorski",
"node_id": "MDQ6VXNlcjUzMDI3NjM=",
"organizations_url": "https://api.github.com/users/aizvorski/orgs",
"received_events_url": "https://api.github.com/users/aizvorski/received_events",
"repos_url": "https://api.github.com/users/aizvorski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aizvorski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aizvorski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aizvorski"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
}
]
| closed | false | null | []
| {
"closed_at": "2015-05-11T15:46:03Z",
"closed_issues": 237,
"created_at": "2014-10-07T14:39:07Z",
"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.16.0 of course!",
"due_on": "2015-05-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/29",
"id": 816810,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/29/labels",
"node_id": "MDk6TWlsZXN0b25lODE2ODEw",
"number": 29,
"open_issues": 0,
"state": "closed",
"title": "0.16.1",
"updated_at": "2017-04-16T08:39:48Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/29"
} | 3 | 2014-06-12T21:05:10Z | 2016-12-16T11:22:01Z | 2016-12-16T11:22:01Z | NONE | null | Create empty dataframe with a column and write it out with to_json(), then read it back in:
```
In [55]: s = pandas.DataFrame({'test': [] }, index=[] ).to_json(orient='columns')
In [56]: s
Out[56]: '{}'
In [57]: str( pandas.read_json(s, orient='columns') )
Out[57]: 'Empty DataFrame\nColumns: []\nIndex: []'
```
I think the expected string is '{"test":{}}'
This situation arises when code filters data frames and writes them out, while not being very careful to make sure the filtered frames contain at least one row.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7445/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7445/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7446 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7446/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7446/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7446/events | https://github.com/pandas-dev/pandas/issues/7446 | 35,632,594 | MDU6SXNzdWUzNTYzMjU5NA== | 7,446 | Cannot use np.round or np.around on Float64Index | {
"avatar_url": "https://avatars.githubusercontent.com/u/1972276?v=4",
"events_url": "https://api.github.com/users/hugadams/events{/privacy}",
"followers_url": "https://api.github.com/users/hugadams/followers",
"following_url": "https://api.github.com/users/hugadams/following{/other_user}",
"gists_url": "https://api.github.com/users/hugadams/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugadams",
"id": 1972276,
"login": "hugadams",
"node_id": "MDQ6VXNlcjE5NzIyNzY=",
"organizations_url": "https://api.github.com/users/hugadams/orgs",
"received_events_url": "https://api.github.com/users/hugadams/received_events",
"repos_url": "https://api.github.com/users/hugadams/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugadams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugadams/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugadams"
} | []
| closed | false | null | []
| null | 5 | 2014-06-12T23:23:46Z | 2014-06-19T22:46:15Z | 2014-06-19T22:43:18Z | NONE | null | np.round()/np.around() currently don't work on Flaot64Index, because the Float64Index is throwing an error when Float64Index.round() is called.
In our application, we are getting floating point digit discrepancies when doing subtraction and other floating point operations on these indicies, and I believe rounding would solve the problem.
Original mailing list thread:
https://groups.google.com/forum/#!topic/pydata/8aTLVKrPJfs
I'm using pandas.read_csv(), so I can't access the data apriori to it being written into a dataframe to round it before instantiation.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7446/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7446/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7447 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7447/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7447/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7447/events | https://github.com/pandas-dev/pandas/pull/7447 | 35,641,271 | MDExOlB1bGxSZXF1ZXN0MTcwOTExODE= | 7,447 | WIP: searchsorted implementation | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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": "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": "eb6420",
"default": false,
"description": "Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff",
"id": 57296398,
"name": "Algos",
"node_id": "MDU6TGFiZWw1NzI5NjM5OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Algos"
}
]
| closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2014-10-23T11:43:09Z",
"closed_issues": 530,
"created_at": "2014-07-06T18:44:54Z",
"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.14.1 of course!",
"due_on": "2014-10-19T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/28",
"id": 711567,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/28/labels",
"node_id": "MDk6TWlsZXN0b25lNzExNTY3",
"number": 28,
"open_issues": 0,
"state": "closed",
"title": "0.15.0",
"updated_at": "2017-11-24T10:50:44Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/28"
} | 46 | 2014-06-13T03:05:18Z | 2014-10-05T01:07:09Z | 2014-10-05T01:02:29Z | MEMBER | null | closes #6712
we've decided to simply return `self.values.searchsorted`, since that's what was happening before, and because dealing with non-monotonic indices is a PITA and yields marginal benefit when you can just use `s.iloc[s.searchsorted(...)]`
- [x] ~~`timedelta64` tests~~ #8464
- [x] ~~more edge case testing~~ #8464
- [x] ~~how should non-monotonic indexes be handled (currently raising a `ValueError`)?~~
- [x] ~~`datetime64` (and probably `timedelta64`) coercion needs work~~
- [x] ~~`side` argument testing~~ #8464
- [x] documentation
- [x] docstring
- [x] add to api.rst
- [x] add to basics.rst
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7447/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7447/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7447.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7447",
"merged_at": "2014-10-05T01:02:29Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7447.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7447"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7448 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7448/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7448/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7448/events | https://github.com/pandas-dev/pandas/pull/7448 | 35,654,419 | MDExOlB1bGxSZXF1ZXN0MTcwOTg4MzU= | 7,448 | Fix bug where ``nanops._has_infs`` doesn't work with many dtypes (issue #7357) | {
"avatar_url": "https://avatars.githubusercontent.com/u/2272878?v=4",
"events_url": "https://api.github.com/users/toddrjen/events{/privacy}",
"followers_url": "https://api.github.com/users/toddrjen/followers",
"following_url": "https://api.github.com/users/toddrjen/following{/other_user}",
"gists_url": "https://api.github.com/users/toddrjen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/toddrjen",
"id": 2272878,
"login": "toddrjen",
"node_id": "MDQ6VXNlcjIyNzI4Nzg=",
"organizations_url": "https://api.github.com/users/toddrjen/orgs",
"received_events_url": "https://api.github.com/users/toddrjen/received_events",
"repos_url": "https://api.github.com/users/toddrjen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/toddrjen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/toddrjen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/toddrjen"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
},
{
"color": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 18 | 2014-06-13T08:49:59Z | 2014-06-22T15:29:59Z | 2014-06-13T16:42:59Z | CONTRIBUTOR | null | Fixes issue #7357, where where `nanops._has_infs` doesn't work with many 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/7448/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7448/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7448.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7448",
"merged_at": "2014-06-13T16:42:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7448.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7448"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7449 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7449/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7449/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7449/events | https://github.com/pandas-dev/pandas/issues/7449 | 35,688,904 | MDU6SXNzdWUzNTY4ODkwNA== | 7,449 | DateOffset objects should support rollback on arrays | {
"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": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
}
]
| open | false | null | []
| {
"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"
} | 8 | 2014-06-13T16:59:28Z | 2015-03-06T00:34:30Z | null | MEMBER | null | Use case: I would like to be able to rollback a datetime Series or Index, mapping each value to the first day of each month.
I suppose this will probably need Cython to be fast.
Example:
``` python
import pandas as pd
dates = pd.date_range('2000-01-01', periods=100)
offset = pd.tseries.offsets.MonthBegin()
print dates - offset # this works, but is wrong for the first day of each month
print pd.Index([offset.rollback(d) for d in dates]) # this works correctly but slowly
print offset.rollback(dates) # this should, but doesn't
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7449/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7449/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7450 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7450/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7450/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7450/events | https://github.com/pandas-dev/pandas/pull/7450 | 35,703,954 | MDExOlB1bGxSZXF1ZXN0MTcxMjk4ODg= | 7,450 | FIX: Enable fixed width strings to be read from Stata 13 (117) files | {
"avatar_url": "https://avatars.githubusercontent.com/u/5585221?v=4",
"events_url": "https://api.github.com/users/bashtage/events{/privacy}",
"followers_url": "https://api.github.com/users/bashtage/followers",
"following_url": "https://api.github.com/users/bashtage/following{/other_user}",
"gists_url": "https://api.github.com/users/bashtage/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bashtage",
"id": 5585221,
"login": "bashtage",
"node_id": "MDQ6VXNlcjU1ODUyMjE=",
"organizations_url": "https://api.github.com/users/bashtage/orgs",
"received_events_url": "https://api.github.com/users/bashtage/received_events",
"repos_url": "https://api.github.com/users/bashtage/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bashtage/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bashtage/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bashtage"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "5319e7",
"default": false,
"description": "read_stata, to_stata",
"id": 104865385,
"name": "IO Stata",
"node_id": "MDU6TGFiZWwxMDQ4NjUzODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Stata"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 2 | 2014-06-13T20:23:23Z | 2014-06-16T12:52:01Z | 2014-06-16T12:51:56Z | CONTRIBUTOR | null | Fixes a bug which prevented files containing fixed width string data from being read. Stata 13 files also allow variable length strings, which are not supported in the current version, and an explicit exception regarding this type is now given. Added tests which cover these cases, and Stata 13 format files.
fixes #7360
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7450/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7450/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7450.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7450",
"merged_at": "2014-06-16T12:51:56Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7450.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7450"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7451 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7451/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7451/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7451/events | https://github.com/pandas-dev/pandas/pull/7451 | 35,708,598 | MDExOlB1bGxSZXF1ZXN0MTcxMzI4ODc= | 7,451 | TST/CLN: centralize module check funcs | {
"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": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 2 | 2014-06-13T21:29:07Z | 2014-06-21T22:42:21Z | 2014-06-21T20:11:43Z | MEMBER | null | - Moved duplicated module check functions to `util.testing`
- Remove some unnecessary import
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7451/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7451/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7451.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7451",
"merged_at": "2014-06-21T20:11:43Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7451.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7451"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7452 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7452/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7452/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7452/events | https://github.com/pandas-dev/pandas/pull/7452 | 35,710,550 | MDExOlB1bGxSZXF1ZXN0MTcxMzQwNDk= | 7,452 | ENH/API: offsets funcs now accepts datetime64 | {
"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": "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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 6 | 2014-06-13T21:58:09Z | 2014-06-14T21:52:32Z | 2014-06-14T19:01:04Z | MEMBER | null | Even though `CustomBusinessDay.apply` can handle `np.datetime64`, most of other offsets cannot accept `datetime64` and raises `ApplyTypeError`. The fix allows all offsets `apply`, `rollforward` and `rollback` to handle `np.datetime64` properly.
```
import pandas as pd
import numpy as np
t = np.datetime64('2011-01-01 09:00Z')
cday = pd.offsets.CustomBusinessDay()
cday.apply(t)
#2011-01-02 09:00:00
day = pd.offsets.Day()
day.apply(t)
# pandas.tseries.offsets.ApplyTypeError: Unhandled type: datetime64
```
**NOTE:** `CustomBusinessDay` had separate logic for `datetime` and `np.datetime64`. Based on the comparison using current master, `np.datetime64` logic looks slower. Thus I removed it.
```
import timeit
setup = """
import pandas as pd
import numpy as np
cday = pd.offsets.CustomBusinessDay()
np_dt64 = [np.datetime64('2014-05-{0:02} 09:00Z'.format(i)) for i in range(1, 31)]
timestamps = [pd.Timestamp('2014-05-{0:02} 09:00Z'.format(i)) for i in range(1, 31)]
"""
t = timeit.Timer('[cday.apply(d) for d in np_dt64]', setup)
print t.timeit(1000)
#1.6253619194
t = timeit.Timer('[cday.apply(d) for d in timestamps]', setup)
print t.timeit(1000)
#0.959406137466
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7452/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7452/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7452.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7452",
"merged_at": "2014-06-14T19:01:04Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7452.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7452"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7453 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7453/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7453/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7453/events | https://github.com/pandas-dev/pandas/issues/7453 | 35,718,698 | MDU6SXNzdWUzNTcxODY5OA== | 7,453 | BUG: Unable to aggregate TimeGrouper | {
"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": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
"name": "Groupby",
"node_id": "MDU6TGFiZWwyMzMxNjA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Groupby"
},
{
"color": "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-05-05T00:34:40Z",
"closed_issues": 306,
"created_at": "2016-02-08T15:29:59Z",
"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.18.0 of course!",
"due_on": "2016-05-04T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/38",
"id": 1570594,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/38/labels",
"node_id": "MDk6TWlsZXN0b25lMTU3MDU5NA==",
"number": 38,
"open_issues": 0,
"state": "closed",
"title": "0.18.1",
"updated_at": "2017-08-10T09:01:26Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/38"
} | 6 | 2014-06-14T01:37:22Z | 2016-05-19T19:57:17Z | 2016-04-10T14:04:45Z | MEMBER | null | Derived from #7373. There seems to be 3 issues related to `TimeGrouper` aggregation.
##### 1. var, std, mean
var/std/mean raises `ValueError` when group key contains `NaT`.
```
import pandas as pd
import numpy as np
data = np.random.randn(20, 4)
df = pd.DataFrame(data, columns=['A', 'B', 'C', 'D'])
df['dt'] = [datetime.datetime(2013, 1, 1), datetime.datetime(2013, 1, 2),
datetime.datetime(2013, 1, 3), datetime.datetime(2013, 1, 4),
datetime.datetime(2013, 1, 5)] * 4
df['dt_nat'] = [datetime.datetime(2013, 1, 1), datetime.datetime(2013, 1, 2),
pd.NaT, datetime.datetime(2013, 1, 4),
datetime.datetime(2013, 1, 5)] * 4
df.groupby(pd.TimeGrouper(key='dt', freq='D')).mean()
# OK
df.groupby(pd.TimeGrouper(key='dt_nat', freq='D')).mean()
# ValueError: month must be in 1..12
```
##### 2. size (#7600)
`size` raises `AttributeError` regardless of `NaT` existence.
```
df.groupby(pd.TimeGrouper(key='dt', freq='D')).size()
# AttributeError: 'BinGrouper' object has no attribute 'groupings'
```
##### 3. first, last, nth
It looks work, but `TimeGrouper` outputs different result from normal `groupby`.
```
df.groupby('dt').first()
# A B C D key dt_nat
# dt
#2013-01-01 -1.868691 -0.554116 -0.094949 0.009740 1 2013-01-01
#2013-01-02 0.272139 -0.106543 1.319331 -0.532377 2 2013-01-02
#2013-01-03 -1.637544 2.699557 -0.164414 -1.451295 3 NaT
#2013-01-04 1.642609 -0.313832 0.494468 -0.698104 4 2013-01-04
#2013-01-05 -1.554106 1.230299 -1.408515 -0.000722 5 2013-01-05
df.groupby(pd.TimeGrouper(key='dt', freq='D')).first()
# A B C D key dt_nat
# dt
#2013-01-01 -1.868691 -0.554116 -0.094949 0.009740 1 2013-01-01
#2013-01-02 0.272139 -0.106543 1.319331 -0.532377 2 2013-01-02
#2013-01-03 -1.637544 2.699557 -0.164414 -1.451295 3 NaT
#2013-01-04 1.642609 -0.313832 0.494468 -0.698104 4 2013-01-04
#2013-01-05 -0.024332 1.668172 -0.328200 1.731480 5 2013-01-05
# Compare 5th row
```
I assume the difference derived from `BinGrouper` sorts rows differently from normal groupby. Thus, result of normal groupby and `TimeGrouper` can differ.
```
df.groupby('dt').get_group(datetime.datetime(2013, 1, 5))
# A B C D dt dt_nat
#4 0.632937 0.224670 -0.201186 -0.340428 2013-01-05 2013-01-05
#9 -1.238944 -0.031075 -1.173326 -0.314716 2013-01-05 2013-01-05
#14 2.108985 0.993430 1.300605 1.452049 2013-01-05 2013-01-05
#19 0.315452 -0.817634 -0.526728 0.201415 2013-01-05 2013-01-05
df.groupby(pd.TimeGrouper(key='dt', freq='D')).get_group(datetime.datetime(2013, 1, 5))
# A B C D dt dt_nat
#9 -1.238944 -0.031075 -1.173326 -0.314716 2013-01-05 2013-01-05
#4 0.632937 0.224670 -0.201186 -0.340428 2013-01-05 2013-01-05
#14 2.108985 0.993430 1.300605 1.452049 2013-01-05 2013-01-05
#19 0.315452 -0.817634 -0.526728 0.201415 2013-01-05 2013-01-05
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7453/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7453/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7454 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7454/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7454/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7454/events | https://github.com/pandas-dev/pandas/issues/7454 | 35,721,560 | MDU6SXNzdWUzNTcyMTU2MA== | 7,454 | Add "season" as a time/date component to DatetimeIndex | {
"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": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
}
]
| open | false | null | []
| {
"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"
} | 2 | 2014-06-14T05:10:38Z | 2015-03-08T16:54:12Z | null | MEMBER | null | To help pandas to get better traction in the Earth sciences, it would be awesome to add support for climatological "season" as a [Time/Date Component](http://pandas.pydata.org/pandas-docs/stable/timeseries.html#time-date-components) of `pandas.DatetimeIndex`. Season comes up in geoscience at least as often as "quarter" does in finance.
The standard seasons (the ones worth adding a shortcut for) would be `['DJF', 'MAM', 'JJA', 'SON']`, as labeled by the first letter of each month. These could be represented by integers (in a pinch) but string labels would be much more natural -- people talk about the season "JJA" (or "summer" in the Northern hemisphere), not "season 3".
Actually, this might be a nice show case for the brand new `CategoricalBlock` (#7217).
For reference, here is some vectorized code to do the calculation from month numbers:
``` python
SEASONS = np.array(['DJF', 'MAM', 'JJA', 'SON'])
month = np.arange(12) + 1
season = SEASONS[(month // 3) % 4]
print season
```
(We actually already use this code to add "season" to [xray](http://github.com/xray/xray), but I think this would be useful more broadly as well.)
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 1,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7454/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7454/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7455 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7455/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7455/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7455/events | https://github.com/pandas-dev/pandas/pull/7455 | 35,721,767 | MDExOlB1bGxSZXF1ZXN0MTcxNDA1MTQ= | 7,455 | DOC: Add how to calculate month-start to cookbook | {
"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"
} | []
| closed | false | null | []
| null | 1 | 2014-06-14T05:31:07Z | 2014-06-14T23:01:42Z | 2014-06-14T13:02:05Z | MEMBER | null | Related: #7449
| {
"+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/7455/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7455/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7455.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7455",
"merged_at": "2014-06-14T13:02:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7455.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7455"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7456 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7456/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7456/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7456/events | https://github.com/pandas-dev/pandas/pull/7456 | 35,725,787 | MDExOlB1bGxSZXF1ZXN0MTcxNDIyNjg= | 7,456 | FIX integer column names for older sqlalchemy version GH6340, GH7330 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
} | []
| closed | false | null | []
| null | 0 | 2014-06-14T10:42:52Z | 2014-08-21T07:58:27Z | 2014-06-14T11:02:08Z | MEMBER | null | Closes #7330. Should enable to merge #7022 (#6340).
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7456/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7456/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7456.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7456",
"merged_at": "2014-06-14T11:02:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7456.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7456"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7457 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7457/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7457/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7457/events | https://github.com/pandas-dev/pandas/pull/7457 | 35,726,376 | MDExOlB1bGxSZXF1ZXN0MTcxNDI0OTc= | 7,457 | BUG: Better axis label handling for partial layout | {
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 4 | 2014-06-14T11:21:40Z | 2014-09-18T20:28:41Z | 2014-07-01T15:28:58Z | MEMBER | null | Closes #5897.
Handle `ticklabels` and `labels` based on below rules. Currently `labels` are always displayed even if `ticklabels` are hidden and causes confusion.
- If `sharex` is `True`, display only most bottom `xticklabels` on each columns. (Because #7035 hides the bottom-right axes). Hide `xlabel` as the same manner as `xticklabels`
- If `sharey` is True, display most left `yticklabels` (no change). Hide `ylabel` as the same manner as `yticklabels` (changed)
```
import pandas as pd
from numpy.random import randn
import matplotlib.pyplot as plt
d = pd.DataFrame({'one':randn(5), 'two':randn(5), 'three':randn(5), 'label':['label'] * 5},
columns = ['one','two','three', 'label'])
bp= d.boxplot(by='label', rot=45)
```

| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7457/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7457/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7457.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7457",
"merged_at": "2014-07-01T15:28:58Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7457.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7457"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7458 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7458/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7458/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7458/events | https://github.com/pandas-dev/pandas/pull/7458 | 35,726,976 | MDExOlB1bGxSZXF1ZXN0MTcxNDI3NDI= | 7,458 | BUG: DTI.intersection doesnt preserve tz | {
"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": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
},
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-14T12:02:01Z | 2014-06-14T15:34:31Z | 2014-06-14T14:30:36Z | MEMBER | null | Closes #4690.
Also, found and fixed a bug which non-monotonic `Index.union` incorrectly preserves `name` when `Index` have different names.
```
# monotonic
idx1 = pd.Index([1, 2, 3, 4, 5], name='idx1')
idx2 = pd.Index([4, 5, 6, 7, 8], name='other')
idx1.intersection(idx2).name
# None (Expected)
# non-monotonic
idx1 = pd.Index([5, 4, 3, 2, 1], name='idx1')
idx2 = pd.Index([4, 5, 6, 7, 8], name='other')
idx1.intersection(idx2).name
# idx1
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7458/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7458/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7458.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7458",
"merged_at": "2014-06-14T14:30:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7458.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7458"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7459 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7459/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7459/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7459/events | https://github.com/pandas-dev/pandas/pull/7459 | 35,727,343 | MDExOlB1bGxSZXF1ZXN0MTcxNDI5MTM= | 7,459 | BUG/CLN: LinePlot uses incorrect xlim when secondary_y=True | {
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 7 | 2014-06-14T12:30:28Z | 2014-07-09T12:39:10Z | 2014-07-07T15:25:12Z | MEMBER | null | `xlim` is not set properly when `secondary_y=True`. This is different issue from #7322.
Also, refactored `secondary_y` to be handled only by `MPLPlot`, because it will be required in future fix to pass multiple axes to `df.plot`, like #7069 (I'm willing to work soon..).
```
df = pd.DataFrame(np.random.randn(5, 5), columns=['A', 'B', 'C', 'D', 'E'])
df.plot(secondary_y=True)
```

```
df = pd.DataFrame(np.random.randn(5, 5), columns=['A', 'B', 'C', 'D', 'E'])
df.plot(secondary_y=['A', 'B'], subplots=True)
```

| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7459/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7459/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7459.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7459",
"merged_at": "2014-07-07T15:25:12Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7459.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7459"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7460 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7460/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7460/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7460/events | https://github.com/pandas-dev/pandas/issues/7460 | 35,728,509 | MDU6SXNzdWUzNTcyODUwOQ== | 7,460 | New index created by 2 weeks resampling is 1 week off | {
"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"
} | []
| closed | false | null | []
| null | 5 | 2014-06-14T13:40:04Z | 2014-06-14T14:15:48Z | 2014-06-14T14:15:48Z | NONE | null | ``` python
pd.Series( index=pd.date_range('2014-06-01', periods=20 ), data=range(20) ).resample( '2W-SAT', how='sum' )
Out[23]:
2014-06-07 21
2014-06-21 169
Freq: 2W-SAT, dtype: int64
```
The first entry of a 2 weeks resampling corresponds to the first week of the data.
The expected output should rather be
``` python
2014-06-14 91
2014-06-28 99
```
The same problem appears if I start the Series on other Sundays:
``` python
pd.Series( index=pd.date_range('2014-06-08', periods=20 ), data=range(20) ).resample( '2W-SAT', how='sum' )
Out[14]:
2014-06-14 21
2014-06-28 169
Freq: 2W-SAT, dtype: int64
```
Version
```
In [18]:
pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Darwin
OS-release: 13.2.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: C
LANG: None
pandas: 0.13.1
Cython: 0.20.1
numpy: 1.8.1
scipy: 0.14.0
statsmodels: None
IPython: 2.1.0
sphinx: None
patsy: None
scikits.timeseries: None
dateutil: 2.2
pytz: 2014.3
bottleneck: None
tables: 3.1.1
numexpr: 2.4
matplotlib: 1.3.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
sqlalchemy: None
lxml: None
bs4: None
html5lib: None
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/7460/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7460/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7461 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7461/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7461/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7461/events | https://github.com/pandas-dev/pandas/pull/7461 | 35,729,265 | MDExOlB1bGxSZXF1ZXN0MTcxNDM3MTk= | 7,461 | nanops pep8 fixes | {
"avatar_url": "https://avatars.githubusercontent.com/u/2272878?v=4",
"events_url": "https://api.github.com/users/toddrjen/events{/privacy}",
"followers_url": "https://api.github.com/users/toddrjen/followers",
"following_url": "https://api.github.com/users/toddrjen/following{/other_user}",
"gists_url": "https://api.github.com/users/toddrjen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/toddrjen",
"id": 2272878,
"login": "toddrjen",
"node_id": "MDQ6VXNlcjIyNzI4Nzg=",
"organizations_url": "https://api.github.com/users/toddrjen/orgs",
"received_events_url": "https://api.github.com/users/toddrjen/received_events",
"repos_url": "https://api.github.com/users/toddrjen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/toddrjen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/toddrjen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/toddrjen"
} | [
{
"color": "eb6420",
"default": false,
"description": "Code style, linting, code_checks",
"id": 106935113,
"name": "Code Style",
"node_id": "MDU6TGFiZWwxMDY5MzUxMTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Code%20Style"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 1 | 2014-06-14T14:23:51Z | 2014-06-26T10:29:12Z | 2014-06-17T12:36:03Z | CONTRIBUTOR | null | Very minor pep8 fixes for `nanops`. This brings `nanops` into pep8 compliance.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7461/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7461/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7461.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7461",
"merged_at": "2014-06-17T12:36:03Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7461.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7461"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7462 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7462/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7462/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7462/events | https://github.com/pandas-dev/pandas/pull/7462 | 35,734,643 | MDExOlB1bGxSZXF1ZXN0MTcxNDYxMjE= | 7,462 | BUG: unstack fails for mixed dtype subset | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
},
{
"color": "e102d8",
"default": false,
"description": "Unexpected or buggy dtype conversions",
"id": 31404521,
"name": "Dtype Conversions",
"node_id": "MDU6TGFiZWwzMTQwNDUyMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Dtype%20Conversions"
}
]
| closed | false | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"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"
} | 14 | 2014-06-14T19:09:58Z | 2015-04-08T14:49:18Z | 2015-04-08T14:49:18Z | MEMBER | null | closes #7405
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7462/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7462/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7462.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7462",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/7462.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7462"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7463 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7463/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7463/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7463/events | https://github.com/pandas-dev/pandas/pull/7463 | 35,735,747 | MDExOlB1bGxSZXF1ZXN0MTcxNDY2MzE= | 7,463 | PERF: performance gains in DataFrame groupby.transform for ufuncs (GH7383) | {
"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": "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"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-14T20:12:21Z | 2014-06-16T12:52:18Z | 2014-06-16T12:52:18Z | CONTRIBUTOR | null | accelerates non-modifying transformations, e.g.
closes #7383
`DataFrame.groupby(...).transform(np.max)`
```
-------------------------------------------------------------------------------
Test name | head[ms] | base[ms] | ratio |
-------------------------------------------------------------------------------
groupby_transform_ufunc | 6.1977 | 215.6494 | 0.0287 |
groupby_transform2 | 155.9653 | 155.1824 | 1.0050 |
groupby_transform | 167.5134 | 165.7823 | 1.0104 |
-------------------------------------------------------------------------------
Test name | head[ms] | base[ms] | ratio |
-------------------------------------------------------------------------------
Ratio < 1.0 means the target commit is faster then the baseline.
Seed used: 1234
Target [3d3715b] : WPI: fast tranform on DataFrame
Base [eb1ae6b] : Merge pull request #7458 from sinhrks/intersection
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7463/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7463/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7463.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7463",
"merged_at": "2014-06-16T12:52:18Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7463.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7463"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7464 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7464/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7464/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7464/events | https://github.com/pandas-dev/pandas/pull/7464 | 35,735,808 | MDExOlB1bGxSZXF1ZXN0MTcxNDY2NTY= | 7,464 | BUG: astype(float) in Index does the wrong thing | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 2 | 2014-06-14T20:15:22Z | 2014-06-15T01:33:36Z | 2014-06-15T01:33:35Z | MEMBER | null | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7464/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7464/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7464.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7464",
"merged_at": "2014-06-15T01:33:35Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7464.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7464"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7465 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7465/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7465/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7465/events | https://github.com/pandas-dev/pandas/pull/7465 | 35,737,387 | MDExOlB1bGxSZXF1ZXN0MTcxNDczNjk= | 7,465 | BUG: Some offsets.apply cannot handle tz properly | {
"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": "0052cc",
"default": false,
"description": "DateOffsets",
"id": 53181044,
"name": "Frequency",
"node_id": "MDU6TGFiZWw1MzE4MTA0NA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Frequency"
},
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 1 | 2014-06-14T21:42:43Z | 2014-06-17T14:38:59Z | 2014-06-17T11:57:36Z | MEMBER | null | There are some offsets which cannot handle input with `tz` properly
```
pd.offsets.Day().apply(pd.Timestamp('2010-01-01 9:00', tz='US/Eastern'))
#2010-01-02 09:00:00-05:00 (Expected)
pd.offsets.CustomBusinessDay().apply(pd.Timestamp('2010-01-01 9:00', tz='US/Eastern'))
#2010-01-04 09:00:00 (tzinfo lost)
pd.offsets.CustomBusinessMonthEnd().apply(pd.Timestamp('2010-01-01 9:00', tz='US/Eastern'))
# ValueError: Cannot compare tz-naive and tz-aware timestamps
```
### Affected Offsets
- pandas.tseries.offsets.CustomBusinessDay'
- 'pandas.tseries.offsets.CustomBusinessMonthEnd'
- 'pandas.tseries.offsets.CustomBusinessMonthBegin'
- 'pandas.tseries.offsets.BusinessMonthBegin'
- 'pandas.tseries.offsets.YearBegin'
- 'pandas.tseries.offsets.BYearBegin'
- 'pandas.tseries.offsets.YearEnd'
- 'pandas.tseries.offsets.BYearEnd'
- 'pandas.tseries.offsets.BQuarterBegin'
- 'pandas.tseries.offsets.LastWeekOfMonth'
- 'pandas.tseries.offsets.FY5253Quarter'
- 'pandas.tseries.offsets.FY5253'
- 'pandas.tseries.offsets.Week'
- 'pandas.tseries.offsets.WeekOfMonth'
- 'pandas.tseries.offsets.Easter'
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7465/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7465/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7465.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7465",
"merged_at": "2014-06-17T11:57:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7465.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7465"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7466 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7466/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7466/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7466/events | https://github.com/pandas-dev/pandas/issues/7466 | 35,738,423 | MDU6SXNzdWUzNTczODQyMw== | 7,466 | BUG: pivot with nans gives a seemingly wrong result | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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 | []
| {
"closed_at": "2015-03-23T10:50:37Z",
"closed_issues": 400,
"created_at": "2014-02-14T03:31:22Z",
"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.15 of course!",
"due_on": "2015-03-22T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/25",
"id": 569113,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25/labels",
"node_id": "MDk6TWlsZXN0b25lNTY5MTEz",
"number": 25,
"open_issues": 0,
"state": "closed",
"title": "0.16.0",
"updated_at": "2017-08-24T09:17:49Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25"
} | 4 | 2014-06-14T22:55:00Z | 2014-12-22T13:08:53Z | 2014-12-22T13:08:53Z | MEMBER | null | related to #3588
This test
``` python
def test_pivot_index_with_nan(self):
# GH 3588
nan = np.nan
df = DataFrame({"a":['R1', 'R2', nan, 'R4'], 'b':["C1", "C2", "C3" , "C4"], "c":[10, 15, nan , 20]})
result = df.pivot('a','b','c')
expected = DataFrame([[nan,nan,nan,nan],[nan,10,nan,nan],
[nan,nan,nan,nan],[nan,nan,15,20]],
index = Index(['R1','R2',nan,'R4'],name='a'),
columns = Index(['C1','C2','C3','C4'],name='b'))
tm.assert_frame_equal(result, expected)
```
seems very odd to me, even though the expected result is constructed by hand.
Here's `df` and `result`:
```
In [2]: df
Out[2]:
a b c
0 R1 C1 10
1 R2 C2 15
2 NaN C3 NaN
3 R4 C4 20
In [3]: result
Out[3]:
b C1 C2 C3 C4
a
R1 NaN NaN NaN NaN
R2 NaN 10 NaN NaN
NaN NaN NaN NaN NaN
R4 NaN NaN 15 20
```
The way I understand `pivot` here is that it makes a `DataFrame` with `a` as the `index`, `b` as the columns and then uses the third argument, in this case `c` as values, where `a` and `b` form a kind of coordinate system for `c`. Thus, instead of the current output, I would expect the result to be
```
In [14]: e
Out[14]:
b C1 C2 C3 C4
a
R1 10 NaN NaN NaN
R2 NaN 15 NaN NaN
NaN NaN NaN NaN NaN
R4 NaN NaN NaN 20
```
If, on the other hand, you _don't_ have any `nan`s in your frame, the result is what I would expect:
```
In [16]: df.loc[2, 'a'] = 'R3'
In [17]: df.loc[2, 'c'] = 17
In [18]: df
Out[18]:
a b c
0 R1 C1 10
1 R2 C2 15
2 R3 C3 17
3 R4 C4 20
In [19]: df.pivot('a','b','c')
Out[19]:
b C1 C2 C3 C4
a
R1 10 NaN NaN NaN
R2 NaN 15 NaN NaN
R3 NaN NaN 17 NaN
R4 NaN NaN NaN 20
```
I'll have a look at #3588 to see if this is a regression, or if I'm just misunderstanding how this is supposed to work.
I have a suspicion that this is related to #7403
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7466/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7466/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7467 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7467/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7467/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7467/events | https://github.com/pandas-dev/pandas/pull/7467 | 35,754,090 | MDExOlB1bGxSZXF1ZXN0MTcxNTQ1MzI= | 7,467 | DOC: Add missing column header in 'baseball.csv'. | {
"avatar_url": "https://avatars.githubusercontent.com/u/648332?v=4",
"events_url": "https://api.github.com/users/helger/events{/privacy}",
"followers_url": "https://api.github.com/users/helger/followers",
"following_url": "https://api.github.com/users/helger/following{/other_user}",
"gists_url": "https://api.github.com/users/helger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/helger",
"id": 648332,
"login": "helger",
"node_id": "MDQ6VXNlcjY0ODMzMg==",
"organizations_url": "https://api.github.com/users/helger/orgs",
"received_events_url": "https://api.github.com/users/helger/received_events",
"repos_url": "https://api.github.com/users/helger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/helger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/helger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/helger"
} | []
| closed | false | null | []
| null | 1 | 2014-06-15T17:42:00Z | 2014-06-15T18:10:30Z | 2014-06-15T18:10:23Z | CONTRIBUTOR | null | Add missing column header in 'baseball.csv' in the docs.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7467/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7467/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7467.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7467",
"merged_at": "2014-06-15T18:10:23Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7467.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7467"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7468 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7468/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7468/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7468/events | https://github.com/pandas-dev/pandas/pull/7468 | 35,760,148 | MDExOlB1bGxSZXF1ZXN0MTcxNTcxMTQ= | 7,468 | ENH: Cast ndarray-like datetime64 arrays to Index properly | {
"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": "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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 1 | 2014-06-15T22:56:55Z | 2014-06-16T16:51:53Z | 2014-06-16T12:50:48Z | MEMBER | null | It turns out that the ndarray-like arrays of dtype `datetime64` were
not being properly cast to an `Index`, because -- due to a bug with
`np.datetime64` -- calling `np.asarray(x, dtype=object)` if x is an
ndarray of type `datetime64` results in an _integer_ array.
This PR adds tests and a work around to `pd.Index.__new__`.
Related #5460
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7468/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7468/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7468.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7468",
"merged_at": "2014-06-16T12:50:48Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7468.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7468"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7469 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7469/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7469/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7469/events | https://github.com/pandas-dev/pandas/issues/7469 | 35,761,816 | MDU6SXNzdWUzNTc2MTgxNg== | 7,469 | Panel.apply fails when one of the axes is a Multi-Indexed DataFrame | {
"avatar_url": "https://avatars.githubusercontent.com/u/739280?v=4",
"events_url": "https://api.github.com/users/colindickson/events{/privacy}",
"followers_url": "https://api.github.com/users/colindickson/followers",
"following_url": "https://api.github.com/users/colindickson/following{/other_user}",
"gists_url": "https://api.github.com/users/colindickson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/colindickson",
"id": 739280,
"login": "colindickson",
"node_id": "MDQ6VXNlcjczOTI4MA==",
"organizations_url": "https://api.github.com/users/colindickson/orgs",
"received_events_url": "https://api.github.com/users/colindickson/received_events",
"repos_url": "https://api.github.com/users/colindickson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/colindickson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/colindickson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/colindickson"
} | [
{
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 4 | 2014-06-16T00:33:42Z | 2014-06-16T14:45:19Z | 2014-06-16T14:20:06Z | NONE | null | Wrote up an example notebook:
http://nbviewer.ipython.org/urls/gist.githubusercontent.com/colindickson/850d3b5172f0320f204a/raw/62e4dfd450964326b8e3c2635c5c3f4c098a7352/panel.ipynb
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7469/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7469/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7470 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7470/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7470/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7470/events | https://github.com/pandas-dev/pandas/pull/7470 | 35,765,759 | MDExOlB1bGxSZXF1ZXN0MTcxNTk5MzI= | 7,470 | ENH: ignoring comment lines and empty lines in CSV files | {
"avatar_url": "https://avatars.githubusercontent.com/u/6729036?v=4",
"events_url": "https://api.github.com/users/mdmueller/events{/privacy}",
"followers_url": "https://api.github.com/users/mdmueller/followers",
"following_url": "https://api.github.com/users/mdmueller/following{/other_user}",
"gists_url": "https://api.github.com/users/mdmueller/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mdmueller",
"id": 6729036,
"login": "mdmueller",
"node_id": "MDQ6VXNlcjY3MjkwMzY=",
"organizations_url": "https://api.github.com/users/mdmueller/orgs",
"received_events_url": "https://api.github.com/users/mdmueller/received_events",
"repos_url": "https://api.github.com/users/mdmueller/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mdmueller/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mdmueller/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mdmueller"
} | [
{
"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": "2014-10-23T11:43:09Z",
"closed_issues": 530,
"created_at": "2014-07-06T18:44:54Z",
"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.14.1 of course!",
"due_on": "2014-10-19T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/28",
"id": 711567,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/28/labels",
"node_id": "MDk6TWlsZXN0b25lNzExNTY3",
"number": 28,
"open_issues": 0,
"state": "closed",
"title": "0.15.0",
"updated_at": "2017-11-24T10:50:44Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/28"
} | 91 | 2014-06-16T03:26:23Z | 2014-12-29T21:35:48Z | 2014-09-19T17:55:47Z | CONTRIBUTOR | null | closes #4466
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7470/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7470/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7470.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7470",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/7470.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7470"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7471 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7471/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7471/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7471/events | https://github.com/pandas-dev/pandas/issues/7471 | 35,770,444 | MDU6SXNzdWUzNTc3MDQ0NA== | 7,471 | kind='area' plot not showing | {
"avatar_url": "https://avatars.githubusercontent.com/u/3329893?v=4",
"events_url": "https://api.github.com/users/balzer82/events{/privacy}",
"followers_url": "https://api.github.com/users/balzer82/followers",
"following_url": "https://api.github.com/users/balzer82/following{/other_user}",
"gists_url": "https://api.github.com/users/balzer82/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/balzer82",
"id": 3329893,
"login": "balzer82",
"node_id": "MDQ6VXNlcjMzMjk4OTM=",
"organizations_url": "https://api.github.com/users/balzer82/orgs",
"received_events_url": "https://api.github.com/users/balzer82/received_events",
"repos_url": "https://api.github.com/users/balzer82/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/balzer82/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/balzer82/subscriptions",
"type": "User",
"url": "https://api.github.com/users/balzer82"
} | [
{
"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"
},
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 6 | 2014-06-16T06:20:12Z | 2014-07-08T14:16:27Z | 2014-07-05T01:31:30Z | NONE | null | Maybe it is a bug, but following problem: In the new Pandas 0.14 you guys implemented an awesome kind='area' option for plot. If I plot a dataframe normally, like
`df.plot()`

but when I take the option
`df.plot(kind='area')`, I just get
``` Out[69]:
<matplotlib.axes.AxesSubplot at 0x122794550>
<matplotlib.figure.Figure at 0x121b69e10>
```
in my IPython notebook. I used the `%pylab inline` function, so I don't know, why it is not showing. Any suggestions?
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7471/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7471/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7472 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7472/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7472/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7472/events | https://github.com/pandas-dev/pandas/issues/7472 | 35,785,579 | MDU6SXNzdWUzNTc4NTU3OQ== | 7,472 | DOC: cython example producing numpy deprecation warning | {
"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": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
]
| closed | false | null | []
| null | 3 | 2014-06-16T10:48:34Z | 2015-10-20T22:42:26Z | 2015-10-20T22:42:26Z | MEMBER | null | Didn't test it out myself, but it appears already for a while in the doc building on Travis. Is this due to our implemenation of the example? Or something with the cython version?
@hayd I think you added this example?
```
reading sources... [ 30%] enhancingperf
In file included from /home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
from /home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /home/travis/.cache/ipython/cython/_cython_magic_1f237dce7a3469976da887b4cf262e55.c:314:
/home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
/home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1629:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
/home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/__ufunc_api.h:241:1: warning: ‘_import_umath’ defined but not used [-Wunused-function]
In file included from /home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
from /home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /home/travis/.cache/ipython/cython/_cython_magic_91937760ba0c84b679e9c511ddce92eb.c:314:
/home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
/home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1629:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
/home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/numpy/core/include/numpy/__ufunc_api.h:241:1: warning: ‘_import_umath’ defined but not used [-Wunused-function]
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7472/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7472/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7473 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7473/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7473/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7473/events | https://github.com/pandas-dev/pandas/issues/7473 | 35,791,663 | MDU6SXNzdWUzNTc5MTY2Mw== | 7,473 | two dataframes outer join on null values | {
"avatar_url": "https://avatars.githubusercontent.com/u/5693301?v=4",
"events_url": "https://api.github.com/users/socheon/events{/privacy}",
"followers_url": "https://api.github.com/users/socheon/followers",
"following_url": "https://api.github.com/users/socheon/following{/other_user}",
"gists_url": "https://api.github.com/users/socheon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/socheon",
"id": 5693301,
"login": "socheon",
"node_id": "MDQ6VXNlcjU2OTMzMDE=",
"organizations_url": "https://api.github.com/users/socheon/orgs",
"received_events_url": "https://api.github.com/users/socheon/received_events",
"repos_url": "https://api.github.com/users/socheon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/socheon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/socheon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/socheon"
} | [
{
"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": "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": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 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"
} | 6 | 2014-06-16T12:30:58Z | 2021-07-21T04:37:41Z | 2021-07-21T04:37:41Z | NONE | null | In pandas, unlike SQL, the rows seemed to be joining on null values. Is this a bug?
related SO: http://stackoverflow.com/questions/23940181/pandas-merging-with-missing-values/23940686#23940686
Code snippet
``` python
import pandas as pd
import numpy as np
df1 = pd.DataFrame(
[[1, None],
[2, 'y']],
columns = ['A', 'B']
)
print df1
df2 = pd.DataFrame(
[['y', 'Y'],
[None, 'None1'],
[None, 'None2']],
columns = ['B', 'C']
)
print df2
print df1.merge(df2, on='B', how='outer')
```
Output
```
A B
0 1 None
1 2 y
B C
0 y Y
1 None None1
2 None None2
A B C
0 1 None None1
1 1 None None2
2 2 y Y
```
You can see row 0 in df1 unexpectedly joins to both rows in df2.
I would expect the correct answer to be
```
A B C
0 1 None None
1 2 y Y
2 None None None1
3 None None None2
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7473/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7473/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7474 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7474/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7474/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7474/events | https://github.com/pandas-dev/pandas/pull/7474 | 35,795,689 | MDExOlB1bGxSZXF1ZXN0MTcxNzc0OTc= | 7,474 | BUG: Bug in Panel.apply with a multi-index as an axis (GH7469) | {
"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": "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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 0 | 2014-06-16T13:26:53Z | 2014-06-16T14:20:06Z | 2014-06-16T14:20:06Z | CONTRIBUTOR | null | closes #7469
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7474/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7474/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7474.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7474",
"merged_at": "2014-06-16T14:20:06Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7474.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7474"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7475 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7475/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7475/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7475/events | https://github.com/pandas-dev/pandas/issues/7475 | 35,809,283 | MDU6SXNzdWUzNTgwOTI4Mw== | 7,475 | ENH/BUG: support multi-index slicing assignment expansions | {
"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": "207de5",
"default": false,
"description": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
]
| open | false | null | []
| {
"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 | 2014-06-16T15:50:33Z | 2021-04-11T04:48:45Z | null | CONTRIBUTOR | null | From SO:
http://stackoverflow.com/questions/24247255/idiomatic-multiindex-column-assignment-in-pandas/24247513#24247513
http://stackoverflow.com/questions/24258781/advanced-cross-section-with-multi-index-in-pandas
```
ix = pd.MultiIndex.from_tuples(list(enumerate(np.random.choice(['A', 'B'], 5))))
df = pd.DataFrame({'Val': np.random.randint(0, 30, 5)}, index=ix).unstack().fillna(0)
df
Val
A B
0 27 0
1 0 3
2 0 7
3 9 0
4 0 19
```
I think this could be make to work (its column creation)
`df['Half'] = df['Val']/2`
concat soln
Automatic broadcasting (but need to not 'align')
```
In [59]: concat([df['Val'],df['Val']/2],axis=1,keys=['Val','Half'])
Out[59]:
Val Half
A B A B
0 0 10 0.0 5.0
1 0 10 0.0 5.0
2 0 13 0.0 6.5
3 27 0 13.5 0.0
4 2 0 1.0 0.0
```
```
In [42]: In
[107]: df = pd.DataFrame(np.arange(5*12).reshape(-1,12), columns=col)
In [108]: df
Out[108]:
first A B
second a b a b
third 1 2 3 1 2 3 1 2 3 1 2 3
0 0 1 2 3 4 5 6 7 8 9 10 11
1 12 13 14 15 16 17 18 19 20 21 22 23
2 24 25 26 27 28 29 30 31 32 33 34 35
3 36 37 38 39 40 41 42 43 44 45 46 47
4 48 49 50 51 52 53 54 55 56 57 58 59
In [109]: df.loc[:,idx[:,:,[2,3]]]-np.tile(df.loc[:,idx[:,:,1]].values,2)
Out[109]:
first A B
second a b a b
third 2 3 2 3 2 3 2 3
0 1 -1 -2 -4 7 5 4 2
1 1 -1 -2 -4 7 5 4 2
2 1 -1 -2 -4 7 5 4 2
3 1 -1 -2 -4 7 5 4 2
4 1 -1 -2 -4 7 5 4 2
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7475/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7475/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7476 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7476/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7476/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7476/events | https://github.com/pandas-dev/pandas/pull/7476 | 35,817,860 | MDExOlB1bGxSZXF1ZXN0MTcxOTExMjk= | 7,476 | BUG: Bug Multiindex assignment with an aligned rhs (but at different levels) (GH7475) | {
"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": "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": null,
"id": 71268330,
"name": "MultiIndex",
"node_id": "MDU6TGFiZWw3MTI2ODMzMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/MultiIndex"
}
]
| closed | false | null | []
| {
"closed_at": "2015-03-23T10:50:37Z",
"closed_issues": 400,
"created_at": "2014-02-14T03:31:22Z",
"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.15 of course!",
"due_on": "2015-03-22T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/25",
"id": 569113,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25/labels",
"node_id": "MDk6TWlsZXN0b25lNTY5MTEz",
"number": 25,
"open_issues": 0,
"state": "closed",
"title": "0.16.0",
"updated_at": "2017-08-24T09:17:49Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25"
} | 2 | 2014-06-16T17:29:55Z | 2014-08-05T21:50:04Z | 2014-08-05T15:43:12Z | CONTRIBUTOR | null | closes #7475
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7476/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7476/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7476.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7476",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/7476.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7476"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7477 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7477/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7477/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7477/events | https://github.com/pandas-dev/pandas/issues/7477 | 35,822,945 | MDU6SXNzdWUzNTgyMjk0NQ== | 7,477 | IO: memory_map kw in read_csv | {
"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"
},
{
"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": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
}
]
| closed | false | null | []
| {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 2 | 2014-06-16T18:27:51Z | 2016-06-08T11:25:44Z | 2016-06-08T11:25:44Z | CONTRIBUTOR | null | not sure of the purpose of `memory_map` (e.g. whether its needed anymore or not). might be an older option. If it IS current, then needs to be documented.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7477/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7477/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7478 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7478/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7478/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7478/events | https://github.com/pandas-dev/pandas/pull/7478 | 35,831,065 | MDExOlB1bGxSZXF1ZXN0MTcxOTkzODA= | 7,478 | Fix cache key collision and add test for cache key distinctness. | {
"avatar_url": "https://avatars.githubusercontent.com/u/6034908?v=4",
"events_url": "https://api.github.com/users/dbew/events{/privacy}",
"followers_url": "https://api.github.com/users/dbew/followers",
"following_url": "https://api.github.com/users/dbew/following{/other_user}",
"gists_url": "https://api.github.com/users/dbew/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dbew",
"id": 6034908,
"login": "dbew",
"node_id": "MDQ6VXNlcjYwMzQ5MDg=",
"organizations_url": "https://api.github.com/users/dbew/orgs",
"received_events_url": "https://api.github.com/users/dbew/received_events",
"repos_url": "https://api.github.com/users/dbew/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dbew/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dbew/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dbew"
} | [
{
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 5 | 2014-06-16T20:04:54Z | 2014-06-17T09:56:00Z | 2014-06-17T00:18:00Z | CONTRIBUTOR | null | Fixes #7420.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7478/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7478/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7478.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7478",
"merged_at": "2014-06-17T00:18:00Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7478.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7478"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7479 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7479/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7479/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7479/events | https://github.com/pandas-dev/pandas/pull/7479 | 35,851,231 | MDExOlB1bGxSZXF1ZXN0MTcyMTI0MjE= | 7,479 | BUG: Make copies of certain interpolate arguments (GH7295) | {
"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": "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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 4 | 2014-06-17T01:32:57Z | 2014-06-17T11:23:03Z | 2014-06-17T11:22:59Z | CONTRIBUTOR | null | closes #7295
On the alt_methods branch in interpolate_1d, make copies if x, y, and new_x don't have their `writeable` attribute set. It seems a little weird that we need to do this, but it'll work around the issue so that the test can pass, anyway.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7479/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7479/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7479.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7479",
"merged_at": "2014-06-17T11:22:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7479.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7479"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7480 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7480/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7480/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7480/events | https://github.com/pandas-dev/pandas/issues/7480 | 35,852,479 | MDU6SXNzdWUzNTg1MjQ3OQ== | 7,480 | Conditional Join (merge) in pandas | {
"avatar_url": "https://avatars.githubusercontent.com/u/4349929?v=4",
"events_url": "https://api.github.com/users/ywhcuhk/events{/privacy}",
"followers_url": "https://api.github.com/users/ywhcuhk/followers",
"following_url": "https://api.github.com/users/ywhcuhk/following{/other_user}",
"gists_url": "https://api.github.com/users/ywhcuhk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ywhcuhk",
"id": 4349929,
"login": "ywhcuhk",
"node_id": "MDQ6VXNlcjQzNDk5Mjk=",
"organizations_url": "https://api.github.com/users/ywhcuhk/orgs",
"received_events_url": "https://api.github.com/users/ywhcuhk/received_events",
"repos_url": "https://api.github.com/users/ywhcuhk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ywhcuhk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ywhcuhk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ywhcuhk"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "02d7e1",
"default": false,
"description": "Concat, Merge/Join, Stack/Unstack, Explode",
"id": 13098779,
"name": "Reshaping",
"node_id": "MDU6TGFiZWwxMzA5ODc3OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Reshaping"
}
]
| 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"
} | 2 | 2014-06-17T02:03:46Z | 2021-04-11T05:52:53Z | 2021-04-11T05:52:52Z | NONE | null | I wonder if it possible to implement conditional join (merge) between pandas dataframes. Basically, I am thinking some conditional SQL-like joins:
```
select a.id, a.date, a.var1, a.var2,
b.var3
from data1 as a left join data2 as b
on (a.id<b.key+2 and a.id>b.key-3) and (a.date>b.date-10 and a.date<b.date+10);
```
Above code is just a made up example to show the purpose.
---
http://stackoverflow.com/questions/23508351/how-to-do-a-conditional-join-in-python-pandas
This question on stackoverflow is ask for the same purpose. The answer provided in the question solves the problem, but it's quite ad hoc.
Can we have something like:
```
conditions= " (a.id<b.key+2 and a.id>b.key-3) and (a.date>b.date-10 and a.date<b.date+10)"
df=pd.merge(left, right, on= "conditions", how="left (or right...) ")
```
It seems until now, the SQL statements are still way more flexible than pandas "merge" or "join". It would be nice to have it in pandas itself.
| {
"+1": 10,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 10,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7480/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7480/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7481 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7481/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7481/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7481/events | https://github.com/pandas-dev/pandas/pull/7481 | 35,852,902 | MDExOlB1bGxSZXF1ZXN0MTcyMTMzNzg= | 7,481 | BUG/WIP: fix pivot with nan indexes | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"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 | {
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/417981?v=4",
"events_url": "https://api.github.com/users/cpcloud/events{/privacy}",
"followers_url": "https://api.github.com/users/cpcloud/followers",
"following_url": "https://api.github.com/users/cpcloud/following{/other_user}",
"gists_url": "https://api.github.com/users/cpcloud/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpcloud",
"id": 417981,
"login": "cpcloud",
"node_id": "MDQ6VXNlcjQxNzk4MQ==",
"organizations_url": "https://api.github.com/users/cpcloud/orgs",
"received_events_url": "https://api.github.com/users/cpcloud/received_events",
"repos_url": "https://api.github.com/users/cpcloud/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpcloud/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpcloud/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpcloud"
}
]
| {
"closed_at": "2015-03-23T10:50:37Z",
"closed_issues": 400,
"created_at": "2014-02-14T03:31:22Z",
"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.15 of course!",
"due_on": "2015-03-22T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/25",
"id": 569113,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25/labels",
"node_id": "MDk6TWlsZXN0b25lNTY5MTEz",
"number": 25,
"open_issues": 0,
"state": "closed",
"title": "0.16.0",
"updated_at": "2017-08-24T09:17:49Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/25"
} | 6 | 2014-06-17T02:13:49Z | 2015-01-25T23:30:05Z | 2015-01-25T23:30:05Z | MEMBER | null | closes #7466
- [ ] vbench
- [ ] make sure there isn't a better way to do this
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7481/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7481/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7481.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7481",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/7481.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7481"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7482 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7482/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7482/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7482/events | https://github.com/pandas-dev/pandas/issues/7482 | 35,857,693 | MDU6SXNzdWUzNTg1NzY5Mw== | 7,482 | warning issued for new version of openpyxl (2.0.3) | {
"avatar_url": "https://avatars.githubusercontent.com/u/6469101?v=4",
"events_url": "https://api.github.com/users/bidhya/events{/privacy}",
"followers_url": "https://api.github.com/users/bidhya/followers",
"following_url": "https://api.github.com/users/bidhya/following{/other_user}",
"gists_url": "https://api.github.com/users/bidhya/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bidhya",
"id": 6469101,
"login": "bidhya",
"node_id": "MDQ6VXNlcjY0NjkxMDE=",
"organizations_url": "https://api.github.com/users/bidhya/orgs",
"received_events_url": "https://api.github.com/users/bidhya/received_events",
"repos_url": "https://api.github.com/users/bidhya/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bidhya/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bidhya/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bidhya"
} | []
| closed | false | null | []
| null | 2 | 2014-06-17T04:39:59Z | 2014-06-17T08:21:15Z | 2014-06-17T08:21:15Z | NONE | null | "import pandas" issues the following warning
C:\Users\aaa\AppData\Local\Enthought\Canopy32\User\lib\site-packages\pandas\io\excel.py:626: UserWarning: Installed openpyxl is not supported at this time. Use >=1.6.1 and <2.0.0.
.format(openpyxl_compat.start_ver, openpyxl_compat.stop_ver))
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7482/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7482/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7483 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7483/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7483/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7483/events | https://github.com/pandas-dev/pandas/pull/7483 | 35,889,280 | MDExOlB1bGxSZXF1ZXN0MTcyMzUyNTg= | 7,483 | DOC: fix docstring of value_counts/nunique dropna argument after GH7424 | {
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 2 | 2014-06-17T13:38:20Z | 2014-07-07T19:11:41Z | 2014-07-07T19:11:41Z | MEMBER | null | See #7424, fix docstring.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7483/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7483/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7483.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7483",
"merged_at": "2014-07-07T19:11:41Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7483.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7483"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7484 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7484/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7484/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7484/events | https://github.com/pandas-dev/pandas/pull/7484 | 35,904,753 | MDExOlB1bGxSZXF1ZXN0MTcyNDQ2OTU= | 7,484 | DOC: Clean up docs for io.data.Options. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5957850?v=4",
"events_url": "https://api.github.com/users/davidastephens/events{/privacy}",
"followers_url": "https://api.github.com/users/davidastephens/followers",
"following_url": "https://api.github.com/users/davidastephens/following{/other_user}",
"gists_url": "https://api.github.com/users/davidastephens/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidastephens",
"id": 5957850,
"login": "davidastephens",
"node_id": "MDQ6VXNlcjU5NTc4NTA=",
"organizations_url": "https://api.github.com/users/davidastephens/orgs",
"received_events_url": "https://api.github.com/users/davidastephens/received_events",
"repos_url": "https://api.github.com/users/davidastephens/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidastephens/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidastephens/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidastephens"
} | [
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 9 | 2014-06-17T16:04:01Z | 2014-06-18T09:35:51Z | 2014-06-17T18:52:02Z | CONTRIBUTOR | null | Per conversation on #5602, adjusted some of the docs.
Removed from release.rst, changed example strike price for AAPL, fixed backticks.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7484/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7484/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7484.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7484",
"merged_at": "2014-06-17T18:52:02Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7484.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7484"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7485 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7485/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7485/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7485/events | https://github.com/pandas-dev/pandas/pull/7485 | 35,904,823 | MDExOlB1bGxSZXF1ZXN0MTcyNDQ3NDg= | 7,485 | ENH/BUG: Period/PeriodIndex supports NaT | {
"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": "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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-17T16:04:40Z | 2014-06-20T14:45:55Z | 2014-06-19T19:27:10Z | MEMBER | null | Closes #7228. Closes #4731.
`Period` and `PeriodIndex` now can contain `NaT` using `iNaT` as its internal value.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7485/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7485/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7485.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7485",
"merged_at": "2014-06-19T19:27:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7485.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7485"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7486 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7486/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7486/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7486/events | https://github.com/pandas-dev/pandas/issues/7486 | 35,914,455 | MDU6SXNzdWUzNTkxNDQ1NQ== | 7,486 | Packaging: `pip install pandas` pulls in numpy 1.8.1, but isn't linked against that version | {
"avatar_url": "https://avatars.githubusercontent.com/u/2435101?v=4",
"events_url": "https://api.github.com/users/Redoubts/events{/privacy}",
"followers_url": "https://api.github.com/users/Redoubts/followers",
"following_url": "https://api.github.com/users/Redoubts/following{/other_user}",
"gists_url": "https://api.github.com/users/Redoubts/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Redoubts",
"id": 2435101,
"login": "Redoubts",
"node_id": "MDQ6VXNlcjI0MzUxMDE=",
"organizations_url": "https://api.github.com/users/Redoubts/orgs",
"received_events_url": "https://api.github.com/users/Redoubts/received_events",
"repos_url": "https://api.github.com/users/Redoubts/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Redoubts/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Redoubts/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Redoubts"
} | []
| closed | false | null | []
| null | 9 | 2014-06-17T17:52:31Z | 2014-06-17T22:58:25Z | 2014-06-17T18:15:41Z | NONE | null | `import pandas` fails with `ValueError: numpy.dtype has the wrong size, try recompiling`, which I would guess is due to the above.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7486/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7486/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7487 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7487/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7487/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7487/events | https://github.com/pandas-dev/pandas/pull/7487 | 35,944,959 | MDExOlB1bGxSZXF1ZXN0MTcyNjk3OTE= | 7,487 | Switch if to elif, effectively repairing the unicode r_dtype branch | {
"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"
} | []
| closed | false | null | []
| null | 0 | 2014-06-18T00:27:42Z | 2014-06-18T00:31:41Z | 2014-06-18T00:31:41Z | CONTRIBUTOR | null | in test_to_csv_moar._do_test.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7487/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7487/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7487.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7487",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/7487.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7487"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7488 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7488/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7488/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7488/events | https://github.com/pandas-dev/pandas/pull/7488 | 35,945,165 | MDExOlB1bGxSZXF1ZXN0MTcyNjk5MDg= | 7,488 | Switch if to elif in test_frame.test_to_csv_moar._do_test | {
"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"
} | []
| closed | false | null | []
| null | 1 | 2014-06-18T00:31:58Z | 2014-06-18T12:19:29Z | 2014-06-18T12:19:26Z | CONTRIBUTOR | null | An if-elif-else chain had an "if" where there should have been an elif.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7488/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7488/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7488.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7488",
"merged_at": "2014-06-18T12:19:26Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7488.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7488"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7489 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7489/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7489/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7489/events | https://github.com/pandas-dev/pandas/pull/7489 | 35,947,991 | MDExOlB1bGxSZXF1ZXN0MTcyNzE2MTg= | 7,489 | [doc fix] minor docstring update to fix df.to_latex() usepackage syntax | {
"avatar_url": "https://avatars.githubusercontent.com/u/3282792?v=4",
"events_url": "https://api.github.com/users/sanguineturtle/events{/privacy}",
"followers_url": "https://api.github.com/users/sanguineturtle/followers",
"following_url": "https://api.github.com/users/sanguineturtle/following{/other_user}",
"gists_url": "https://api.github.com/users/sanguineturtle/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sanguineturtle",
"id": 3282792,
"login": "sanguineturtle",
"node_id": "MDQ6VXNlcjMyODI3OTI=",
"organizations_url": "https://api.github.com/users/sanguineturtle/orgs",
"received_events_url": "https://api.github.com/users/sanguineturtle/received_events",
"repos_url": "https://api.github.com/users/sanguineturtle/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sanguineturtle/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sanguineturtle/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sanguineturtle"
} | []
| closed | false | null | []
| null | 1 | 2014-06-18T01:40:13Z | 2014-06-18T06:49:43Z | 2014-06-18T06:49:39Z | NONE | null | Minor docstring fix for option `DF.to_latex()` for `\\usepackage{booktabs}`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7489/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7489/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7489.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7489",
"merged_at": "2014-06-18T06:49:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7489.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7489"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7490 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7490/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7490/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7490/events | https://github.com/pandas-dev/pandas/issues/7490 | 35,956,340 | MDU6SXNzdWUzNTk1NjM0MA== | 7,490 | API: support multiple indexers for .iloc with a MultiIndex | {
"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"
} | []
| closed | false | null | []
| null | 14 | 2014-06-18T05:46:47Z | 2014-06-23T09:40:30Z | 2014-06-23T09:40:30Z | MEMBER | null | MultIndexing with multiple indexers (#6301) via `.loc` is great.
It would be nice to mirror this functionality with `.iloc`.
To my understanding, until this change, `loc` and `iloc` had a mirror syntax, where if you replaced all of your index labels with arrays of 0-indexed integers, they were equivalent, e.g., for the following series:
```
import pandas as pd
midx = pd.MultiIndex.from_product([range(3), range(5)])
s = pd.Series(range(15), midx)
```
Now they lack this symmetry, because indexing like `s.iloc[0, 0]` doesn't work like `s.loc[0, 0]`. I found this surprising. Thoughts?
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7490/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7490/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7491 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7491/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7491/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7491/events | https://github.com/pandas-dev/pandas/issues/7491 | 35,961,607 | MDU6SXNzdWUzNTk2MTYwNw== | 7,491 | DOC: latex symbols/equations not rendering in stable docs | {
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-18T07:49:27Z | 2014-07-06T12:16:12Z | 2014-07-06T12:16:12Z | MEMBER | null | Seems somehing went wrong when I built the docs for the 0.14 version, eg http://pandas.pydata.org/pandas-docs/stable/computation.html#exponentially-weighted-moment-functions.
Have to look into it, reporting it here as an issue to not forget it for 0.14.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/7491/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7491/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7492 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7492/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7492/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7492/events | https://github.com/pandas-dev/pandas/issues/7492 | 35,964,363 | MDU6SXNzdWUzNTk2NDM2Mw== | 7,492 | Assigning datetime array to column fails with OutOfBoundsDatetime when having NaT and other unit as [ns] | {
"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": "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": "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"
} | 1 | 2014-06-18T08:35:24Z | 2016-12-17T23:13:43Z | 2016-12-17T23:13:43Z | MEMBER | null | Assigning an array with datetime64[ns] values including a NaT just works:
```
In [85]: a = np.array([1, 'nat'], dtype='datetime64[ns]')
In [86]: pd.Series(a)
Out[86]:
0 1970-01-01 00:00:00.000000001
1 NaT
dtype: datetime64[ns]
In [88]: df = pd.Series(a).to_frame()
In [89]: df['new'] = a
```
But when having an array with another date unit, converting it to a Series still works, but assigning it directly to a column not anymore, resulting in a OutOfBoundsDatetime error:
```
In [90]: a = np.array([1, 'nat'], dtype='datetime64[s]')
In [91]: pd.Series(a)
Out[91]:
0 1970-01-01 00:00:01
1 NaT
dtype: datetime64[ns]
In [92]: df['new'] = a
Traceback (most recent call last):
...
File "tslib.pyx", line 1720, in pandas.tslib.cast_to_nanoseconds (pandas\tslib.c:27435)
File "tslib.pyx", line 1023, in pandas.tslib._check_dts_bounds (pandas\tslib.c:18102)
OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 292277026596-12-03 08:29:52
```
If you first convert it to a series, it does work. Also if the `NaT` is not present:
```
In [93]: df['new'] = pd.Series(a)
In [94]: a = np.array([1, 2], dtype='datetime64[s]')
In [95]: df['new'] = a
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7492/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7492/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7493 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7493/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7493/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7493/events | https://github.com/pandas-dev/pandas/issues/7493 | 35,972,762 | MDU6SXNzdWUzNTk3Mjc2Mg== | 7,493 | Performance degradation in pandas 0.13/0.14 | {
"avatar_url": "https://avatars.githubusercontent.com/u/60383?v=4",
"events_url": "https://api.github.com/users/davaco/events{/privacy}",
"followers_url": "https://api.github.com/users/davaco/followers",
"following_url": "https://api.github.com/users/davaco/following{/other_user}",
"gists_url": "https://api.github.com/users/davaco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davaco",
"id": 60383,
"login": "davaco",
"node_id": "MDQ6VXNlcjYwMzgz",
"organizations_url": "https://api.github.com/users/davaco/orgs",
"received_events_url": "https://api.github.com/users/davaco/received_events",
"repos_url": "https://api.github.com/users/davaco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davaco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davaco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davaco"
} | [
{
"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": "fbca04",
"default": false,
"description": "Related to non-user accessible pandas implementation",
"id": 49094459,
"name": "Internals",
"node_id": "MDU6TGFiZWw0OTA5NDQ1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Internals"
}
]
| closed | false | null | []
| {
"closed_at": 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"
} | 10 | 2014-06-18T10:40:22Z | 2015-09-20T20:41:21Z | 2015-09-20T20:41:21Z | NONE | null | I reported previously on issue #7208. It was noted that .ix was slower as of pandas 0.13 but that this should be only noticeable in non-vectorized code. I sometimes however have trouble vectorizing everything. Please consider the following code in which I have a rather big correlation matrix, using multi-indexed columns. I would like to set the diagonal elements equal to 1.
```
from pandas import *
import numpy as np
import pandas
import string
def diag(cor, assets):
for asset in assets:
cor.ix[:, (asset, asset)] = 1
# create a multi-indexed column axis like ('A', 'A'), ('A', 'B'), ...
assets = list(string.ascii_uppercase)
columns = MultiIndex.from_tuples([(a, b) for a in assets for b in assets])
# create the correlation matrix
cor = DataFrame(np.random.rand(10000,676), index=date_range('1977/1/1', periods=10000, freq='D'), columns=columns)
%time diag(cor, assets)
```
On my machine this takes approx. 9 ms in pandas 0.12, 5.3 seconds using pandas 0.14 (!).
Maybe the above code could be vectorized, then I would be curious on the how. However my concern is that I cannot always vectorize, in which case Pandas to me seems to display performance degradation each time when I go to the next version, from 0.11 onwards. Any comments / help will be greatly 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/7493/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7493/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7494 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7494/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7494/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7494/events | https://github.com/pandas-dev/pandas/issues/7494 | 35,979,717 | MDU6SXNzdWUzNTk3OTcxNw== | 7,494 | Series.shift and DataFrame.shift do not preserve dtype | {
"avatar_url": "https://avatars.githubusercontent.com/u/5427958?v=4",
"events_url": "https://api.github.com/users/roveo/events{/privacy}",
"followers_url": "https://api.github.com/users/roveo/followers",
"following_url": "https://api.github.com/users/roveo/following{/other_user}",
"gists_url": "https://api.github.com/users/roveo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/roveo",
"id": 5427958,
"login": "roveo",
"node_id": "MDQ6VXNlcjU0Mjc5NTg=",
"organizations_url": "https://api.github.com/users/roveo/orgs",
"received_events_url": "https://api.github.com/users/roveo/received_events",
"repos_url": "https://api.github.com/users/roveo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/roveo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/roveo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/roveo"
} | [
{
"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 | 2014-06-18T12:32:22Z | 2014-07-07T15:44:35Z | 2014-07-07T15:44:35Z | NONE | null | shift() method converts int32 to float64, and you need an extra step to convert it back
``` py
s = Series(range(100), dtype=np.int32)
print s.dtype, s.shift(1).dtype
```
Version 0.14
The documentation says otherwise:
Returns : shifted : same type as caller
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7494/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7494/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7495 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7495/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7495/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7495/events | https://github.com/pandas-dev/pandas/pull/7495 | 35,992,040 | MDExOlB1bGxSZXF1ZXN0MTcyOTcxNzc= | 7,495 | DOC: Fix index error for remote data docs. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5957850?v=4",
"events_url": "https://api.github.com/users/davidastephens/events{/privacy}",
"followers_url": "https://api.github.com/users/davidastephens/followers",
"following_url": "https://api.github.com/users/davidastephens/following{/other_user}",
"gists_url": "https://api.github.com/users/davidastephens/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidastephens",
"id": 5957850,
"login": "davidastephens",
"node_id": "MDQ6VXNlcjU5NTc4NTA=",
"organizations_url": "https://api.github.com/users/davidastephens/orgs",
"received_events_url": "https://api.github.com/users/davidastephens/received_events",
"repos_url": "https://api.github.com/users/davidastephens/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidastephens/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidastephens/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidastephens"
} | []
| closed | false | null | []
| null | 4 | 2014-06-18T14:40:36Z | 2014-06-18T16:23:14Z | 2014-06-18T16:23:09Z | CONTRIBUTOR | null | Fixes the index error caused by #7484. Also removes duplicate example in v0.14.1.txt
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7495/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7495/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7495.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7495",
"merged_at": "2014-06-18T16:23:09Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7495.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7495"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7496 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7496/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7496/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7496/events | https://github.com/pandas-dev/pandas/issues/7496 | 35,994,959 | MDU6SXNzdWUzNTk5NDk1OQ== | 7,496 | BUG: strange behavior of .loc indexer: falling back to integer-based indexing with list | {
"avatar_url": "https://avatars.githubusercontent.com/u/314085?v=4",
"events_url": "https://api.github.com/users/podshumok/events{/privacy}",
"followers_url": "https://api.github.com/users/podshumok/followers",
"following_url": "https://api.github.com/users/podshumok/following{/other_user}",
"gists_url": "https://api.github.com/users/podshumok/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/podshumok",
"id": 314085,
"login": "podshumok",
"node_id": "MDQ6VXNlcjMxNDA4NQ==",
"organizations_url": "https://api.github.com/users/podshumok/orgs",
"received_events_url": "https://api.github.com/users/podshumok/received_events",
"repos_url": "https://api.github.com/users/podshumok/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/podshumok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/podshumok/subscriptions",
"type": "User",
"url": "https://api.github.com/users/podshumok"
} | [
{
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-18T15:08:06Z | 2014-06-19T09:53:10Z | 2014-06-19T09:53:10Z | NONE | null | ```
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>> a = pandas.Series()
>>> a.loc[1] = 1
>>> a.loc['a'] = 2
>>> a.loc[[-1, -2]]
1 1
a 2
dtype: int64
```
This is ok:
```
>>> a.loc[-1]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/venv/local/lib/python2.7/site-packages/pandas/core/indexing.py", line 1129, in __getitem__
return self._getitem_axis(key, axis=0)
File "/tmp/venv/local/lib/python2.7/site-packages/pandas/core/indexing.py", line 1261, in _getitem_axis
self._has_valid_type(key, axis)
File "/tmp/venv/local/lib/python2.7/site-packages/pandas/core/indexing.py", line 1234, in _has_valid_type
error()
File "/tmp/venv/local/lib/python2.7/site-packages/pandas/core/indexing.py", line 1221, in error
(key, self.obj._get_axis_name(axis)))
KeyError: 'the label [-1] is not in the [index]'
```
This is ok too:
```
>>> a.loc[['W']]
W NaN
dtype: float64
```
But this is not:
```
>>> a.loc[-1] = 3
>>> a.loc[[-1, -2]]
-1 3
1 1
dtype: int64
```
And this is not good at all:
```
>>> a
1 1
-1 3
dtype: int64
>>> a['a'] = 2
>>> a
1 1
-1 3
a 2
dtype: int64
>>> a.loc[[-2]] = 0
>>> a
1 0
-1 3
a 2
dtype: int64
```
Without `'a'` string in the index it raises while I expect new item (`{-2: 0}`) to be added
```
>>> del a['a']
>>> a.loc[[-2]] = 0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/venv/local/lib/python2.7/site-packages/pandas/core/indexing.py", line 117, in __setitem__
indexer = self._convert_to_indexer(key, is_setter=True)
File "/tmp/venv/local/lib/python2.7/site-packages/pandas/core/indexing.py", line 1068, in _convert_to_indexer
raise KeyError('%s not in index' % objarr[mask])
KeyError: '[-2] not in 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/7496/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7496/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7497 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7497/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7497/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7497/events | https://github.com/pandas-dev/pandas/pull/7497 | 35,997,249 | MDExOlB1bGxSZXF1ZXN0MTczMDAzNzI= | 7,497 | BUG: Bug in .loc performing fallback integer indexing with object dtype indices (GH7496) | {
"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": "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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-18T15:29:24Z | 2014-06-19T09:53:10Z | 2014-06-19T09:53:10Z | CONTRIBUTOR | null | closes #7496
```
In [4]: s = Series()
In [5]: s.loc[1] = 1
In [6]: s.loc['a'] = 2
In [7]: s.loc[-1]
KeyError: 'the label [-1] is not in the [index]'
In [8]: s.loc[[-1, -2]]
Out[8]:
-1 NaN
-2 NaN
dtype: float64
In [9]: s.loc[['4']]
Out[9]:
4 NaN
dtype: float64
In [10]: s.loc[-1] = 3
In [11]: s.loc[[-1,-2]]
Out[11]:
-1 3
-2 NaN
dtype: float64
In [12]: s['a'] = 2
In [13]: s.loc[[-2]]
Out[13]:
-2 NaN
dtype: float64
In [14]: del s['a']
In [15]: s.loc[[-2]] = 0
KeyError: '[-2] not in 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/7497/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7497/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7497.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7497",
"merged_at": "2014-06-19T09:53:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7497.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7497"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7498 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7498/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7498/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7498/events | https://github.com/pandas-dev/pandas/issues/7498 | 35,999,914 | MDU6SXNzdWUzNTk5OTkxNA== | 7,498 | Bar plots are misaligned by default | {
"avatar_url": "https://avatars.githubusercontent.com/u/81476?v=4",
"events_url": "https://api.github.com/users/fonnesbeck/events{/privacy}",
"followers_url": "https://api.github.com/users/fonnesbeck/followers",
"following_url": "https://api.github.com/users/fonnesbeck/following{/other_user}",
"gists_url": "https://api.github.com/users/fonnesbeck/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fonnesbeck",
"id": 81476,
"login": "fonnesbeck",
"node_id": "MDQ6VXNlcjgxNDc2",
"organizations_url": "https://api.github.com/users/fonnesbeck/orgs",
"received_events_url": "https://api.github.com/users/fonnesbeck/received_events",
"repos_url": "https://api.github.com/users/fonnesbeck/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fonnesbeck/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fonnesbeck/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fonnesbeck"
} | [
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-18T15:55:24Z | 2014-07-01T15:29:53Z | 2014-07-01T15:29:53Z | NONE | null | There has been a recent change in bar plot default behavior that is causing misalignment of the bars on the y-axis. I'm not sure when this change occurred, but I will estimate 3-4 months ago.
Previously, bar plots looked like this:

However, the same code under '0.14.0-205-gbbde837' yields the following (ignore the theme differences):

So, the bars are bizarrely pushed to the right. Is matplotlib to blame for this (running 1.4.x)?
Running Python 2.7.6 (homebrew) on OS X 10.9.3.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7498/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7498/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/7499 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7499/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7499/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7499/events | https://github.com/pandas-dev/pandas/pull/7499 | 36,016,539 | MDExOlB1bGxSZXF1ZXN0MTczMTIzMzY= | 7,499 | Deprecate detection of IPython frontends | {
"avatar_url": "https://avatars.githubusercontent.com/u/327925?v=4",
"events_url": "https://api.github.com/users/takluyver/events{/privacy}",
"followers_url": "https://api.github.com/users/takluyver/followers",
"following_url": "https://api.github.com/users/takluyver/following{/other_user}",
"gists_url": "https://api.github.com/users/takluyver/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/takluyver",
"id": 327925,
"login": "takluyver",
"node_id": "MDQ6VXNlcjMyNzkyNQ==",
"organizations_url": "https://api.github.com/users/takluyver/orgs",
"received_events_url": "https://api.github.com/users/takluyver/received_events",
"repos_url": "https://api.github.com/users/takluyver/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/takluyver/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/takluyver/subscriptions",
"type": "User",
"url": "https://api.github.com/users/takluyver"
} | [
{
"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": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 7 | 2014-06-18T18:58:40Z | 2014-06-24T22:01:53Z | 2014-06-24T22:01:49Z | CONTRIBUTOR | null | The check for the Qt console won't be necessary in IPython 3 and above: we decided that the Qt console's display of HTML reprs was so bad that it shouldn't attempt to show them. We also want to remove the `parent_appname` config value (ipython/ipython#4980), which will break both of these functions (making them always return False).
The assignment to `ipnbh` was redundant - nothing used that variable. I guess it was used previously and didn't get cleaned up during some changes (quite possibly my own omission).
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7499/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7499/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/7499.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/7499",
"merged_at": "2014-06-24T22:01:49Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/7499.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/7499"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/7500 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/7500/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/7500/comments | https://api.github.com/repos/pandas-dev/pandas/issues/7500/events | https://github.com/pandas-dev/pandas/issues/7500 | 36,017,989 | MDU6SXNzdWUzNjAxNzk4OQ== | 7,500 | Possible Bug - math on like-indexed datetime series doesn't work as expected | {
"avatar_url": "https://avatars.githubusercontent.com/u/4734283?v=4",
"events_url": "https://api.github.com/users/aullrich2013/events{/privacy}",
"followers_url": "https://api.github.com/users/aullrich2013/followers",
"following_url": "https://api.github.com/users/aullrich2013/following{/other_user}",
"gists_url": "https://api.github.com/users/aullrich2013/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aullrich2013",
"id": 4734283,
"login": "aullrich2013",
"node_id": "MDQ6VXNlcjQ3MzQyODM=",
"organizations_url": "https://api.github.com/users/aullrich2013/orgs",
"received_events_url": "https://api.github.com/users/aullrich2013/received_events",
"repos_url": "https://api.github.com/users/aullrich2013/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aullrich2013/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aullrich2013/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aullrich2013"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
},
{
"color": "5319e7",
"default": false,
"description": "Timedelta data type",
"id": 49597148,
"name": "Timedelta",
"node_id": "MDU6TGFiZWw0OTU5NzE0OA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timedelta"
}
]
| closed | false | null | []
| {
"closed_at": "2014-07-11T00:02:53Z",
"closed_issues": 306,
"created_at": "2014-04-27T23:40:28Z",
"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": "bug fixes from 0.14.0",
"due_on": "2014-07-11T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/27",
"id": 641843,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27/labels",
"node_id": "MDk6TWlsZXN0b25lNjQxODQz",
"number": 27,
"open_issues": 0,
"state": "closed",
"title": "0.14.1",
"updated_at": "2014-09-05T10:24:18Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/27"
} | 3 | 2014-06-18T19:15:25Z | 2014-06-19T00:01:48Z | 2014-06-19T00:01:34Z | NONE | null | 

I have two series that are like-indexed datetimes. I'm trying to do simple math operations on them and noticed the results don't match what I'd expect. Specifically, subtracting one datetime from the other doesn't always result in subtraction across the aligned indices. Transforming the series to a dataframe with a dummy column gets us closer but the type manipulation isn't correct.
``` python
print firstOrderNotEval.loc[site]
print firstEvalOrder.loc[site]
print type(firstOrderNotEval.loc[site])
print type(firstEvalOrder.loc[site])
### output:
#2008-08-21 00:00:00
#2013-09-10 00:00:00
# <class 'pandas.tslib.Timestamp'>
# <class 'pandas.tslib.Timestamp'>
timeToFirstNonEvalPurchase_doesntWork = ((firstOrderNotEval - firstEvalOrder)/np.timedelta64(1,'D'))
timeToFirstNonEvalPurchase = ((firstOrderNotEval.to_frame('a') - firstEvalOrder.to_frame('a'))/np.timedelta64(1,'D'))['a']
print timeToFirstNonEvalPurchase_doesntWork.loc[2898717]
print timeToFirstNonEvalPurchase.loc[2898717]
### output:
# nan
# -1846 nanoseconds # note should be 1846 days
```
Subtracting individual elements gives the correct result but as a datetime.timedelta type. subtracting the series directly gives NaT:
``` python
site = 2898717
print (firstOrderNotEval.loc[site] - firstEvalOrder.loc[site])
print type(firstOrderNotEval.loc[site] - firstEvalOrder.loc[site])
print (firstOrderNotEval - firstEvalOrder).loc[site]
### output:
# -1846 days, 0:00:00
# <type 'datetime.timedelta'>
# NaT
```
Perhaps this has to do with the timestamp type itself given the following example:
``` python
print (firstOrderNotEval.to_frame('a') - firstEvalOrder.to_frame('a')).loc[site]/np.timedelta64(1,'D')
print ((firstOrderNotEval.to_frame('a') - firstEvalOrder.to_frame('a'))/np.timedelta64(1,'D')).loc[site]
### output:
# a -1846
# Name: 2898717.0, dtype: float64
# a -00:00:00.000002
# Name: 2898717.0, dtype: timedelta64[ns]
```
Note that the following have different results based on how the divide by timedelta64 is performed:
``` python
tmp = ((firstOrderNotEval.to_frame('a') - firstEvalOrder.to_frame('a')))
print (tmp/np.timedelta64(1,'D')).loc[site]
print tmp.apply(lambda x: x/np.timedelta64(1,'D')).loc[site]
### output:
# a -00:00:00.000002
# Name: 2898717.0, dtype: timedelta64[ns]
### what we'd expect:
# a -1846
# Name: 2898717.0, dtype: float64
```
The attached pickle files (as .jpg) include the series used in this example
``` python
firstOrderNotEval.to_pickle('./firstOrderNotEval.jpg')
firstEvalOrder.to_pickle('./firstEvalOrder.jpg')
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/7500/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/7500/timeline | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.