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/26213 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26213/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26213/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26213/events | https://github.com/pandas-dev/pandas/issues/26213 | 437,479,996 | MDU6SXNzdWU0Mzc0Nzk5OTY= | 26,213 | Joining an empty DataFrame with 'on' argument can result in an invalid DataFrame | {
"avatar_url": "https://avatars.githubusercontent.com/u/1144026?v=4",
"events_url": "https://api.github.com/users/robertmollitor/events{/privacy}",
"followers_url": "https://api.github.com/users/robertmollitor/followers",
"following_url": "https://api.github.com/users/robertmollitor/following{/other_user}",
"gists_url": "https://api.github.com/users/robertmollitor/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/robertmollitor",
"id": 1144026,
"login": "robertmollitor",
"node_id": "MDQ6VXNlcjExNDQwMjY=",
"organizations_url": "https://api.github.com/users/robertmollitor/orgs",
"received_events_url": "https://api.github.com/users/robertmollitor/received_events",
"repos_url": "https://api.github.com/users/robertmollitor/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/robertmollitor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/robertmollitor/subscriptions",
"type": "User",
"url": "https://api.github.com/users/robertmollitor"
} | [
{
"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, Stac... | open | false | null | [] | null | 1 | 2019-04-26T03:11:15Z | 2021-07-02T05:36:05Z | null | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
left = pd.DataFrame(
[(11, 21, 31),
(11, 22, 32),
(11, 23, 33),
(12, 21, 34),
(12, 22, 35)],
columns=['A', 'B', 'C'])
right1 = pd. DataFrame(
[(11, 22, 41, 51),
(11, 23, 42, 52),
(12, 23, 43, 53)],
columns=['A', 'B', 'D', 'E'])
right2 = pd. DataFrame(
[(11, 22, 61),
(12, 21, 62),
(12, 23, 63)],
columns=['A', 'B', 'F'])
inner1 = left.join(right1.set_index(['A', 'B']), how='inner', on=['A', 'B'])
print("INNER1")
print(inner1)
print(" INDEX")
print(inner1.index)
print(" JSON")
print(inner1.to_json(orient='table'))
print()
inner1.reset_index()
inner2 = inner1.join(right2.set_index(['A', 'B']), how='inner', on=['A', 'B'])
print("INNER2")
print(inner2)
print(" INDEX")
print(inner2.index)
print(" JSON")
print(inner2.to_json(orient='table'))
print()
empty_left = left.drop(index=left.index)
empty_inner1 = empty_left.join(right1.set_index(['A', 'B']), how='inner', on=['A', 'B'])
print("EMPTY_INNER1")
print(empty_inner1)
print(" INDEX")
print(empty_inner1.index)
print()
# OUTPUT:
#
# EMPTY_INNER1
# Empty DataFrame
# Columns: [A, B, C, D, E]
# Index: []
# INDEX
# MultiIndex(levels=[[11, 12], [22, 23]],
# codes=[[], []],
# names=['A', 'B'])
#
# PROBLEM:
#
# Because of this code in _MergeOperation._get_join_info
#
# if self.right_index:
# if len(self.left) > 0:
# join_index = self._create_join_index(self.left.index,
# self.right.index,
# left_indexer,
# right_indexer,
# how='right')
# else:
# join_index = self.right.index.take(right_indexer)
# left_indexer = np.array([-1] * len(join_index))
#
# the join_index is based on self.right.index when len(self.left) == 0, but
# the "result" table should have an unnamed default index (like the "left" table),
# not a named MultiIndex. The 'names' in particular are the bad state because
# those names are still column names in the result table. This causes the following
# three independent operations, at least, to completely fail because of validation.
# OPERATION 1:
#
# print(" JSON")
# print(empty_inner1.to_json(orient='table'))
#
# FAILS WITH:
# File ".../pandas/io/json/json.py", line 197, in __init__
# raise ValueError(msg)
# ValueError: Overlapping names between the index and columns
#
# OPERATION 2:
#
# empty_inner1.reset_index()
#
# FAILS WITH:
# File ".../pandas/core/internals/managers.py", line 1149, in insert
# raise ValueError('cannot insert {}, already exists'.format(item))
# ValueError: cannot insert B, already exists
#
# OPERATION 3:
#
# empty_inner2 = empty_inner1.join(right2.set_index(['A', 'B']), how='inner', on=['A', 'B'])
#
# FAILS WITH:
# File "...pandas/core/generic.py", line 1656, in _check_label_or_level_ambiguity
# raise ValueError(msg)
# ValueError: 'A' is both an index level and a column label, which is ambiguous.
```
#### Problem description
Joining an empty dataframe using the 'on' argument, can return a result dataframe that is INVALID because it is incorrectly given an indexed based on the the 'right' table ('join' requires that the 'right' table has an index that corresponds to the 'on' argument).
I verified this on 'master' (0.25.0.dev0), too.
#### Expected Output
```python
EMPTY_INNER1
Empty DataFrame
Columns: [A, B, C, D, E]
Index: []
INDEX
Int64Index([], dtype='int64')
```
or
```python
EMPTY_INNER1
Empty DataFrame
Columns: [A, B, C, D, E]
Index: []
INDEX
Index([], dtype='object')
```
Also, the subsequent 'to_json', 'reset_index', and 'join' operations should not raise exceptions.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Darwin
OS-release: 17.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.1
pytest: 4.3.0
pip: 19.0.3
setuptools: 40.8.0
Cython: None
numpy: 1.16.1
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: 4.3.3
bs4: None
html5lib: 1.0.1
sqlalchemy: 1.2.19
pymysql: None
psycopg2: 2.8.2 (dt dec pq3 ext lo64)
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: 0.10.0
pandas_datareader: None
gcsfs: None
</details> | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26213/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26213/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26214 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26214/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26214/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26214/events | https://github.com/pandas-dev/pandas/issues/26214 | 437,649,805 | MDU6SXNzdWU0Mzc2NDk4MDU= | 26,214 | _dataframe.boxplot_ with _where_ and _by_ does not respect color keyword | {
"avatar_url": "https://avatars.githubusercontent.com/u/1792815?v=4",
"events_url": "https://api.github.com/users/bnlawrence/events{/privacy}",
"followers_url": "https://api.github.com/users/bnlawrence/followers",
"following_url": "https://api.github.com/users/bnlawrence/following{/other_user}",
"gists_url": "https://api.github.com/users/bnlawrence/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bnlawrence",
"id": 1792815,
"login": "bnlawrence",
"node_id": "MDQ6VXNlcjE3OTI4MTU=",
"organizations_url": "https://api.github.com/users/bnlawrence/orgs",
"received_events_url": "https://api.github.com/users/bnlawrence/received_events",
"repos_url": "https://api.github.com/users/bnlawrence/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bnlawrence/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bnlawrence/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bnlawrence"
} | [
{
"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,
... | closed | false | null | [] | null | 1 | 2019-04-26T12:29:07Z | 2019-09-20T03:36:34Z | 2019-09-20T03:36:34Z | NONE | null | ### Bug report
**Bug summary**
The boxplot method on a dataframe which is using the "column, by" keywords does
not respect the _color_ keyword, and in fact crashes if it is present. This is not consistent with the documentation [here](http://pandas.pydata.org/pandas-docs/stable/user_guide/visualization.html#box-plots).
**Code for reproduction**
```python
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
def make_dummy_data():
""" Return """
df1 = pd.DataFrame(np.random.rand(10, 3), columns = ['x', 'y', 'z'])
df2 = pd.DataFrame(2*np.random.rand(10, 3), columns = ['x', 'y', 'z'])
return df1, df2
def comparative_results():
""" stuff """
df1, df2 = make_dummy_data()
def draw_plot(ax, data, edge_color, fill_color=None):
""" Controls details of color"""
colors = dict(boxes=edge_color, whiskers=edge_color, medians=edge_color, caps=edge_color)
ax = data.boxplot(column=['x'], by=['z'], showfliers=False, ax=ax, color=colors)
return ax
ax = None
ax = draw_plot(ax, df1, 'k')
ax = draw_plot(ax, df2, 'r')
ax.set_title('dummy to expose bug')
plt.show()
if __name__ == "__main__":
comparative_results()
```
**Actual outcome**
<!--The output produced by the above code, which may be a screenshot, console output, etc.-->
```
Traceback (most recent call last):
File "/Users/BNL28/Code/DataPerformance/bug_report.py", line 33, in <module>
comparative_results()
File "/Users/BNL28/Code/DataPerformance/bug_report.py", line 26, in comparative_results
ax = draw_plot(ax, df1, 'k')
File "/Users/BNL28/Code/DataPerformance/bug_report.py", line 22, in draw_plot
ax = data.boxplot(column=['x'], by=['z'], showfliers=False, ax=ax, color=colors)
File "/Users/BNL28/anaconda3/lib/python3.6/site-packages/pandas/plotting/_core.py", line 2254, in boxplot_frame
return_type=return_type, **kwds)
File "/Users/BNL28/anaconda3/lib/python3.6/site-packages/pandas/plotting/_core.py", line 2223, in boxplot
return_type=return_type)
File "/Users/BNL28/anaconda3/lib/python3.6/site-packages/pandas/plotting/_core.py", line 2683, in _grouped_plot_by_column
re_plotf = plotf(keys, values, ax, **kwargs)
File "/Users/BNL28/anaconda3/lib/python3.6/site-packages/pandas/plotting/_core.py", line 2191, in plot_group
bp = ax.boxplot(values, **kwds)
File "/Users/BNL28/anaconda3/lib/python3.6/site-packages/matplotlib/__init__.py", line 1810, in inner
return func(ax, *args, **kwargs)
TypeError: boxplot() got an unexpected keyword argument 'color'
Process finished with exit code 1
```
**Expected outcome**
Expect two sets of box plots, one coloured black, and one coloured red. Code runs ok with no color keyword, but the boxes are indistinguishable without colour control.
**Environment**
* Operating system: OSX
* Matplotlib version: 3.0.2
* Matplotlib backend (`print(matplotlib.get_backend())`):
* Python version: Python 3.6.8 |Anaconda, Inc.| (default, Dec 29 2018, 19:04:46)
* Pandas version 0.24.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/26214/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26214/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26215 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26215/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26215/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26215/events | https://github.com/pandas-dev/pandas/issues/26215 | 437,731,545 | MDU6SXNzdWU0Mzc3MzE1NDU= | 26,215 | `fillna` using columns of dtype `category` also fills non-NaN values | {
"avatar_url": "https://avatars.githubusercontent.com/u/43742775?v=4",
"events_url": "https://api.github.com/users/lcvriend/events{/privacy}",
"followers_url": "https://api.github.com/users/lcvriend/followers",
"following_url": "https://api.github.com/users/lcvriend/following{/other_user}",
"gists_url": "https://api.github.com/users/lcvriend/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lcvriend",
"id": 43742775,
"login": "lcvriend",
"node_id": "MDQ6VXNlcjQzNzQyNzc1",
"organizations_url": "https://api.github.com/users/lcvriend/orgs",
"received_events_url": "https://api.github.com/users/lcvriend/received_events",
"repos_url": "https://api.github.com/users/lcvriend/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lcvriend/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lcvriend/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lcvriend"
} | [
{
"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, d... | 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"
} | 5 | 2019-04-26T15:37:25Z | 2019-08-16T11:22:20Z | 2019-08-16T11:22:20Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
import numpy as np
dct = {
'A': ['a', 'b', 'c', 'b'],
'B': ['d', 'e', np.nan, np.nan]
}
df = pd.DataFrame.from_dict(dct).astype('category')
df['C'] = df['B']
df['C'].cat.add_categories(df['A'].cat.categories, inplace=True)
df['C'] = df['C'].fillna(df['A'])
```
**output**
| | A | B | C
| :---: | ---: | ---: | ---:
| **0** | a | d | a
| **1** | b | e | b
| **2** | c | NaN | c
| **3** | b | NaN | b
#### Problem description
I have two columns, A and B, of dtype `category`. Column B contains `NaN` values.
Applying `fillna` to B using A (after adding categories in A to categories in B), results in ALL values of B being overwritten with values of A. The issue is that `fillna` also fills non-`NaN` values.
#### Expected Output
Non-`NaN` values should not be overwritten:
| | A | B | C
| :---: | ---: | ---: | ---:
| **0** | a | d | d
| **1** | b | e | e
| **2** | c | NaN | c
| **3** | b | NaN | b
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.2
pytest: 4.3.1
pip: 19.0.3
setuptools: 40.8.0
Cython: 0.29.6
numpy: 1.16.2
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.4.0
sphinx: 1.8.5
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: 1.2.1
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: 2.6.1
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.5
lxml.etree: 4.3.2
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.3.1
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26215/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26215/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26216 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26216/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26216/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26216/events | https://github.com/pandas-dev/pandas/issues/26216 | 437,780,845 | MDU6SXNzdWU0Mzc3ODA4NDU= | 26,216 | Deprecate, Remove or Enhance toDict Serialization in JSON | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
},
{
"color": "5319e7",
"default": fa... | closed | false | null | [] | null | 2 | 2019-04-26T17:52:44Z | 2019-08-27T18:30:36Z | 2019-08-27T18:30:36Z | MEMBER | null | Right now we provide custom serialization for JSON objects that define a toDict method:
https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html?highlight=todict#fallback-behavior
Some notes about this:
- toDict was a method internally for Series and Frame that was deprecated at least as far back as v0.4
- There is one test (test_to_dict) in test_ujson that this can be encoded / decoded, but nothing comprehensive or user facing
- It is not the suggested approach for serializing custom objects (default_handler is instead)
I'm trying to simplify the JSON extension that we have internally so I would really like to remove this as it seems poorly tested and very unlikely to be used given sparse documentation, deprecated naming convention and unlikeliness that all objects in a container would have toDict defined. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26216/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26216/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26217 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26217/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26217/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26217/events | https://github.com/pandas-dev/pandas/pull/26217 | 437,788,908 | MDExOlB1bGxSZXF1ZXN0MjczOTkwNTI3 | 26,217 | CLN: Remove inheritance from object in pyx-files | {
"avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4",
"events_url": "https://api.github.com/users/topper-123/events{/privacy}",
"followers_url": "https://api.github.com/users/topper-123/followers",
"following_url": "https://api.github.com/users/topper-123/following{/other_user}",
"gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/topper-123",
"id": 26364415,
"login": "topper-123",
"node_id": "MDQ6VXNlcjI2MzY0NDE1",
"organizations_url": "https://api.github.com/users/topper-123/orgs",
"received_events_url": "https://api.github.com/users/topper-123/received_events",
"repos_url": "https://api.github.com/users/topper-123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/topper-123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/topper-123"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-04-26T18:15:44Z | 2019-04-27T08:18:56Z | 2019-04-27T07:08:21Z | CONTRIBUTOR | null | - [x] xref #25725 and #26128
Continuation of #26128, this time dealing with pyx-files. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26217/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26217/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26217.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26217",
"merged_at": "2019-04-27T07:08:21Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26217.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26217"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26218 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26218/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26218/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26218/events | https://github.com/pandas-dev/pandas/issues/26218 | 437,816,837 | MDU6SXNzdWU0Mzc4MTY4Mzc= | 26,218 | read_csv() crashes if engine='c', header=None, and 2+ extra columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/620513?v=4",
"events_url": "https://api.github.com/users/dargueta/events{/privacy}",
"followers_url": "https://api.github.com/users/dargueta/followers",
"following_url": "https://api.github.com/users/dargueta/following{/other_user}",
"gists_url": "https://api.github.com/users/dargueta/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dargueta",
"id": 620513,
"login": "dargueta",
"node_id": "MDQ6VXNlcjYyMDUxMw==",
"organizations_url": "https://api.github.com/users/dargueta/orgs",
"received_events_url": "https://api.github.com/users/dargueta/received_events",
"repos_url": "https://api.github.com/users/dargueta/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dargueta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dargueta/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dargueta"
} | [
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
}
] | closed | false | null | [] | {
"closed_at": "2020-07-28T18:13:47Z",
"closed_issues": 2378,
"created_at": "2019-12-02T12:52:48Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2020-08-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/68",
"id": 4894670,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68/labels",
"node_id": "MDk6TWlsZXN0b25lNDg5NDY3MA==",
"number": 68,
"open_issues": 0,
"state": "closed",
"title": "1.1",
"updated_at": "2021-07-17T17:25:28Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/68"
} | 6 | 2019-04-26T19:37:34Z | 2020-09-07T23:32:50Z | 2020-03-22T20:30:22Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```python
import io
import pandas as pd
# Create a CSV with a single row:
stream = io.StringIO(u'foo,bar,baz,bam,blah')
# Succeeds, returns a DataFrame with four columns and ignores the fifth.
pd.read_csv(
stream,
header=None,
names=['one', 'two', 'three', 'four'],
index_col=False,
engine='c'
)
# Change the engine to 'python' and you get the same result.
stream.seek(0)
pd.read_csv(
stream,
header=None,
names=['one', 'two', 'three', 'four'],
index_col=False,
engine='python'
)
# Succeeds, returns a DataFrame with three columns and ignores the extra two.
stream.seek(0)
pd.read_csv(
stream,
header=None,
names=['one', 'two', 'three'],
index_col=False,
engine='python'
)
# Change the engine to 'c' and it crashes:
stream.seek(0)
pd.read_csv(
stream,
header=None,
names=['one', 'two', 'three'],
index_col=False,
engine='c'
)
```
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/tux/.pyenv/versions/2.7.15/envs/gds/lib/python2.7/site-packages/pandas/io/parsers.py", line 702, in parser_f
return _read(filepath_or_buffer, kwds)
File "/Users/tux/.pyenv/versions/2.7.15/envs/gds/lib/python2.7/site-packages/pandas/io/parsers.py", line 435, in _read
data = parser.read(nrows)
File "/Users/tux/.pyenv/versions/2.7.15/envs/gds/lib/python2.7/site-packages/pandas/io/parsers.py", line 1139, in read
ret = self._engine.read(nrows)
File "/Users/tux/.pyenv/versions/2.7.15/envs/gds/lib/python2.7/site-packages/pandas/io/parsers.py", line 1995, in read
data = self._reader.read(nrows)
File "pandas/_libs/parsers.pyx", line 899, in pandas._libs.parsers.TextReader.read
File "pandas/_libs/parsers.pyx", line 914, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas/_libs/parsers.pyx", line 991, in pandas._libs.parsers.TextReader._read_rows
File "pandas/_libs/parsers.pyx", line 1067, in pandas._libs.parsers.TextReader._convert_column_data
File "pandas/_libs/parsers.pyx", line 1387, in pandas._libs.parsers.TextReader._get_column_name
IndexError: list index out of range
```
#### Problem description
The normal behavior for `read_csv()` is to ignore extra columns if it's given `names`. However, if the CSV has _two_ or more extra columns and the `engine` is `c` then it crashes. The exact same CSV can be read correctly if `engine` is `python`.
#### Expected Output
Behavior of reading a CSV with the C and Python engines should be identical.
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.15.final.0
python-bits: 64
OS: Darwin
OS-release: 17.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.24.2
pytest: 4.3.1
pip: 19.0.3
setuptools: 41.0.1
Cython: 0.29.5
numpy: 1.14.5
scipy: 1.1.0
pyarrow: 0.10.0
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2016.6.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: 2.5.14
xlrd: 1.1.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: 1.0.15
pymysql: None
psycopg2: 2.7.3.2 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: 0.1.6
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: 0.2.1
```
I tested this on Python 3.7.3 as well but for some reason `pd.show_versions()` keeps blowing up with:
```
Assertion failed: (PassInf && "Expected all immutable passes to be initialized"), function addImmutablePass, file /Users/buildbot/miniconda3/conda-bld/llvmdev_1545076115094/work/lib/IR/LegacyPassManager.cpp, line 812.
Abort trap: 6 (core dumped)
```
</details> | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26218/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26218/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26219 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26219/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26219/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26219/events | https://github.com/pandas-dev/pandas/issues/26219 | 437,842,169 | MDU6SXNzdWU0Mzc4NDIxNjk= | 26,219 | BUG: DataFrame.sum() changes int columns to float when only int and float columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/20670351?v=4",
"events_url": "https://api.github.com/users/rswgnu/events{/privacy}",
"followers_url": "https://api.github.com/users/rswgnu/followers",
"following_url": "https://api.github.com/users/rswgnu/following{/other_user}",
"gists_url": "https://api.github.com/users/rswgnu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rswgnu",
"id": 20670351,
"login": "rswgnu",
"node_id": "MDQ6VXNlcjIwNjcwMzUx",
"organizations_url": "https://api.github.com/users/rswgnu/orgs",
"received_events_url": "https://api.github.com/users/rswgnu/received_events",
"repos_url": "https://api.github.com/users/rswgnu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rswgnu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rswgnu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rswgnu"
} | [
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] | closed | false | null | [] | null | 9 | 2019-04-26T20:54:58Z | 2021-08-25T21:18:13Z | 2019-05-03T16:25:12Z | NONE | null | Herein, I use int and float as abbrevs. for int64 and float64 dtypes.
In Pandas 0.24.2 running under Debian on Windows Subsytem for Linux, if I have a dataframe, df, with an int column and I execute:
df.loc['Totals'] = df.sum()
to add a summation row, then the int column remains of type int, as expected. But if I instead use:
df.loc['Totals'] = df.sum(numeric_only=True)
to filter to just numeric columns (which I need to do), then any int column is changed to a float, causing display formatting problems, e.g. when showing row and column numbers.
Is there an easy fix for this? Thanks.
May be related to issue #13416.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26219/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26219/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26220 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26220/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26220/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26220/events | https://github.com/pandas-dev/pandas/pull/26220 | 437,846,190 | MDExOlB1bGxSZXF1ZXN0Mjc0MDM2NzQ4 | 26,220 | PERF: added no exception versions of '_string_to_dts' and 'parse_iso_8601_datetime' functions | {
"avatar_url": "https://avatars.githubusercontent.com/u/45976948?v=4",
"events_url": "https://api.github.com/users/anmyachev/events{/privacy}",
"followers_url": "https://api.github.com/users/anmyachev/followers",
"following_url": "https://api.github.com/users/anmyachev/following{/other_user}",
"gists_url": "https://api.github.com/users/anmyachev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/anmyachev",
"id": 45976948,
"login": "anmyachev",
"node_id": "MDQ6VXNlcjQ1OTc2OTQ4",
"organizations_url": "https://api.github.com/users/anmyachev/orgs",
"received_events_url": "https://api.github.com/users/anmyachev/received_events",
"repos_url": "https://api.github.com/users/anmyachev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/anmyachev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/anmyachev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/anmyachev"
} | [
{
"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": "a10c02",
"default": false,
"description": "Memory or... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 15 | 2019-04-26T21:07:53Z | 2019-05-10T08:24:08Z | 2019-05-07T01:08:38Z | CONTRIBUTOR | null | - [x] closes #N/A
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
`asv continuous -f 1.05 origin/master HEAD -b ^io.csv -b ^timeseries -a warmup_time=1 -a sample_time=1`:
master| patch| ratio| test name
-|-|-|-
98.4±3ms| 76.2±2ms| 0.77| timeseries.ToDatetimeFormatQuarters.time_infer_quarter
15.2±0.6ms| 9.75±0.04ms| 0.64| io.csv.ReadCSVParseSpecialDate.time_read_special_date('mdY')
37.1±2ms| 22.4±0.1ms| 0.60| io.csv.ReadCSVParseSpecialDate.time_read_special_date('mY') | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26220/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26220/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26220.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26220",
"merged_at": "2019-05-07T01:08:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26220.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26220"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26221 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26221/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26221/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26221/events | https://github.com/pandas-dev/pandas/pull/26221 | 437,851,681 | MDExOlB1bGxSZXF1ZXN0Mjc0MDQxMzIy | 26,221 | Don't cache metadata in GCS connections | {
"avatar_url": "https://avatars.githubusercontent.com/u/903655?v=4",
"events_url": "https://api.github.com/users/bnaul/events{/privacy}",
"followers_url": "https://api.github.com/users/bnaul/followers",
"following_url": "https://api.github.com/users/bnaul/following{/other_user}",
"gists_url": "https://api.github.com/users/bnaul/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bnaul",
"id": 903655,
"login": "bnaul",
"node_id": "MDQ6VXNlcjkwMzY1NQ==",
"organizations_url": "https://api.github.com/users/bnaul/orgs",
"received_events_url": "https://api.github.com/users/bnaul/received_events",
"repos_url": "https://api.github.com/users/bnaul/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bnaul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bnaul/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bnaul"
} | [
{
"color": "06909A",
"default": false,
"description": "IO issues that don't fit into a more specific label",
"id": 2301354,
"name": "IO Data",
"node_id": "MDU6TGFiZWwyMzAxMzU0",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Data"
}
] | closed | false | null | [] | null | 10 | 2019-04-26T21:24:54Z | 2019-04-28T16:44:12Z | 2019-04-28T16:44:12Z | CONTRIBUTOR | null | Currently if you access a bucket, change the contents, and try to read a new file w/ e.g. `read_parquet`, you see a `FileNotFoundError`; restarting Python fixes this. IMO since the `gcsfs` connection is hidden from the user, caching metadata doesn't really make sense (how would you even go about clearing this manually?).
@martindurant seem ok to you? | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26221/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26221/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26221.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26221",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26221.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26221"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26222 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26222/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26222/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26222/events | https://github.com/pandas-dev/pandas/pull/26222 | 437,858,162 | MDExOlB1bGxSZXF1ZXN0Mjc0MDQ2NjQ5 | 26,222 | Continued ujson cleanups | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "207de5",
"default": false,
"description": "read_json, to_json, json_normalize",
"id": 49379259,
"name": "IO JSON",
"node_id": "MDU6TGFiZWw0OTM3OTI1OQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20JSON"
},
{
"color": "207de5",
"default": fa... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-04-26T21:49:12Z | 2020-01-16T00:34:08Z | 2019-04-30T13:07:17Z | MEMBER | null | ref some of the comments by @jbrockmendel in #26212
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26222/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26222/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26222.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26222",
"merged_at": "2019-04-30T13:07:17Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26222.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26222"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26223 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26223/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26223/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26223/events | https://github.com/pandas-dev/pandas/issues/26223 | 437,861,127 | MDU6SXNzdWU0Mzc4NjExMjc= | 26,223 | DataFrame.apply returns Series of type object instead of correct dtype | {
"avatar_url": "https://avatars.githubusercontent.com/u/5175843?v=4",
"events_url": "https://api.github.com/users/jrbrodie77/events{/privacy}",
"followers_url": "https://api.github.com/users/jrbrodie77/followers",
"following_url": "https://api.github.com/users/jrbrodie77/following{/other_user}",
"gists_url": "https://api.github.com/users/jrbrodie77/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jrbrodie77",
"id": 5175843,
"login": "jrbrodie77",
"node_id": "MDQ6VXNlcjUxNzU4NDM=",
"organizations_url": "https://api.github.com/users/jrbrodie77/orgs",
"received_events_url": "https://api.github.com/users/jrbrodie77/received_events",
"repos_url": "https://api.github.com/users/jrbrodie77/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jrbrodie77/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jrbrodie77/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jrbrodie77"
} | [
{
"color": "0e8a16",
"default": true,
"description": null,
"id": 717120670,
"name": "good first issue",
"node_id": "MDU6TGFiZWw3MTcxMjA2NzA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue"
},
{
"color": "cdea3c",
"default": false,
"de... | closed | false | null | [] | null | 8 | 2019-04-26T22:01:11Z | 2020-10-10T17:17:48Z | 2020-10-10T17:17:48Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
df = pd.DataFrame([[1.0, 2.0, 3.0, 'A'],
[1.0, 2.0, 2.0, 'A'],
[2.0, 4.3, 2.3, 'B'],
[6.5, 3.4, 2.1, 'B']],
columns=['n0', 'n1', 'n2', 'letter'])
def print_series_dtype(series):
print(series.name, series.dtype)
def print_dataframe_dtypes(dataframe):
print("DF dtypes:", list(dataframe.dtypes))
print("DF colnames", list(dataframe.columns))
dataframe.apply(print_series_dtype)
df.groupby('letter').apply(print_dataframe_dtypes)
# Output
DF dtypes: [dtype('float64'), dtype('float64'), dtype('float64'), dtype('O')]
DF colnames ['n0', 'n1', 'n2', 'letter']
n0 object
n1 object
n2 object
letter object
```
#### Problem description
DataFrame.gropby(..).apply(<func>) provides func with a series that has a dtype of object, regardless of the original dtype.
The code snippet above shows that the series dtype is mismatched.
#### Expected Output
I would expect the dtypes to propagate unchanged. (in this case, it caused some downstream code to seriously misbehave).
#### Output of ``pd.show_versions()``
In [24]: pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.0.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.23.4
pytest: 3.8.2
pip: 19.0.3
setuptools: 40.2.0
Cython: 0.29.7
numpy: 1.15.2
scipy: 1.1.0
pyarrow: 0.11.1
xarray: None
IPython: 7.3.0
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: None
tables: 3.4.4
numexpr: 2.6.8
feather: None
matplotlib: 3.0.0
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26223/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26223/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26224 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26224/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26224/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26224/events | https://github.com/pandas-dev/pandas/issues/26224 | 437,947,984 | MDU6SXNzdWU0Mzc5NDc5ODQ= | 26,224 | Non-deterministic behavior of pandas | {
"avatar_url": "https://avatars.githubusercontent.com/u/15362286?v=4",
"events_url": "https://api.github.com/users/NexYY/events{/privacy}",
"followers_url": "https://api.github.com/users/NexYY/followers",
"following_url": "https://api.github.com/users/NexYY/following{/other_user}",
"gists_url": "https://api.github.com/users/NexYY/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/NexYY",
"id": 15362286,
"login": "NexYY",
"node_id": "MDQ6VXNlcjE1MzYyMjg2",
"organizations_url": "https://api.github.com/users/NexYY/orgs",
"received_events_url": "https://api.github.com/users/NexYY/received_events",
"repos_url": "https://api.github.com/users/NexYY/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/NexYY/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NexYY/subscriptions",
"type": "User",
"url": "https://api.github.com/users/NexYY"
} | [
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] | closed | false | null | [] | null | 2 | 2019-04-27T14:17:09Z | 2019-06-08T13:27:08Z | 2019-04-29T16:12:44Z | NONE | 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/26224/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26224/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26225 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26225/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26225/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26225/events | https://github.com/pandas-dev/pandas/pull/26225 | 437,949,389 | MDExOlB1bGxSZXF1ZXN0Mjc0MTEwMzg5 | 26,225 | [PERF] Get rid of MultiIndex conversion in IntervalIndex.intersection | {
"avatar_url": "https://avatars.githubusercontent.com/u/14367887?v=4",
"events_url": "https://api.github.com/users/makbigc/events{/privacy}",
"followers_url": "https://api.github.com/users/makbigc/followers",
"following_url": "https://api.github.com/users/makbigc/following{/other_user}",
"gists_url": "https://api.github.com/users/makbigc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makbigc",
"id": 14367887,
"login": "makbigc",
"node_id": "MDQ6VXNlcjE0MzY3ODg3",
"organizations_url": "https://api.github.com/users/makbigc/orgs",
"received_events_url": "https://api.github.com/users/makbigc/received_events",
"repos_url": "https://api.github.com/users/makbigc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makbigc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makbigc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makbigc"
} | [
{
"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": "009800",
"default"... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 19 | 2019-04-27T14:32:30Z | 2019-06-07T12:24:49Z | 2019-06-06T14:30:38Z | CONTRIBUTOR | null | - xref #24813
- passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- whatsnew entry
```
before after ratio
[64104ec3] [e9ddf02b]
<master> <GH24813-inter>
- 1.76±0.01ms 233±0.5μs 0.13 index_object.IntervalIndexMethod.time_intersection(1000)
- 58.0±0.4ms 3.94±0.2ms 0.07 index_object.IntervalIndexMethod.time_intersection(100000)
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26225/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26225/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26225.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26225",
"merged_at": "2019-06-06T14:30:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26225.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26225"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26226 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26226/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26226/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26226/events | https://github.com/pandas-dev/pandas/pull/26226 | 437,952,752 | MDExOlB1bGxSZXF1ZXN0Mjc0MTEyNTY5 | 26,226 | [CI] Remove duplicate config in .pep8speaks.yml | {
"avatar_url": "https://avatars.githubusercontent.com/u/14367887?v=4",
"events_url": "https://api.github.com/users/makbigc/events{/privacy}",
"followers_url": "https://api.github.com/users/makbigc/followers",
"following_url": "https://api.github.com/users/makbigc/following{/other_user}",
"gists_url": "https://api.github.com/users/makbigc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makbigc",
"id": 14367887,
"login": "makbigc",
"node_id": "MDQ6VXNlcjE0MzY3ODg3",
"organizations_url": "https://api.github.com/users/makbigc/orgs",
"received_events_url": "https://api.github.com/users/makbigc/received_events",
"repos_url": "https://api.github.com/users/makbigc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makbigc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makbigc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makbigc"
} | [
{
"color": "a2bca7",
"default": false,
"description": "Continuous Integration",
"id": 48070600,
"name": "CI",
"node_id": "MDU6TGFiZWw0ODA3MDYwMA==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/CI"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-04-27T15:10:13Z | 2019-04-28T15:30:27Z | 2019-04-28T15:30:22Z | CONTRIBUTOR | null | - closes #25605
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26226/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26226/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26226.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26226",
"merged_at": "2019-04-28T15:30:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26226.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26226"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26227 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26227/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26227/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26227/events | https://github.com/pandas-dev/pandas/issues/26227 | 437,968,003 | MDU6SXNzdWU0Mzc5NjgwMDM= | 26,227 | Sparse dataframe fails when astype() is called with dictionary | {
"avatar_url": "https://avatars.githubusercontent.com/u/6208056?v=4",
"events_url": "https://api.github.com/users/stefansimik/events{/privacy}",
"followers_url": "https://api.github.com/users/stefansimik/followers",
"following_url": "https://api.github.com/users/stefansimik/following{/other_user}",
"gists_url": "https://api.github.com/users/stefansimik/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stefansimik",
"id": 6208056,
"login": "stefansimik",
"node_id": "MDQ6VXNlcjYyMDgwNTY=",
"organizations_url": "https://api.github.com/users/stefansimik/orgs",
"received_events_url": "https://api.github.com/users/stefansimik/received_events",
"repos_url": "https://api.github.com/users/stefansimik/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stefansimik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stefansimik/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stefansimik"
} | [
{
"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": "009... | closed | false | null | [] | null | 4 | 2019-04-27T17:52:48Z | 2019-09-18T14:02:13Z | 2019-09-18T14:02:13Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```python
# Create DataFrame
df = pd.DataFrame({'A': [1.0, 2.0, np.nan, 3.0], 'B': [100, 200, 300, 400]})
# Conversion mapping
convert_cols_dict = {'A': np.float32, 'B': np.int32}
# WORKS FINE: Conversion on dense-dataframe works well
df_optimized = df.astype(convert_cols_dict)
# FAILS : Conversion on sparse_dataframe fails on KeyError exception
df_sparse = df.to_sparse()
df_sparse_optimized = df_sparse.astype(convert_cols_dict)
```
#### Problem description
Problem is, that one cannot convert column types when working with sparse-dataframe.
But calling .astype(..) function fails with this error:
```
---------------------------------------
KeyErrorTraceback (most recent call last)
<ipython-input-62-fcedc5114473> in <module>
1 # Conversion on sparse_dataframe fails
2 df_sparse = df.to_sparse()
----> 3 df_sparse_optimized = df_sparse.astype(convert_cols_dict)
4 df_sparse_optimized
D:\data_science\bin\anaconda3\envs\nbo2\lib\site-packages\pandas\core\sparse\frame.py in astype(self, dtype)
349
350 def astype(self, dtype):
--> 351 return self._apply_columns(lambda x: x.astype(dtype))
352
353 def copy(self, deep=True):
D:\data_science\bin\anaconda3\envs\nbo2\lib\site-packages\pandas\core\sparse\frame.py in _apply_columns(self, func)
342
343 new_data = {col: func(series)
--> 344 for col, series in compat.iteritems(self)}
345
346 return self._constructor(
D:\data_science\bin\anaconda3\envs\nbo2\lib\site-packages\pandas\core\sparse\frame.py in <dictcomp>(.0)
342
343 new_data = {col: func(series)
--> 344 for col, series in compat.iteritems(self)}
345
346 return self._constructor(
D:\data_science\bin\anaconda3\envs\nbo2\lib\site-packages\pandas\core\sparse\frame.py in <lambda>(x)
349
350 def astype(self, dtype):
--> 351 return self._apply_columns(lambda x: x.astype(dtype))
352
353 def copy(self, deep=True):
D:\data_science\bin\anaconda3\envs\nbo2\lib\site-packages\pandas\core\generic.py in astype(self, dtype, copy, errors, **kwargs)
5659 if self.ndim == 1: # i.e. Series
5660 if len(dtype) > 1 or self.name not in dtype:
-> 5661 raise KeyError('Only the Series name can be used for '
5662 'the key in Series dtype mappings.')
5663 new_type = dtype[self.name]
KeyError: 'Only the Series name can be used for the key in Series dtype mappings.'
```
#### Expected Output
It is expected, that what works on dense-dataframe, should also work on sparse-dataframe.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 79 Stepping 1, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.1
pytest: None
pip: 19.0.1
setuptools: 40.8.0
Cython: None
numpy: 1.15.4
scipy: 1.2.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: None
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26227/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26227/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26228 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26228/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26228/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26228/events | https://github.com/pandas-dev/pandas/pull/26228 | 437,968,772 | MDExOlB1bGxSZXF1ZXN0Mjc0MTIzMDI1 | 26,228 | Fix .transform crash when SeriesGroupBy is empty (#26208) | {
"avatar_url": "https://avatars.githubusercontent.com/u/3169669?v=4",
"events_url": "https://api.github.com/users/HHest/events{/privacy}",
"followers_url": "https://api.github.com/users/HHest/followers",
"following_url": "https://api.github.com/users/HHest/following{/other_user}",
"gists_url": "https://api.github.com/users/HHest/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HHest",
"id": 3169669,
"login": "HHest",
"node_id": "MDQ6VXNlcjMxNjk2Njk=",
"organizations_url": "https://api.github.com/users/HHest/orgs",
"received_events_url": "https://api.github.com/users/HHest/received_events",
"repos_url": "https://api.github.com/users/HHest/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HHest/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HHest/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HHest"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 8 | 2019-04-27T18:01:07Z | 2019-05-15T13:01:33Z | 2019-05-15T13:01:29Z | CONTRIBUTOR | null | - [X] closes #26208
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26228/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26228/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26228.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26228",
"merged_at": "2019-05-15T13:01:28Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26228.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26228"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26229 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26229/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26229/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26229/events | https://github.com/pandas-dev/pandas/pull/26229 | 437,990,870 | MDExOlB1bGxSZXF1ZXN0Mjc0MTM3MzU5 | 26,229 | BUG: Fix #10355, std() groupby calculation | {
"avatar_url": "https://avatars.githubusercontent.com/u/494201?v=4",
"events_url": "https://api.github.com/users/alexcwatt/events{/privacy}",
"followers_url": "https://api.github.com/users/alexcwatt/followers",
"following_url": "https://api.github.com/users/alexcwatt/following{/other_user}",
"gists_url": "https://api.github.com/users/alexcwatt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexcwatt",
"id": 494201,
"login": "alexcwatt",
"node_id": "MDQ6VXNlcjQ5NDIwMQ==",
"organizations_url": "https://api.github.com/users/alexcwatt/orgs",
"received_events_url": "https://api.github.com/users/alexcwatt/received_events",
"repos_url": "https://api.github.com/users/alexcwatt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexcwatt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexcwatt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexcwatt"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
... | closed | false | null | [] | null | 18 | 2019-04-27T22:37:59Z | 2019-08-28T16:13:53Z | 2019-08-28T16:13:53Z | CONTRIBUTOR | null | - [x] closes #10355
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26229/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26229/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26229.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26229",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26229.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26229"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26230 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26230/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26230/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26230/events | https://github.com/pandas-dev/pandas/pull/26230 | 438,024,697 | MDExOlB1bGxSZXF1ZXN0Mjc0MTU5MTQ1 | 26,230 | CLN: Clean uses of super, part II | {
"avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4",
"events_url": "https://api.github.com/users/topper-123/events{/privacy}",
"followers_url": "https://api.github.com/users/topper-123/followers",
"following_url": "https://api.github.com/users/topper-123/following{/other_user}",
"gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/topper-123",
"id": 26364415,
"login": "topper-123",
"node_id": "MDQ6VXNlcjI2MzY0NDE1",
"organizations_url": "https://api.github.com/users/topper-123/orgs",
"received_events_url": "https://api.github.com/users/topper-123/received_events",
"repos_url": "https://api.github.com/users/topper-123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/topper-123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/topper-123"
} | [] | closed | false | null | [] | null | 1 | 2019-04-28T07:28:01Z | 2019-05-01T20:07:14Z | 2019-04-28T08:28:31Z | CONTRIBUTOR | null | - [x] xref #25725 & #26177
Continuation from #26177. In addition to the uses of ``super`` dealt with in #26177, there were some more advanced uses of ``super`` in the code base, e.g. in classmethods and using ``super`` to jump to a specific point in the MRO-chain.
This PR specifically deals with:
* ``super(..., self)`` in pyx-files
* ``super(..., cls)`` in the whole code base
* Changes some specific uses of ``super``, se comments . | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26230/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26230/timeline | null | 1 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26230.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26230",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26230.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26230"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26231 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26231/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26231/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26231/events | https://github.com/pandas-dev/pandas/pull/26231 | 438,068,662 | MDExOlB1bGxSZXF1ZXN0Mjc0MTg3OTM1 | 26,231 | Revert "xref #26189, xfail scipy interpolate test for pchip with timedelta | {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.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": "d7e102",
"d... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 2 | 2019-04-28T15:29:19Z | 2019-04-28T16:11:16Z | 2019-04-28T16:11:15Z | CONTRIBUTOR | null | closes #26189
This reverts commit e134ddb727069e50bd76c319d9d220fc23ca170f.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26231/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26231/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26231.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26231",
"merged_at": "2019-04-28T16:11:15Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26231.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26231"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26232 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26232/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26232/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26232/events | https://github.com/pandas-dev/pandas/issues/26232 | 438,076,850 | MDU6SXNzdWU0MzgwNzY4NTA= | 26,232 | pd.core.groupby.GroupBy docstrings missing endline | {
"avatar_url": "https://avatars.githubusercontent.com/u/306380?v=4",
"events_url": "https://api.github.com/users/mrocklin/events{/privacy}",
"followers_url": "https://api.github.com/users/mrocklin/followers",
"following_url": "https://api.github.com/users/mrocklin/following{/other_user}",
"gists_url": "https://api.github.com/users/mrocklin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mrocklin",
"id": 306380,
"login": "mrocklin",
"node_id": "MDQ6VXNlcjMwNjM4MA==",
"organizations_url": "https://api.github.com/users/mrocklin/orgs",
"received_events_url": "https://api.github.com/users/mrocklin/received_events",
"repos_url": "https://api.github.com/users/mrocklin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mrocklin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mrocklin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mrocklin"
} | [
{
"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": "009800",
"default": false,
"description": "Duplicate issue or pu... | closed | false | null | [] | null | 2 | 2019-04-28T16:53:17Z | 2019-04-29T01:01:40Z | 2019-04-29T00:55:00Z | CONTRIBUTOR | null | ```python
In [1]: import pandas as pd
In [2]: pd.core.groupby.GroupBy.min?
Signature: pd.core.groupby.GroupBy.min(self, **kwargs)
Docstring:
Compute min of group values
See Also # <<<<-------- There should be an extra line between this and the line above
--------
pandas.Series.groupby
pandas.DataFrame.groupby
pandas.Panel.groupby
File: ~/miniconda/envs/dev/lib/python3.7/site-packages/pandas/core/groupby/groupby.py
Type: function
```
I tried going in to fix this, but it seems that these are auto-generated somewhere, so I decided to raise an issue 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/26232/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26232/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26233 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26233/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26233/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26233/events | https://github.com/pandas-dev/pandas/pull/26233 | 438,093,144 | MDExOlB1bGxSZXF1ZXN0Mjc0MjA0MDc4 | 26,233 | Refactor init for Excel readers to _BaseExcelReader | {
"avatar_url": "https://avatars.githubusercontent.com/u/7870803?v=4",
"events_url": "https://api.github.com/users/tdamsma/events{/privacy}",
"followers_url": "https://api.github.com/users/tdamsma/followers",
"following_url": "https://api.github.com/users/tdamsma/following{/other_user}",
"gists_url": "https://api.github.com/users/tdamsma/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tdamsma",
"id": 7870803,
"login": "tdamsma",
"node_id": "MDQ6VXNlcjc4NzA4MDM=",
"organizations_url": "https://api.github.com/users/tdamsma/orgs",
"received_events_url": "https://api.github.com/users/tdamsma/received_events",
"repos_url": "https://api.github.com/users/tdamsma/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tdamsma/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tdamsma/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tdamsma"
} | [
{
"color": "bfe5bf",
"default": false,
"description": "read_excel, to_excel",
"id": 49254273,
"name": "IO Excel",
"node_id": "MDU6TGFiZWw0OTI1NDI3Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Excel"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 9 | 2019-04-28T19:50:00Z | 2019-05-01T10:12:37Z | 2019-04-30T15:17:59Z | CONTRIBUTOR | null | Pre-cursor for #25092. To support multiple excel readers the init function is moved to _BaseExcelReader. The function is made a bit more general to be able to support multiple excel readers.
- [ ] tests passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26233/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26233/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26233.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26233",
"merged_at": "2019-04-30T15:17:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26233.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26233"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26234 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26234/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26234/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26234/events | https://github.com/pandas-dev/pandas/pull/26234 | 438,097,980 | MDExOlB1bGxSZXF1ZXN0Mjc0MjA3Mzk0 | 26,234 | DOC: Fix validation error type `RT01` and check in CI (#25356) | {
"avatar_url": "https://avatars.githubusercontent.com/u/13166114?v=4",
"events_url": "https://api.github.com/users/ihsansecer/events{/privacy}",
"followers_url": "https://api.github.com/users/ihsansecer/followers",
"following_url": "https://api.github.com/users/ihsansecer/following{/other_user}",
"gists_url": "https://api.github.com/users/ihsansecer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ihsansecer",
"id": 13166114,
"login": "ihsansecer",
"node_id": "MDQ6VXNlcjEzMTY2MTE0",
"organizations_url": "https://api.github.com/users/ihsansecer/orgs",
"received_events_url": "https://api.github.com/users/ihsansecer/received_events",
"repos_url": "https://api.github.com/users/ihsansecer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ihsansecer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ihsansecer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ihsansecer"
} | [
{
"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": "eb6420",
"default": false,
"description": "Code style, linting, ... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-04-28T20:41:58Z | 2019-07-11T15:47:55Z | 2019-05-08T03:57:10Z | CONTRIBUTOR | null | - [x] closes #25356
- [x] passes `./scripts/validate_docstrings.py --errors=RT01`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26234/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26234/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26234.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26234",
"merged_at": "2019-05-08T03:57:09Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26234.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26234"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26235 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26235/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26235/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26235/events | https://github.com/pandas-dev/pandas/issues/26235 | 438,137,516 | MDU6SXNzdWU0MzgxMzc1MTY= | 26,235 | ValueError: fill value must be in categories--I dont know why aren't versions compatible. | {
"avatar_url": "https://avatars.githubusercontent.com/u/38175185?v=4",
"events_url": "https://api.github.com/users/sunrisehang/events{/privacy}",
"followers_url": "https://api.github.com/users/sunrisehang/followers",
"following_url": "https://api.github.com/users/sunrisehang/following{/other_user}",
"gists_url": "https://api.github.com/users/sunrisehang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sunrisehang",
"id": 38175185,
"login": "sunrisehang",
"node_id": "MDQ6VXNlcjM4MTc1MTg1",
"organizations_url": "https://api.github.com/users/sunrisehang/orgs",
"received_events_url": "https://api.github.com/users/sunrisehang/received_events",
"repos_url": "https://api.github.com/users/sunrisehang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sunrisehang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sunrisehang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sunrisehang"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
},
{
"color": "e11d21",
"default": false,
"descript... | closed | false | null | [] | null | 1 | 2019-04-29T03:26:52Z | 2019-04-29T05:58:23Z | 2019-04-29T05:58:15Z | NONE | null | The project I used is this website:https://github.com/ShichenXie/scorecardpy
You can install it by 'pip intall scorecardpy'.
This is my code:
```
# Traditional Credit Scoring Using Logistic Regression
import scorecardpy as sc
# data prepare ------
# load germancredit data
dat = sc.germancredit()
# filter variable via missing rate, iv, identical value rate
dt_s = sc.var_filter(dat, y="creditability")
# breaking dt into train and test
train, test = sc.split_df(dt_s, 'creditability').values()
# woe binning ------
bins = sc.woebin(dt_s, y="creditability")
# sc.woebin_plot(bins)
# binning adjustment
# # adjust breaks interactively
# breaks_adj = sc.woebin_adj(dt_s, "creditability", bins)
# # or specify breaks manually
breaks_adj = {
'age.in.years': [26, 35, 40],
'other.debtors.or.guarantors': ["none", "co-applicant%,%guarantor"]
}
bins_adj = sc.woebin(dt_s, y="creditability", breaks_list=breaks_adj)
# converting train and test into woe values
train_woe = sc.woebin_ply(train, bins_adj)
test_woe = sc.woebin_ply(test, bins_adj)
```
When I use 0.23 pandas, it works.
but I use 0.24.2 pandas, it reports this error:
The error:
---------------------------------------------------------------------------
RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
"""
Traceback (most recent call last):
File "E:\anancode\lib\multiprocessing\pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "E:\anancode\lib\multiprocessing\pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "E:\anancode\lib\site-packages\scorecardpy\woebin.py", line 953, in woepoints_ply1
dtx = dtx.fillna('missing').assign(rowid = dtx.index).sort_values('rowid')
File "E:\anancode\lib\site-packages\pandas\core\frame.py", line 4034, in fillna
downcast=downcast, **kwargs)
File "E:\anancode\lib\site-packages\pandas\core\generic.py", line 6123, in fillna
downcast=downcast)
File "E:\anancode\lib\site-packages\pandas\core\internals\managers.py", line 525, in fillna
return self.apply('fillna', **kwargs)
File "E:\anancode\lib\site-packages\pandas\core\internals\managers.py", line 395, in apply
applied = getattr(b, f)(**kwargs)
File "E:\anancode\lib\site-packages\pandas\core\internals\blocks.py", line 1834, in fillna
values = values.fillna(value=value, limit=limit)
File "E:\anancode\lib\site-packages\pandas\util\_decorators.py", line 188, in wrapper
return func(*args, **kwargs)
File "E:\anancode\lib\site-packages\pandas\core\arrays\categorical.py", line 1784, in fillna
raise ValueError("fill value must be in categories")
ValueError: fill value must be in categories
"""
The above exception was the direct cause of the following exception:
ValueError Traceback (most recent call last)
<ipython-input-12-6d5e8b7b4a92> in <module>
1 # converting train and test into woe values
----> 2 train_woe = sc.woebin_ply(train, bins_adj)
3 test_woe = sc.woebin_ply(test, bins_adj)
E:\anancode\lib\site-packages\scorecardpy\woebin.py in woebin_ply(dt, bins, no_cores, print_step)
1062 )
1063 # bins in dictionary
-> 1064 dat_suffix = pool.starmap(woepoints_ply1, args)
1065 dat = pd.concat([dat]+dat_suffix, axis=1)
1066 pool.close()
E:\anancode\lib\multiprocessing\pool.py in starmap(self, func, iterable, chunksize)
296 `func` and (a, b) becomes func(a, b).
297 '''
--> 298 return self._map_async(func, iterable, starmapstar, chunksize).get()
299
300 def starmap_async(self, func, iterable, chunksize=None, callback=None,
E:\anancode\lib\multiprocessing\pool.py in get(self, timeout)
681 return self._value
682 else:
--> 683 raise self._value
684
685 def _set(self, i, obj):
ValueError: fill value must be in categories
---------------------------------------------------------------------------
I dont know why aren't versions compatible. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26235/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26235/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26236 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26236/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26236/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26236/events | https://github.com/pandas-dev/pandas/issues/26236 | 438,165,475 | MDU6SXNzdWU0MzgxNjU0NzU= | 26,236 | Difference between .loc and .query for datetime objects with timezone | {
"avatar_url": "https://avatars.githubusercontent.com/u/9269985?v=4",
"events_url": "https://api.github.com/users/PetitLepton/events{/privacy}",
"followers_url": "https://api.github.com/users/PetitLepton/followers",
"following_url": "https://api.github.com/users/PetitLepton/following{/other_user}",
"gists_url": "https://api.github.com/users/PetitLepton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/PetitLepton",
"id": 9269985,
"login": "PetitLepton",
"node_id": "MDQ6VXNlcjkyNjk5ODU=",
"organizations_url": "https://api.github.com/users/PetitLepton/orgs",
"received_events_url": "https://api.github.com/users/PetitLepton/received_events",
"repos_url": "https://api.github.com/users/PetitLepton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/PetitLepton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/PetitLepton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/PetitLepton"
} | [
{
"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": "Timezone data dtype",
... | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 4 | 2019-04-29T06:26:48Z | 2020-03-30T07:15:36Z | null | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```python
In [1]: import pandas as pd
In [2]: df = pd.DataFrame(data={"time": pd.date_range(start="1970-01-01 00:00:00", periods=5, freq='s', tz="Europe/Brussels")})
In [3]: df.loc[df["time"] > "1970-01-01"]
Out[3]:
time
1 1970-01-01 00:00:01+01:00
2 1970-01-01 00:00:02+01:00
3 1970-01-01 00:00:03+01:00
4 1970-01-01 00:00:04+01:00
In [4]: df.query("time > '1970-01-01'")
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-15813dc2e519> in <module>
----> 1 df.query("time > '1970-01-01'")
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/frame.py in query(self, expr, inplace, **kwargs)
3086 kwargs['level'] = kwargs.pop('level', 0) + 1
3087 kwargs['target'] = None
-> 3088 res = self.eval(expr, **kwargs)
3089
3090 try:
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/frame.py in eval(self, expr, inplace, **kwargs)
3201 kwargs['target'] = self
3202 kwargs['resolvers'] = kwargs.get('resolvers', ()) + tuple(resolvers)
-> 3203 return _eval(expr, inplace=inplace, **kwargs)
3204
3205 def select_dtypes(self, include=None, exclude=None):
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/eval.py in eval(expr, parser, engine, truediv, local_dict, global_dict, resolvers, level, target, inplace)
292
293 parsed_expr = Expr(expr, engine=engine, parser=parser, env=env,
--> 294 truediv=truediv)
295
296 # construct the engine and evaluate the parsed expression
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in __init__(self, expr, engine, parser, env, truediv, level)
747 self.env.scope['truediv'] = truediv
748 self._visitor = _parsers[parser](self.env, self.engine, self.parser)
--> 749 self.terms = self.parse()
750
751 @property
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in parse(self)
764 def parse(self):
765 """Parse an expression"""
--> 766 return self._visitor.visit(self.expr)
767
768 @property
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in visit(self, node, **kwargs)
329 method = 'visit_' + node.__class__.__name__
330 visitor = getattr(self, method)
--> 331 return visitor(node, **kwargs)
332
333 def visit_Module(self, node, **kwargs):
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in visit_Module(self, node, **kwargs)
335 raise SyntaxError('only a single expression is allowed')
336 expr = node.body[0]
--> 337 return self.visit(expr, **kwargs)
338
339 def visit_Expr(self, node, **kwargs):
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in visit(self, node, **kwargs)
329 method = 'visit_' + node.__class__.__name__
330 visitor = getattr(self, method)
--> 331 return visitor(node, **kwargs)
332
333 def visit_Module(self, node, **kwargs):
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in visit_Expr(self, node, **kwargs)
338
339 def visit_Expr(self, node, **kwargs):
--> 340 return self.visit(node.value, **kwargs)
341
342 def _rewrite_membership_op(self, node, left, right):
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in visit(self, node, **kwargs)
329 method = 'visit_' + node.__class__.__name__
330 visitor = getattr(self, method)
--> 331 return visitor(node, **kwargs)
332
333 def visit_Module(self, node, **kwargs):
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in visit_Compare(self, node, **kwargs)
664 op = self.translate_In(ops[0])
665 binop = ast.BinOp(op=op, left=node.left, right=comps[0])
--> 666 return self.visit(binop)
667
668 # recursive case: we have a chained comparison, a CMP b CMP c, etc.
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in visit(self, node, **kwargs)
329 method = 'visit_' + node.__class__.__name__
330 visitor = getattr(self, method)
--> 331 return visitor(node, **kwargs)
332
333 def visit_Module(self, node, **kwargs):
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in visit_BinOp(self, node, **kwargs)
435 op, op_class, left, right = self._maybe_transform_eq_ne(node)
436 left, right = self._maybe_downcast_constants(left, right)
--> 437 return self._maybe_evaluate_binop(op, op_class, left, right)
438
439 def visit_Div(self, node, **kwargs):
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in _maybe_evaluate_binop(self, op, op_class, lhs, rhs, eval_in_python, maybe_eval_in_python)
418 # all date ops must be done in python bc numexpr doesn't work
419 # well with NaT
--> 420 return self._maybe_eval(res, self.binary_ops)
421
422 if res.op in eval_in_python:
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/expr.py in _maybe_eval(self, binop, eval_in_python)
398 # call will be evaluated using isin (in python space)
399 return binop.evaluate(self.env, self.engine, self.parser,
--> 400 self.term_type, eval_in_python)
401
402 def _maybe_evaluate_binop(self, op, op_class, lhs, rhs,
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/ops.py in evaluate(self, env, engine, parser, term_type, eval_in_python)
386 """
387 if engine == 'python':
--> 388 res = self(env)
389 else:
390 # recurse over the left/right nodes
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/computation/ops.py in __call__(self, env)
367 right = self.rhs(env)
368
--> 369 return self.func(left, right)
370
371 def evaluate(self, env, engine, parser, term_type, eval_in_python):
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/ops.py in wrapper(self, other, axis)
1714
1715 res_values = dispatch_to_index_op(op, self, other,
-> 1716 pd.DatetimeIndex)
1717
1718 return self._constructor(res_values, index=self.index,
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/ops.py in dispatch_to_index_op(op, left, right, index_class)
1189 left_idx = left_idx._shallow_copy(freq=None)
1190 try:
-> 1191 result = op(left_idx, right)
1192 except NullFrequencyError:
1193 # DatetimeIndex and TimedeltaIndex with freq == None raise ValueError
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/indexes/datetimelike.py in wrapper(self, other)
115 other = other._values
116
--> 117 result = op(self._data, maybe_unwrap_index(other))
118 return result
119
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py in wrapper(self, other)
140 if isinstance(other, (datetime, np.datetime64)):
141 # GH#18435 strings get a pass from tzawareness compat
--> 142 self._assert_tzawareness_compat(other)
143
144 try:
~/miniconda3/envs/tidy_spreadsheet/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py in _assert_tzawareness_compat(self, other)
698 'datetime-like objects.')
699 elif other_tz is None:
--> 700 raise TypeError('Cannot compare tz-naive and tz-aware '
701 'datetime-like objects')
702
TypeError: Cannot compare tz-naive and tz-aware datetime-like objects
```
#### Problem description
It seems that the two methods do not behave in the same way regarding `datetime` objects with time zones. Transforming `1970-01-01` to `1970-01-01T00:00:00Z-01:00` solves the problem.
#### Expected Output
```
1 1970-01-01 00:00:01+01:00
2 1970-01-01 00:00:02+01:00
3 1970-01-01 00:00:03+01:00
4 1970-01-01 00:00:04+01:00
```
#### Output of ``pd.show_versions()``
<details>
```
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Linux
OS-release: 5.0.0-13-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: None
pip: 19.0.3
setuptools: 41.0.0
Cython: None
numpy: 1.16.2
scipy: None
pyarrow: None
xarray: None
IPython: 7.4.0
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: 1.2.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
```
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26236/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26236/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26237 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26237/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26237/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26237/events | https://github.com/pandas-dev/pandas/issues/26237 | 438,282,803 | MDU6SXNzdWU0MzgyODI4MDM= | 26,237 | to_pickle compression does not work with in-memory buffers | {
"avatar_url": "https://avatars.githubusercontent.com/u/2069677?v=4",
"events_url": "https://api.github.com/users/akhmerov/events{/privacy}",
"followers_url": "https://api.github.com/users/akhmerov/followers",
"following_url": "https://api.github.com/users/akhmerov/following{/other_user}",
"gists_url": "https://api.github.com/users/akhmerov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/akhmerov",
"id": 2069677,
"login": "akhmerov",
"node_id": "MDQ6VXNlcjIwNjk2Nzc=",
"organizations_url": "https://api.github.com/users/akhmerov/orgs",
"received_events_url": "https://api.github.com/users/akhmerov/received_events",
"repos_url": "https://api.github.com/users/akhmerov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/akhmerov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/akhmerov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/akhmerov"
} | [
{
"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": "6c1cdb",
"default": false,
"description": "read_pickle, to_pickle",... | closed | false | null | [] | {
"closed_at": "2020-12-26T13:57:50Z",
"closed_issues": 1768,
"created_at": "2020-05-29T23:47:32Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "on-merge: backport to 1.2.x",
"due_on": "2020-12-15T08:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/73",
"id": 5479819,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73/labels",
"node_id": "MDk6TWlsZXN0b25lNTQ3OTgxOQ==",
"number": 73,
"open_issues": 0,
"state": "closed",
"title": "1.2",
"updated_at": "2021-04-13T15:46:43Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/73"
} | 12 | 2019-04-29T12:06:45Z | 2020-09-05T14:50:04Z | 2020-09-05T14:50:04Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
from io import BytesIO
import pandas
pandas.DataFrame([[]]).to_pickle(BytesIO(), compression=None) # works
pandas.DataFrame([[]]).to_pickle(BytesIO())
# ValueError: Unrecognized compression type: infer (regression in 0.24 from 0.23)
pandas.DataFrame([[]]).to_pickle(BytesIO(), compression='zip')
# AttributeError: 'NoneType' object has no attribute 'find' (in 0.24)
# BadZipFile: File is not a zip file (in 0.22 and before)
```
#### Problem description
#22555 is closely related, but I believe this is a different issue because the errors occur at a different place in the code.
I believe the above is an issue because
- Despite the argument name is "path" and the docstring reads `path : string File path`, the code contains multiple `path_or_buf` names. I'd be happy to make a PR amending the docstring if anybody confirms that the docstring is not precise.
- The code above is actually useful (I want to let the user export a dataframe from a webapp)
- `compression='infer'` failing is a regression
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.1.final.0
python-bits: 64
OS: Linux
OS-release: 5.0.0-13-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: 4.4.1
pip: 19.1
setuptools: 41.0.1
Cython: 0.29.7
numpy: 1.16.3
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.5.0
sphinx: None
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: 1.2.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26237/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26237/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26238 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26238/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26238/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26238/events | https://github.com/pandas-dev/pandas/pull/26238 | 438,418,402 | MDExOlB1bGxSZXF1ZXN0Mjc0NDUzNjYx | 26,238 | CLN: Remove unnecessary io function returns | {
"avatar_url": "https://avatars.githubusercontent.com/u/13166114?v=4",
"events_url": "https://api.github.com/users/ihsansecer/events{/privacy}",
"followers_url": "https://api.github.com/users/ihsansecer/followers",
"following_url": "https://api.github.com/users/ihsansecer/following{/other_user}",
"gists_url": "https://api.github.com/users/ihsansecer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ihsansecer",
"id": 13166114,
"login": "ihsansecer",
"node_id": "MDQ6VXNlcjEzMTY2MTE0",
"organizations_url": "https://api.github.com/users/ihsansecer/orgs",
"received_events_url": "https://api.github.com/users/ihsansecer/received_events",
"repos_url": "https://api.github.com/users/ihsansecer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ihsansecer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ihsansecer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ihsansecer"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-04-29T17:12:34Z | 2019-07-11T15:48:02Z | 2019-04-30T13:02:12Z | CONTRIBUTOR | null | These functions return a function either with empty return statement or doesn’t return. It causes docstring validation error with type RT01 (See #26234).
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26238/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26238/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26238.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26238",
"merged_at": "2019-04-30T13:02:12Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26238.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26238"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26239 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26239/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26239/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26239/events | https://github.com/pandas-dev/pandas/pull/26239 | 438,437,916 | MDExOlB1bGxSZXF1ZXN0Mjc0NDY4Nzkw | 26,239 | Fix Memory Leak in to_json with Numeric Values | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-04-29T18:03:12Z | 2020-01-16T00:34:07Z | 2019-04-30T13:04:06Z | MEMBER | null | - [X] closes #24889
- [ ] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry
It looks like the extension module is unnecessarily incrementing the reference count for numeric objects and never releasing it, which causes a leak in to_json.
Still trying to grok exactly what the purpose of npyCtxtPassthru (comment in same file mentions it is required when encoding multi-dimensional arrays).
Removing the check for PyArray_ISDATETIME caused segfaults but that doesn't appear to leak memory anyway so most likely intentional to increment that ref count.
ASV results:
```sh
before after ratio
[9feb3ad9] [9bfd45d3]
<master> <json-mem-fix~1>
- 69.1M 57.7M 0.84 io.json.ToJSONMem.peakmem_float
- 69.1M 57.7M 0.83 io.json.ToJSONMem.peakmem_int
SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26239/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26239/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26239.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26239",
"merged_at": "2019-04-30T13:04:06Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26239.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26239"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26240 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26240/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26240/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26240/events | https://github.com/pandas-dev/pandas/pull/26240 | 438,446,398 | MDExOlB1bGxSZXF1ZXN0Mjc0NDc1MzUz | 26,240 | TST: Test pd.Grouper base floating point error (#25161) | {
"avatar_url": "https://avatars.githubusercontent.com/u/13166114?v=4",
"events_url": "https://api.github.com/users/ihsansecer/events{/privacy}",
"followers_url": "https://api.github.com/users/ihsansecer/followers",
"following_url": "https://api.github.com/users/ihsansecer/following{/other_user}",
"gists_url": "https://api.github.com/users/ihsansecer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ihsansecer",
"id": 13166114,
"login": "ihsansecer",
"node_id": "MDQ6VXNlcjEzMTY2MTE0",
"organizations_url": "https://api.github.com/users/ihsansecer/orgs",
"received_events_url": "https://api.github.com/users/ihsansecer/received_events",
"repos_url": "https://api.github.com/users/ihsansecer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ihsansecer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ihsansecer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ihsansecer"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
},
{
"color": "AFEEEE",
"d... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-04-29T18:25:21Z | 2019-07-11T15:47:58Z | 2019-05-02T12:17:37Z | CONTRIBUTOR | null | - [x] closes #25161
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26240/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26240/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26240.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26240",
"merged_at": "2019-05-02T12:17:37Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26240.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26240"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26241 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26241/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26241/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26241/events | https://github.com/pandas-dev/pandas/pull/26241 | 438,472,131 | MDExOlB1bGxSZXF1ZXN0Mjc0NDk1NjE2 | 26,241 | BUG: Enable plotting with PeriodIndex with arbitrary frequencies, resolves #14763 | {
"avatar_url": "https://avatars.githubusercontent.com/u/38665102?v=4",
"events_url": "https://api.github.com/users/JoElfner/events{/privacy}",
"followers_url": "https://api.github.com/users/JoElfner/followers",
"following_url": "https://api.github.com/users/JoElfner/following{/other_user}",
"gists_url": "https://api.github.com/users/JoElfner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JoElfner",
"id": 38665102,
"login": "JoElfner",
"node_id": "MDQ6VXNlcjM4NjY1MTAy",
"organizations_url": "https://api.github.com/users/JoElfner/orgs",
"received_events_url": "https://api.github.com/users/JoElfner/received_events",
"repos_url": "https://api.github.com/users/JoElfner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JoElfner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JoElfner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JoElfner"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 10 | 2019-04-29T19:32:17Z | 2019-06-05T11:51:23Z | 2019-05-28T20:56:00Z | CONTRIBUTOR | null | - [x] closes #14763
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
Enables plotting of data with PeriodIndex with frequencies which are multiples of the `data.index.freq.rule_code`.
Hopefully I'll find some time to include tests within the next 3 weeks. Since this is my first pull requests, I may need some additional time to write tests. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26241/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26241/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26241.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26241",
"merged_at": "2019-05-28T20:55:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26241.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26241"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26242 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26242/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26242/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26242/events | https://github.com/pandas-dev/pandas/pull/26242 | 438,480,951 | MDExOlB1bGxSZXF1ZXN0Mjc0NTAyNTI2 | 26,242 | ENH: clearer error msg for unequal categoricals in merge_asof (GH#26136) | {
"avatar_url": "https://avatars.githubusercontent.com/u/632858?v=4",
"events_url": "https://api.github.com/users/chrish42/events{/privacy}",
"followers_url": "https://api.github.com/users/chrish42/followers",
"following_url": "https://api.github.com/users/chrish42/following{/other_user}",
"gists_url": "https://api.github.com/users/chrish42/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrish42",
"id": 632858,
"login": "chrish42",
"node_id": "MDQ6VXNlcjYzMjg1OA==",
"organizations_url": "https://api.github.com/users/chrish42/orgs",
"received_events_url": "https://api.github.com/users/chrish42/received_events",
"repos_url": "https://api.github.com/users/chrish42/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrish42/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrish42/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrish42"
} | [
{
"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": "ffa0ff",
"de... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 8 | 2019-04-29T19:55:45Z | 2019-05-02T14:02:58Z | 2019-05-01T21:48:01Z | CONTRIBUTOR | null | - [x] closes #26136
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26242/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26242/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26242.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26242",
"merged_at": "2019-05-01T21:48:00Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26242.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26242"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26243 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26243/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26243/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26243/events | https://github.com/pandas-dev/pandas/pull/26243 | 438,491,519 | MDExOlB1bGxSZXF1ZXN0Mjc0NTExMTAw | 26,243 | ENH: Poisson exponential window | {
"avatar_url": "https://avatars.githubusercontent.com/u/7594913?v=4",
"events_url": "https://api.github.com/users/rbenes/events{/privacy}",
"followers_url": "https://api.github.com/users/rbenes/followers",
"following_url": "https://api.github.com/users/rbenes/following{/other_user}",
"gists_url": "https://api.github.com/users/rbenes/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rbenes",
"id": 7594913,
"login": "rbenes",
"node_id": "MDQ6VXNlcjc1OTQ5MTM=",
"organizations_url": "https://api.github.com/users/rbenes/orgs",
"received_events_url": "https://api.github.com/users/rbenes/received_events",
"repos_url": "https://api.github.com/users/rbenes/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rbenes/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rbenes/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rbenes"
} | [
{
"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": "d4c5f9",
"default": false,
"description": "rolling,... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 7 | 2019-04-29T20:23:07Z | 2019-05-07T11:31:46Z | 2019-05-07T11:31:42Z | CONTRIBUTOR | null | - [x] closes #21303
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26243/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26243/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26243.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26243",
"merged_at": "2019-05-07T11:31:41Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26243.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26243"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26244 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26244/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26244/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26244/events | https://github.com/pandas-dev/pandas/pull/26244 | 438,555,294 | MDExOlB1bGxSZXF1ZXN0Mjc0NTYxOTEx | 26,244 | TST: make test_astype_categorical_to_other deterministic | {
"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": "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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 8 | 2019-04-30T00:01:21Z | 2019-04-30T10:25:44Z | 2019-04-30T10:25:38Z | MEMBER | null | The use of an unseeded random number generator means that this test can
occasionally fail for no particular reason.
In particular, I saw the following error:
```
=================================== FAILURES ===================================
______________ TestSeriesDtypes.test_astype_categorical_to_other _______________
self = <pandas.tests.series.test_dtypes.TestSeriesDtypes object at 0x7f223951b750>
def test_astype_categorical_to_other(self):
df = DataFrame({'value': np.random.randint(0, 10000, 100)})
labels = ["{0} - {1}".format(i, i + 499) for i in range(0, 10000, 500)]
cat_labels = Categorical(labels, labels)
df = df.sort_values(by=['value'], ascending=True)
df['value_group'] = pd.cut(df.value, range(0, 10500, 500),
right=False, labels=cat_labels)
s = df['value_group']
expected = s
tm.assert_series_equal(s.astype('category'), expected)
tm.assert_series_equal(s.astype(CategoricalDtype()), expected)
msg = (r"could not convert string to float: '(0 - 499|9500 - 9999)'|"
r"invalid literal for float\(\): (0 - 499|9500 - 9999)")
with pytest.raises(ValueError, match=msg):
> s.astype('float64')
E AssertionError: Pattern 'could not convert string to float: '(0 - 499|9500 - 9999)'|invalid literal for float\(\): (0 - 499|9500 - 9999)' not found in 'invalid literal for float(): 9000 - 9499'
```
By setting the random number seed, this should no longer be able to happen.
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26244/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26244/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26244.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26244",
"merged_at": "2019-04-30T10:25:38Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26244.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26244"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26245 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26245/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26245/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26245/events | https://github.com/pandas-dev/pandas/issues/26245 | 438,618,658 | MDU6SXNzdWU0Mzg2MTg2NTg= | 26,245 | Add midrules to multicolumns in to_latex() output | {
"avatar_url": "https://avatars.githubusercontent.com/u/2966015?v=4",
"events_url": "https://api.github.com/users/flutefreak7/events{/privacy}",
"followers_url": "https://api.github.com/users/flutefreak7/followers",
"following_url": "https://api.github.com/users/flutefreak7/following{/other_user}",
"gists_url": "https://api.github.com/users/flutefreak7/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/flutefreak7",
"id": 2966015,
"login": "flutefreak7",
"node_id": "MDQ6VXNlcjI5NjYwMTU=",
"organizations_url": "https://api.github.com/users/flutefreak7/orgs",
"received_events_url": "https://api.github.com/users/flutefreak7/received_events",
"repos_url": "https://api.github.com/users/flutefreak7/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/flutefreak7/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/flutefreak7/subscriptions",
"type": "User",
"url": "https://api.github.com/users/flutefreak7"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "006b75",
"default": false,
"description": "to_latex... | open | false | null | [] | null | 2 | 2019-04-30T06:19:27Z | 2021-05-09T06:11:17Z | null | NONE | null | I propose adding midrules under headers for multicolumn headers.
See https://tex.stackexchange.com/a/180372 for examples of the latex feature.
Below is a code snippet for how I alter pandas.to_latex() output to include midrules for headers with 2 levels:
```python
latex = latex.replace(r'{l}', r'{c}')
offset = int(index)
midrule_str = ''
for i, col in enumerate(df_table.columns.levels[0]):
indices = np.nonzero(np.array(df_table.columns.codes[0]) == i)[0]
hstart = 1 + offset + indices[0]
hend = 1 + offset + indices[-1]
midrule_str += rf'\cmidrule(lr){{{hstart}-{hend}}} '
# Ensure that headers don't get colored by row highlighting
midrule_str += r'\rowcolor{white}'
latex_lines = latex.splitlines()
latex_lines.insert(3, midrule_str)
latex = '\n'.join(latex_lines)
```
I also have a gist with my complete function of pandas/latex improvements to see the snippet in context of a working function:
https://gist.github.com/flutefreak7/50ffd291eaa348ead35c9794587006df
| {
"+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/26245/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26245/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26246 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26246/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26246/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26246/events | https://github.com/pandas-dev/pandas/issues/26246 | 438,646,972 | MDU6SXNzdWU0Mzg2NDY5NzI= | 26,246 | Is the IEX Data Reader going to lose stock symbols this june 2019 | {
"avatar_url": "https://avatars.githubusercontent.com/u/43305637?v=4",
"events_url": "https://api.github.com/users/kabonker/events{/privacy}",
"followers_url": "https://api.github.com/users/kabonker/followers",
"following_url": "https://api.github.com/users/kabonker/following{/other_user}",
"gists_url": "https://api.github.com/users/kabonker/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kabonker",
"id": 43305637,
"login": "kabonker",
"node_id": "MDQ6VXNlcjQzMzA1NjM3",
"organizations_url": "https://api.github.com/users/kabonker/orgs",
"received_events_url": "https://api.github.com/users/kabonker/received_events",
"repos_url": "https://api.github.com/users/kabonker/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kabonker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kabonker/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kabonker"
} | [] | closed | false | null | [] | null | 1 | 2019-04-30T07:56:10Z | 2019-04-30T09:29:23Z | 2019-04-30T09:29:22Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
# Your code here
stock_df = web.DataReader(stock,'iex', start_time, now_time)
```
#### Problem description
I visited the IEX website? https://iextrading.com/developer/
It has a notice on the website:
IEX API will sunset non-Investors Exchange (IEX) data on June 1, 2019. See Version 1.0 Docs.
On June 1, 2019, IEX API will sunset all non-IEX data. IEX Cloud, a non-Exchange platform, will continue to provide access to third-party data sources.
Does this mean the Pandas DataReader service for IEX will have limited stock tickers? Is this api the source of the data for this Data Frame?
https://iextrading.com/trading/eligible-symbols/
I use this list to get the tickers...
<details>
[paste the output of ``pd.show_versions()`` here below this line]
NSTALLED VERSIONS
------------------
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.23.4
pytest: 4.0.2
pip: 19.1
setuptools: 41.0.1
Cython: 0.29.2
numpy: 1.16.2
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.8.2
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.8
feather: None
matplotlib: 3.0.2
openpyxl: 2.5.12
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml: 4.2.5
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: 1.2.15
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 0.7.0
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26246/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26246/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26247 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26247/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26247/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26247/events | https://github.com/pandas-dev/pandas/issues/26247 | 438,801,033 | MDU6SXNzdWU0Mzg4MDEwMzM= | 26,247 | numpy ravel does not work on a list of DataFrames with specified column names | {
"avatar_url": "https://avatars.githubusercontent.com/u/1093567?v=4",
"events_url": "https://api.github.com/users/cod3licious/events{/privacy}",
"followers_url": "https://api.github.com/users/cod3licious/followers",
"following_url": "https://api.github.com/users/cod3licious/following{/other_user}",
"gists_url": "https://api.github.com/users/cod3licious/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cod3licious",
"id": 1093567,
"login": "cod3licious",
"node_id": "MDQ6VXNlcjEwOTM1Njc=",
"organizations_url": "https://api.github.com/users/cod3licious/orgs",
"received_events_url": "https://api.github.com/users/cod3licious/received_events",
"repos_url": "https://api.github.com/users/cod3licious/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cod3licious/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cod3licious/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cod3licious"
} | [
{
"color": "0052cc",
"default": false,
"description": "pandas objects compatability with Numpy or Python functions",
"id": 76865106,
"name": "Compat",
"node_id": "MDU6TGFiZWw3Njg2NTEwNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Compat"
},
{
"color": "0e8a1... | open | false | null | [] | null | 6 | 2019-04-30T14:14:04Z | 2021-07-14T03:40:08Z | null | NONE | null | #### Code Sample
```python
import numpy as np
import pandas as pd
x = np.random.randn(10,3)
# this works - list of DataFrames without column names
np.ravel([pd.DataFrame(batch.reshape(1,3)) for batch in x])
# this also works - single DataFrame with column names
np.ravel(pd.DataFrame(x[0].reshape(1,3), columns=["x1", "x2", "x3"]))
# this doesn't work - list of DataFrames with column names
np.ravel([pd.DataFrame(batch.reshape(1,3), columns=["x1", "x2", "x3"]) for batch in x])
```
#### Problem description
When calling numpy.ravel on a list of DataFrames with column names it gives an error - regular DataFrames aren't an issue though.
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~/anaconda/envs/python36/lib/python3.6/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
2656 try:
-> 2657 return self._engine.get_loc(key)
2658 except KeyError:
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 0
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
<ipython-input-67-b9b3fcdd02a0> in <module>()
----> 1 np.ravel([pd.DataFrame(batch.reshape(1,3), columns=["x1", "x2", "x3"]) for batch in x])
~/anaconda/envs/python36/lib/python3.6/site-packages/numpy/core/fromnumeric.py in ravel(a, order)
1572 return asarray(a).ravel(order=order)
1573 else:
-> 1574 return asanyarray(a).ravel(order=order)
1575
1576
~/anaconda/envs/python36/lib/python3.6/site-packages/numpy/core/numeric.py in asanyarray(a, dtype, order)
551
552 """
--> 553 return array(a, dtype, copy=False, order=order, subok=True)
554
555
~/anaconda/envs/python36/lib/python3.6/site-packages/pandas/core/frame.py in __getitem__(self, key)
2925 if self.columns.nlevels > 1:
2926 return self._getitem_multilevel(key)
-> 2927 indexer = self.columns.get_loc(key)
2928 if is_integer(indexer):
2929 indexer = [indexer]
~/anaconda/envs/python36/lib/python3.6/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
2657 return self._engine.get_loc(key)
2658 except KeyError:
-> 2659 return self._engine.get_loc(self._maybe_cast_indexer(key))
2660 indexer = self.get_indexer([key], method=method, tolerance=tolerance)
2661 if indexer.ndim > 1 or indexer.size > 1:
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 0
```
#### Expected Output
no error
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: 3.3.2
pip: 19.1
setuptools: 38.4.0
Cython: 0.27.3
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.6.6
patsy: 0.5.0
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.4
feather: None
matplotlib: 3.0.1
openpyxl: 2.4.10
xlrd: 1.1.0
xlwt: 1.2.0
xlsxwriter: 1.0.2
lxml.etree: 4.1.1
bs4: 4.6.0
html5lib: 0.9999999
sqlalchemy: 1.2.1
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: 0.1.6
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26247/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26247/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26248 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26248/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26248/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26248/events | https://github.com/pandas-dev/pandas/issues/26248 | 438,825,979 | MDU6SXNzdWU0Mzg4MjU5Nzk= | 26,248 | DatetimeIndex is converted to Index upon renaming of the columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/47628339?v=4",
"events_url": "https://api.github.com/users/KatemaNL/events{/privacy}",
"followers_url": "https://api.github.com/users/KatemaNL/followers",
"following_url": "https://api.github.com/users/KatemaNL/following{/other_user}",
"gists_url": "https://api.github.com/users/KatemaNL/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/KatemaNL",
"id": 47628339,
"login": "KatemaNL",
"node_id": "MDQ6VXNlcjQ3NjI4MzM5",
"organizations_url": "https://api.github.com/users/KatemaNL/orgs",
"received_events_url": "https://api.github.com/users/KatemaNL/received_events",
"repos_url": "https://api.github.com/users/KatemaNL/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/KatemaNL/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KatemaNL/subscriptions",
"type": "User",
"url": "https://api.github.com/users/KatemaNL"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 2 | 2019-04-30T15:02:39Z | 2019-04-30T18:33:33Z | 2019-04-30T15:20:43Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
import pytz
df = pd.DataFrame(data={'metric': [1, 2, 3, 4, 5, 6]},
index=pd.DatetimeIndex(['2007-07-13 02:00', '2007-07-13 03:00', '2007-07-13 04:00',
'2007-07-13 05:00', '2007-07-13 06:00', '2007-07-13 07:00'],
freq='H', tz=pytz.utc))
print(f'Index before renaming:\n{df.index}') # Gives DatetimeIndex with timezone UTC and frequency H
df.rename(index=str, columns={'metric': 'metric_renamed'}, inplace=True)
print(f'Index after renaming:\n{df.index}') # Gives Index without timezone and frequency
```
#### Problem description
The class of the dataframe index changes (from DatetimeIndex to Index) and timezone and frequency information is lost, where only the names of the columns should have changed.
***HINT***:
Caused by _transform_index in pandas/core/internals/managers.py
If the index is not a MultiIndex, an Index is returned
**Note**: Pandas is upgraded to latest version (0.24.2)
#### Expected Output
The index of the dataframe should be left untouched.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-47-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
pandas: 0.24.2
pytest: None
pip: 19.0.1
setuptools: 40.6.2
Cython: None
numpy: 1.16.0
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.4.0
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details> | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26248/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26248/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26249 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26249/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26249/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26249/events | https://github.com/pandas-dev/pandas/issues/26249 | 438,893,928 | MDU6SXNzdWU0Mzg4OTM5Mjg= | 26,249 | Some cleanups of merge_asof tests and error code | {
"avatar_url": "https://avatars.githubusercontent.com/u/632858?v=4",
"events_url": "https://api.github.com/users/chrish42/events{/privacy}",
"followers_url": "https://api.github.com/users/chrish42/followers",
"following_url": "https://api.github.com/users/chrish42/following{/other_user}",
"gists_url": "https://api.github.com/users/chrish42/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chrish42",
"id": 632858,
"login": "chrish42",
"node_id": "MDQ6VXNlcjYzMjg1OA==",
"organizations_url": "https://api.github.com/users/chrish42/orgs",
"received_events_url": "https://api.github.com/users/chrish42/received_events",
"repos_url": "https://api.github.com/users/chrish42/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chrish42/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chrish42/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chrish42"
} | [
{
"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": "02d7e1",
"d... | open | false | null | [] | null | 5 | 2019-04-30T17:35:24Z | 2020-05-22T03:34:13Z | null | CONTRIBUTOR | null | This is a follow-up to #26242, for the following points:
- [ ] Add test in `test_merge_asof.py` that checks that `merge_asof()` raises an exception if called on unordered categories for a merge key.
- [ ] Remove docstrings in tests in `test_merge_asof.py`
- [ ] Add test to check that `merge_asof` works when one of the merge keys is an ordered categorical
- [ ] Raise MergeError sooner (rather than the ValueError that happens later) when asked to do a merge and one of the keys is an unordered categorical.
- [ ] use `repr(x.dtype)` instead of `x.dtype` as input to `.format()` in exception messages everywhere in merge.py | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26249/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26249/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26250 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26250/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26250/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26250/events | https://github.com/pandas-dev/pandas/pull/26250 | 438,916,841 | MDExOlB1bGxSZXF1ZXN0Mjc0ODQwNDQw | 26,250 | DOC removed unnecessary use of parameter in example rename function call | {
"avatar_url": "https://avatars.githubusercontent.com/u/47628339?v=4",
"events_url": "https://api.github.com/users/KatemaNL/events{/privacy}",
"followers_url": "https://api.github.com/users/KatemaNL/followers",
"following_url": "https://api.github.com/users/KatemaNL/following{/other_user}",
"gists_url": "https://api.github.com/users/KatemaNL/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/KatemaNL",
"id": 47628339,
"login": "KatemaNL",
"node_id": "MDQ6VXNlcjQ3NjI4MzM5",
"organizations_url": "https://api.github.com/users/KatemaNL/orgs",
"received_events_url": "https://api.github.com/users/KatemaNL/received_events",
"repos_url": "https://api.github.com/users/KatemaNL/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/KatemaNL/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KatemaNL/subscriptions",
"type": "User",
"url": "https://api.github.com/users/KatemaNL"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-04-30T18:32:34Z | 2019-05-07T01:38:26Z | 2019-05-07T01:38:09Z | CONTRIBUTOR | null | removed unnecessary (and misleading) use of index parameter in docstring example function call of rename function
xref #26248
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26250/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26250/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26250.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26250",
"merged_at": "2019-05-07T01:38:09Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26250.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26250"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26251 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26251/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26251/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26251/events | https://github.com/pandas-dev/pandas/issues/26251 | 439,024,418 | MDU6SXNzdWU0MzkwMjQ0MTg= | 26,251 | Fix Type Annotation in pandas.compat | {
"avatar_url": "https://avatars.githubusercontent.com/u/1430066?v=4",
"events_url": "https://api.github.com/users/gwrome/events{/privacy}",
"followers_url": "https://api.github.com/users/gwrome/followers",
"following_url": "https://api.github.com/users/gwrome/following{/other_user}",
"gists_url": "https://api.github.com/users/gwrome/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gwrome",
"id": 1430066,
"login": "gwrome",
"node_id": "MDQ6VXNlcjE0MzAwNjY=",
"organizations_url": "https://api.github.com/users/gwrome/orgs",
"received_events_url": "https://api.github.com/users/gwrome/received_events",
"repos_url": "https://api.github.com/users/gwrome/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gwrome/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gwrome/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gwrome"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 0 | 2019-04-30T23:52:53Z | 2019-05-01T23:27:00Z | 2019-05-01T23:27:00Z | CONTRIBUTOR | null | Part of #25882
Type annotations for the following file need to be corrected to remove **pandas.compat** from the mypy blacklist.
Mypy throws the following error:
```sh
pandas/compat/__init__.py:81: error: Module has no attribute "re"
```
PR to follow.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26251/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26251/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26252 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26252/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26252/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26252/events | https://github.com/pandas-dev/pandas/pull/26252 | 439,025,052 | MDExOlB1bGxSZXF1ZXN0Mjc0OTI1MTY3 | 26,252 | Fix type annotation in pandas.compat | {
"avatar_url": "https://avatars.githubusercontent.com/u/1430066?v=4",
"events_url": "https://api.github.com/users/gwrome/events{/privacy}",
"followers_url": "https://api.github.com/users/gwrome/followers",
"following_url": "https://api.github.com/users/gwrome/following{/other_user}",
"gists_url": "https://api.github.com/users/gwrome/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gwrome",
"id": 1430066,
"login": "gwrome",
"node_id": "MDQ6VXNlcjE0MzAwNjY=",
"organizations_url": "https://api.github.com/users/gwrome/orgs",
"received_events_url": "https://api.github.com/users/gwrome/received_events",
"repos_url": "https://api.github.com/users/gwrome/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gwrome/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gwrome/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gwrome"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-04-30T23:56:08Z | 2019-05-02T12:30:28Z | 2019-05-01T23:27:00Z | CONTRIBUTOR | null | - [X] closes #26251
- [X] tests passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26252/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26252/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26252.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26252",
"merged_at": "2019-05-01T23:27:00Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26252.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26252"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26253 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26253/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26253/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26253/events | https://github.com/pandas-dev/pandas/issues/26253 | 439,056,698 | MDU6SXNzdWU0MzkwNTY2OTg= | 26,253 | DateFormatter('%Y') for x-axis labels gives strange output for a specific date value | {
"avatar_url": "https://avatars.githubusercontent.com/u/6355796?v=4",
"events_url": "https://api.github.com/users/davehemming/events{/privacy}",
"followers_url": "https://api.github.com/users/davehemming/followers",
"following_url": "https://api.github.com/users/davehemming/following{/other_user}",
"gists_url": "https://api.github.com/users/davehemming/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davehemming",
"id": 6355796,
"login": "davehemming",
"node_id": "MDQ6VXNlcjYzNTU3OTY=",
"organizations_url": "https://api.github.com/users/davehemming/orgs",
"received_events_url": "https://api.github.com/users/davehemming/received_events",
"repos_url": "https://api.github.com/users/davehemming/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davehemming/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davehemming/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davehemming"
} | [
{
"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,
... | open | false | null | [] | null | 7 | 2019-05-01T03:21:28Z | 2021-07-02T05:40:55Z | null | NONE | null | ```python
import numpy as np
import pandas as pd
import matplotlib.dates as md
import matplotlib.pyplot as plt
data = {
'date': [pd.Timestamp(2014, 9, 28), pd.Timestamp(2014, 10, 5), pd.Timestamp(2014, 10, 12)],
'val': [0.37,0.44,0.44]
}
df = pd.DataFrame(data=data)
ax = df.plot(x='date', y='val')
ax.xaxis.set_major_formatter(md.DateFormatter('%Y'))
```
#### Problem description
When I run the above code the plot generated should have x axis tick labels showing the year e.g. **'2014', '2014', '2014'**, etc. Instead it has the labels **'0007', '0007', '0007'**.
If I increment the last date from '**2014-10-12**' to '**2014-10-13**' in the 'data' variable by one day (or really change it to anything else) like this:
```python
data = {
'date': [pd.Timestamp(2014, 9, 28), pd.Timestamp(2014, 10, 5), pd.Timestamp(2014, 10, 13)],
'val': [0.37,0.44,0.44]
}
```
Then rerun it, it works as expected.
#### Expected Output
x label on generated plot figure should be **'2014', '2014', '2014', ...**
#### What else have you tried?
I ran the same data using only numpy and matplotlib to rule that out as a source of the unexpected output and I was given the expected x-axis label formatting with **'2014', '2014', '2014'**, etc. Here is my code for that;
```python
data = np.array([
(np.datetime64('2014-09-28'), 0.37),
(np.datetime64('2014-10-05'), 0.44),
(np.datetime64('2014-10-12'), 0.44)],
dtype=[('date', 'datetime64[D]'), ('val', float)
])
data = data.view(np.recarray)
fig, ax = plt.subplots()
ax.plot(data.date, data.val)
ax.xaxis.set_major_formatter(md.DateFormatter('%Y'))
plt.show()
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_AU.UTF-8
LOCALE: en_AU.UTF-8
pandas: 0.24.2
pytest: None
pip: 19.0.3
setuptools: 41.0.0
Cython: None
numpy: 1.16.2
scipy: 1.2.1
pyarrow: None
xarray: 0.11.3
IPython: 7.4.0
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: 4.3.3
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26253/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26253/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26254 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26254/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26254/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26254/events | https://github.com/pandas-dev/pandas/issues/26254 | 439,097,205 | MDU6SXNzdWU0MzkwOTcyMDU= | 26,254 | GroupBy.mean() doctests failed due to comparison to nothing | {
"avatar_url": "https://avatars.githubusercontent.com/u/6477701?v=4",
"events_url": "https://api.github.com/users/HyukjinKwon/events{/privacy}",
"followers_url": "https://api.github.com/users/HyukjinKwon/followers",
"following_url": "https://api.github.com/users/HyukjinKwon/following{/other_user}",
"gists_url": "https://api.github.com/users/HyukjinKwon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HyukjinKwon",
"id": 6477701,
"login": "HyukjinKwon",
"node_id": "MDQ6VXNlcjY0Nzc3MDE=",
"organizations_url": "https://api.github.com/users/HyukjinKwon/orgs",
"received_events_url": "https://api.github.com/users/HyukjinKwon/received_events",
"repos_url": "https://api.github.com/users/HyukjinKwon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HyukjinKwon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HyukjinKwon"
} | [
{
"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": "3465A4",
"d... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 0 | 2019-05-01T08:10:41Z | 2019-05-01T21:46:23Z | 2019-05-01T21:46:23Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
[`GroupBy.mean()` doctests](https://pandas-docs.github.io/pandas-docs-travis/reference/api/pandas.core.groupby.GroupBy.mean.html#pandas.core.groupby.GroupBy.mean):
```python
Groupby one column and return the mean of the remaining columns in
each group.
>>> df.groupby('A').mean()
>>>
B C
A
1 3.0 1.333333
2 4.0 1.500000
Groupby two columns and return the mean of the remaining column.
>>> df.groupby(['A', 'B']).mean()
>>>
C
A B
1 2.0 2
4.0 1
2 3.0 1
5.0 2
Groupby one column and return the mean of only particular column in
the group.
>>> df.groupby('A')['B'].mean()
>>>
A
1 3.0
2 4.0
Name: B, dtype: float64
```
#### Problem description
Doctests should not have extra `>>>` which seems leading to comparison to nothing.
For instance, as below:
```python
Failed example:
df.groupby('A').mean()
Expected nothing
Got:
B C
A
1 3.0 1.333333
2 4.0 1.500000
```
#### Expected Output
Doctest pass
#### Output of ``pd.show_versions()``
<details>
```
>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.23.4
pytest: 4.4.1
pip: 19.0.3
setuptools: 40.8.0
Cython: None
numpy: 1.16.2
scipy: None
pyarrow: 0.13.0
xarray: None
IPython: None
sphinx: 2.0.1
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
```
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26254/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26254/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26255 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26255/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26255/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26255/events | https://github.com/pandas-dev/pandas/pull/26255 | 439,097,488 | MDExOlB1bGxSZXF1ZXN0Mjc0OTc5MDEw | 26,255 | DOC: Test doctests in pandas/core/groupby/groupby.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/6477701?v=4",
"events_url": "https://api.github.com/users/HyukjinKwon/events{/privacy}",
"followers_url": "https://api.github.com/users/HyukjinKwon/followers",
"following_url": "https://api.github.com/users/HyukjinKwon/following{/other_user}",
"gists_url": "https://api.github.com/users/HyukjinKwon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HyukjinKwon",
"id": 6477701,
"login": "HyukjinKwon",
"node_id": "MDQ6VXNlcjY0Nzc3MDE=",
"organizations_url": "https://api.github.com/users/HyukjinKwon/orgs",
"received_events_url": "https://api.github.com/users/HyukjinKwon/received_events",
"repos_url": "https://api.github.com/users/HyukjinKwon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HyukjinKwon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HyukjinKwon"
} | [
{
"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": "3465A4",
"d... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-05-01T08:12:04Z | 2019-05-01T23:21:01Z | 2019-05-01T21:46:23Z | CONTRIBUTOR | null | - [x] closes #26254
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26255/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26255/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26255.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26255",
"merged_at": "2019-05-01T21:46:22Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26255.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26255"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26256 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26256/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26256/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26256/events | https://github.com/pandas-dev/pandas/issues/26256 | 439,134,054 | MDU6SXNzdWU0MzkxMzQwNTQ= | 26,256 | Pandas 0.24.2 upgrade ERROR | {
"avatar_url": "https://avatars.githubusercontent.com/u/27162264?v=4",
"events_url": "https://api.github.com/users/SigmaBid/events{/privacy}",
"followers_url": "https://api.github.com/users/SigmaBid/followers",
"following_url": "https://api.github.com/users/SigmaBid/following{/other_user}",
"gists_url": "https://api.github.com/users/SigmaBid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SigmaBid",
"id": 27162264,
"login": "SigmaBid",
"node_id": "MDQ6VXNlcjI3MTYyMjY0",
"organizations_url": "https://api.github.com/users/SigmaBid/orgs",
"received_events_url": "https://api.github.com/users/SigmaBid/received_events",
"repos_url": "https://api.github.com/users/SigmaBid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SigmaBid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SigmaBid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SigmaBid"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
] | closed | false | null | [] | null | 1 | 2019-05-01T11:16:40Z | 2019-05-01T13:50:49Z | 2019-05-01T13:50:49Z | NONE | null | python --version - Python 3.4.9
pip3 install pandas==0.24.2
ERROR: No matching distribution found for pandas==0.24.2
Hi, We are trying to upgrade Pandas to 0.24.2 using pip 19.1 but it says matching distribution not found. Any ideas? Thanks! | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26256/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26256/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26257 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26257/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26257/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26257/events | https://github.com/pandas-dev/pandas/pull/26257 | 439,216,545 | MDExOlB1bGxSZXF1ZXN0Mjc1MDcwOTQ4 | 26,257 | [BUG] Add is_coerce argument to func array_to_datetime_object (GH26122) | {
"avatar_url": "https://avatars.githubusercontent.com/u/14367887?v=4",
"events_url": "https://api.github.com/users/makbigc/events{/privacy}",
"followers_url": "https://api.github.com/users/makbigc/followers",
"following_url": "https://api.github.com/users/makbigc/following{/other_user}",
"gists_url": "https://api.github.com/users/makbigc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makbigc",
"id": 14367887,
"login": "makbigc",
"node_id": "MDQ6VXNlcjE0MzY3ODg3",
"organizations_url": "https://api.github.com/users/makbigc/orgs",
"received_events_url": "https://api.github.com/users/makbigc/received_events",
"repos_url": "https://api.github.com/users/makbigc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makbigc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makbigc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makbigc"
} | [
{
"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,
... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-01T15:58:46Z | 2019-05-07T01:59:30Z | 2019-05-07T01:59:20Z | CONTRIBUTOR | null | - closes #26122
- 1 test added
- passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- whatsnew entry added
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26257/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26257/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26257.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26257",
"merged_at": "2019-05-07T01:59:20Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26257.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26257"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26258 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26258/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26258/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26258/events | https://github.com/pandas-dev/pandas/issues/26258 | 439,228,127 | MDU6SXNzdWU0MzkyMjgxMjc= | 26,258 | Adding offset to DatetimeIndex is broken | {
"avatar_url": "https://avatars.githubusercontent.com/u/26414241?v=4",
"events_url": "https://api.github.com/users/mmamaev/events{/privacy}",
"followers_url": "https://api.github.com/users/mmamaev/followers",
"following_url": "https://api.github.com/users/mmamaev/following{/other_user}",
"gists_url": "https://api.github.com/users/mmamaev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mmamaev",
"id": 26414241,
"login": "mmamaev",
"node_id": "MDQ6VXNlcjI2NDE0MjQx",
"organizations_url": "https://api.github.com/users/mmamaev/orgs",
"received_events_url": "https://api.github.com/users/mmamaev/received_events",
"repos_url": "https://api.github.com/users/mmamaev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mmamaev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mmamaev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mmamaev"
} | [
{
"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,
... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 2 | 2019-05-01T16:31:58Z | 2019-05-12T20:51:59Z | 2019-05-12T20:51:59Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
offset = pd.DateOffset(months=3, days=10)
dates = pd.date_range(start='01 Jan 2014', end='01 Jan 2017', freq='AS')
dates + offset
```
#### Problem description
ValueError is raised:
```python
Traceback (most recent call last):
File "C:\mma\local\Anaconda3\envs\pd24\lib\site-packages\pandas\core\arrays\datetimelike.py", line 884, in _validate_frequency
raise ValueError
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\mma\local\Anaconda3\envs\pd24\lib\site-packages\pandas\core\indexes\datetimelike.py", line 489, in __add__
result = self._data.__add__(maybe_unwrap_index(other))
File "C:\mma\local\Anaconda3\envs\pd24\lib\site-packages\pandas\core\arrays\datetimelike.py", line 1190, in __add__
result = self._add_offset(other)
File "C:\mma\local\Anaconda3\envs\pd24\lib\site-packages\pandas\core\arrays\datetimes.py", line 737, in _add_offset
result = offset.apply_index(values)
File "pandas/_libs/tslibs/offsets.pyx", line 116, in pandas._libs.tslibs.offsets.apply_index_wraps.wrapper
File "C:\mma\local\Anaconda3\envs\pd24\lib\site-packages\pandas\tseries\offsets.py", line 278, in apply_index
i = type(i)(shifted, freq=i.freq, dtype=i.dtype)
File "C:\mma\local\Anaconda3\envs\pd24\lib\site-packages\pandas\core\arrays\datetimes.py", line 351, in __init__
type(self)._validate_frequency(self, freq)
File "C:\mma\local\Anaconda3\envs\pd24\lib\site-packages\pandas\core\arrays\datetimelike.py", line 897, in _validate_frequency
.format(infer=inferred, passed=freq.freqstr))
ValueError: Inferred frequency AS-APR from passed values does not conform to passed frequency AS-JAN
```
#### Expected Output
This is what had been working through version 0.22.0 and was broken somewhere between 0.22 and 0.24:
```python
>>> dates + offset
DatetimeIndex(['2014-04-11', '2015-04-11', '2016-04-11', '2017-04-11'], dtype='datetime64[ns]', freq=None)
```
#### Workaround
```python
>>> pd.DatetimeIndex([date + offset for date in dates])
DatetimeIndex(['2014-04-11', '2015-04-11', '2016-04-11', '2017-04-11'], dtype='datetime64[ns]', freq=None)
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.2
pytest: 4.4.1
pip: 19.1
setuptools: 41.0.1
Cython: None
numpy: 1.16.3
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26258/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26258/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26259 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26259/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26259/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26259/events | https://github.com/pandas-dev/pandas/issues/26259 | 439,235,605 | MDU6SXNzdWU0MzkyMzU2MDU= | 26,259 | Int64Dtype in read_csv leads to unexpected values | {
"avatar_url": "https://avatars.githubusercontent.com/u/748655?v=4",
"events_url": "https://api.github.com/users/alohr/events{/privacy}",
"followers_url": "https://api.github.com/users/alohr/followers",
"following_url": "https://api.github.com/users/alohr/following{/other_user}",
"gists_url": "https://api.github.com/users/alohr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alohr",
"id": 748655,
"login": "alohr",
"node_id": "MDQ6VXNlcjc0ODY1NQ==",
"organizations_url": "https://api.github.com/users/alohr/orgs",
"received_events_url": "https://api.github.com/users/alohr/received_events",
"repos_url": "https://api.github.com/users/alohr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alohr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alohr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alohr"
} | [
{
"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 dtyp... | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 1 | 2019-05-01T16:54:24Z | 2019-05-02T04:04:19Z | null | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
import io
t = io.StringIO('''\
event,timestamp
a,1556559573141592653
b,1556559573141592654
c,
d,1556559573141592655
''')
# Reading the timestamps as strings works fine
print("\nExpected output:")
print(pd.read_csv(t, dtype={'timestamp': object}))
# Now with Int64Dtype
t.seek(0)
print("\nActual output:")
print(pd.read_csv(t, dtype={'timestamp': pd.Int64Dtype()}))
```
#### Problem description
I would like to read csv files with nullable (big) integers into a dataframe. The integers represent nanoseconds since the UNIX epoch 1970. Using the Int64Dtype introduced in 0.24.0 seems like the way to go. I quote from the FAQ:
https://pandas.pydata.org/pandas-docs/stable/user_guide/gotchas.html#nan-integer-na-values-and-na-type-promotions
> If you need to represent integers with possibly missing values, use one of the nullable- integer extension dtypes provided by pandas
#### Expected Output
```
event timestamp
0 a 1556559573141592653
1 b 1556559573141592654
2 c NaN
3 d 1556559573141592655
```
#### Actual Output
```
event timestamp
0 a 1556559573141592576
1 b 1556559573141592576
2 c NaN
3 d 1556559573141592576
```
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
pandas: 0.24.2
pytest: None
pip: 19.1
setuptools: 41.0.1
Cython: None
numpy: 1.16.3
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26259/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26259/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26260 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26260/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26260/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26260/events | https://github.com/pandas-dev/pandas/pull/26260 | 439,257,896 | MDExOlB1bGxSZXF1ZXN0Mjc1MTAzMzQ0 | 26,260 | CLN: Removing dead code in plotting and minor refactoring | {
"avatar_url": "https://avatars.githubusercontent.com/u/49879400?v=4",
"events_url": "https://api.github.com/users/nrebena/events{/privacy}",
"followers_url": "https://api.github.com/users/nrebena/followers",
"following_url": "https://api.github.com/users/nrebena/following{/other_user}",
"gists_url": "https://api.github.com/users/nrebena/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nrebena",
"id": 49879400,
"login": "nrebena",
"node_id": "MDQ6VXNlcjQ5ODc5NDAw",
"organizations_url": "https://api.github.com/users/nrebena/orgs",
"received_events_url": "https://api.github.com/users/nrebena/received_events",
"repos_url": "https://api.github.com/users/nrebena/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nrebena/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nrebena/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nrebena"
} | [
{
"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": "207de5",
"default": false,
"description": nul... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-01T18:00:36Z | 2019-05-27T12:19:16Z | 2019-05-02T16:55:58Z | CONTRIBUTOR | null | Follow up of #26185 .
This delete dead code from the `MPLPlot._post_plot_logic_common` and move the change from #26185 into` LinePlot._post_plot_logic`.
In detail, the change are only executed when the `self.__need_to_set_index` is True
The `self._need_to_set_index` variable is only set if you call `_get_xticks`.
The only place where `_get_xticks` is called is in `LinePlot._make_plot`.
Every children of `LinePlot` that redefine `_make_plot` also redefine `_post_plot_logic`.
Therefore I move the change in `LinePlot._post_plot_logic` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26260/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26260/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26260.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26260",
"merged_at": "2019-05-02T16:55:58Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26260.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26260"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26261 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26261/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26261/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26261/events | https://github.com/pandas-dev/pandas/pull/26261 | 439,305,908 | MDExOlB1bGxSZXF1ZXN0Mjc1MTQxOTU4 | 26,261 | CLN: clean more uses of python2-style super() | {
"avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4",
"events_url": "https://api.github.com/users/topper-123/events{/privacy}",
"followers_url": "https://api.github.com/users/topper-123/followers",
"following_url": "https://api.github.com/users/topper-123/following{/other_user}",
"gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/topper-123",
"id": 26364415,
"login": "topper-123",
"node_id": "MDQ6VXNlcjI2MzY0NDE1",
"organizations_url": "https://api.github.com/users/topper-123/orgs",
"received_events_url": "https://api.github.com/users/topper-123/received_events",
"repos_url": "https://api.github.com/users/topper-123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/topper-123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/topper-123"
} | [] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-01T20:14:09Z | 2019-05-01T21:34:24Z | 2019-05-01T21:32:02Z | CONTRIBUTOR | null | - [x] xref #25725 & #26177
Simplifies the uses of ``super`` by converting to use python3 idioms. This is a followup to #26177, focusing on uses of ``super`` in class methods.
Also adds a check for python2-style uses of ``super`` in code_checks.sh. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26261/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26261/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26261.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26261",
"merged_at": "2019-05-01T21:32:02Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26261.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26261"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26262 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26262/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26262/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26262/events | https://github.com/pandas-dev/pandas/issues/26262 | 439,381,472 | MDU6SXNzdWU0MzkzODE0NzI= | 26,262 | Segfault in `pandas.DataFrame.from_records` | {
"avatar_url": "https://avatars.githubusercontent.com/u/2783717?v=4",
"events_url": "https://api.github.com/users/jcrist/events{/privacy}",
"followers_url": "https://api.github.com/users/jcrist/followers",
"following_url": "https://api.github.com/users/jcrist/following{/other_user}",
"gists_url": "https://api.github.com/users/jcrist/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jcrist",
"id": 2783717,
"login": "jcrist",
"node_id": "MDQ6VXNlcjI3ODM3MTc=",
"organizations_url": "https://api.github.com/users/jcrist/orgs",
"received_events_url": "https://api.github.com/users/jcrist/received_events",
"repos_url": "https://api.github.com/users/jcrist/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jcrist/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jcrist/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jcrist"
} | [
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] | closed | false | null | [] | null | 2 | 2019-05-02T00:12:49Z | 2019-05-02T16:53:05Z | 2019-05-02T16:53:05Z | CONTRIBUTOR | null | The following causes `pandas.DataFrame.from_records` to segfault:
```python
pd.DataFrame.from_records(
([(1, 2, 3), (4, 5, 6)],),
columns=['a', 'b', 'c']
)
```
The above is invalid and should error (a trailing comma led a list to accidentally be a 1-tuple containing a list, which is how I came upon this).
<details><summary>Version Information</summary>
```python
In [2]: pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Darwin
OS-release: 17.2.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: None
pip: 19.1
setuptools: 41.0.1
Cython: None
numpy: 1.16.3
scipy: None
pyarrow: None
xarray: None
IPython: 7.5.0
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: 1.2.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
```
</details> | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26262/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26262/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26263 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26263/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26263/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26263/events | https://github.com/pandas-dev/pandas/issues/26263 | 439,415,691 | MDU6SXNzdWU0Mzk0MTU2OTE= | 26,263 | Remove register keyword from tokenizer extension | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 0 | 2019-05-02T03:40:55Z | 2019-05-05T21:15:51Z | 2019-05-05T21:15:51Z | MEMBER | null | Giving the extension modules a look while working on my C knowledge I noticed that there were quite a few uses of the `register` keyword in tokenizer.c
I think it's worth removing this for the following reasons:
- Python removed it on their end over 6 years ago back in 3.4 (see [here](https://bugs.python.org/issue18722))
- Its usage (at least in gcc scope) is most likely considered a historical artifact and it was removed in C++17 (see [here](http://gcc.gnu.org/ml/gcc/2010-05/msg00098.html) and [here](http://clang.llvm.org/cxx_status.html#cxx17))
- Its almost assuredly being ignored internally, because our usage of it in some places is incorrect; our code takes the address of variables declared with `register` which should be disallowed (see [here](https://github.com/pandas-dev/pandas/blob/7fafb356549f1c52a9896429ce0241487f42bea9/pandas/_libs/src/parser/tokenizer.c#L138))
Tried it out locally and saw no performance regression in removing. Will push a PR shortly
(edit: point 3 above might not be true; `->` has a higher precedence than `&` in C so might be OK in current code) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26263/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26263/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26264 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26264/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26264/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26264/events | https://github.com/pandas-dev/pandas/pull/26264 | 439,418,494 | MDExOlB1bGxSZXF1ZXN0Mjc1MjI4MzMw | 26,264 | Remove usage of register keyword in Extension Modules | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 8 | 2019-05-02T04:00:39Z | 2020-01-16T00:34:01Z | 2019-05-05T21:15:51Z | MEMBER | null | - [X] closes #26263
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry
ASV results show no difference:
```sh
BENCHMARKS NOT SIGNIFICANTLY CHANGED.
```
As I am fairly certain this keyword was being entirely ignored by the compilers anyway (see issue for reasoning) | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26264/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26264/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26264.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26264",
"merged_at": "2019-05-05T21:15:51Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26264.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26264"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26265 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26265/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26265/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26265/events | https://github.com/pandas-dev/pandas/issues/26265 | 439,418,868 | MDU6SXNzdWU0Mzk0MTg4Njg= | 26,265 | DataFrame.sample() | {
"avatar_url": "https://avatars.githubusercontent.com/u/37640402?v=4",
"events_url": "https://api.github.com/users/omonfared/events{/privacy}",
"followers_url": "https://api.github.com/users/omonfared/followers",
"following_url": "https://api.github.com/users/omonfared/following{/other_user}",
"gists_url": "https://api.github.com/users/omonfared/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/omonfared",
"id": 37640402,
"login": "omonfared",
"node_id": "MDQ6VXNlcjM3NjQwNDAy",
"organizations_url": "https://api.github.com/users/omonfared/orgs",
"received_events_url": "https://api.github.com/users/omonfared/received_events",
"repos_url": "https://api.github.com/users/omonfared/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/omonfared/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/omonfared/subscriptions",
"type": "User",
"url": "https://api.github.com/users/omonfared"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 1 | 2019-05-02T04:02:57Z | 2019-05-02T04:06:44Z | 2019-05-02T04:06:22Z | NONE | null | DataFrame.sample(n=None, frac=None, replace=False, weights=None, random_state=None, axis=None)[source]
It seems like the function of 'replace' is the other way around than what is explained in the documentation.
The documentation reads
"replace : bool, default False
Sample with or without replacement."
Whereas in reality it should be
"replace : bool, default False
Sample without or with replacement."
False --> without replacement
True--> with replacement | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26265/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26265/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26266 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26266/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26266/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26266/events | https://github.com/pandas-dev/pandas/pull/26266 | 439,427,480 | MDExOlB1bGxSZXF1ZXN0Mjc1MjM1MDgw | 26,266 | Clean up Py2 Influence in move.c | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-02T04:58:51Z | 2020-01-16T00:34:06Z | 2019-05-02T12:15:07Z | MEMBER | null | More extension module review / cleanup to get rid of Python2 traces | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26266/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26266/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26266.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26266",
"merged_at": "2019-05-02T12:15:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26266.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26266"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26267 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26267/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26267/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26267/events | https://github.com/pandas-dev/pandas/pull/26267 | 439,650,606 | MDExOlB1bGxSZXF1ZXN0Mjc1NDEwNzk1 | 26,267 | DOC: Add regex example in str.split docstring | {
"avatar_url": "https://avatars.githubusercontent.com/u/6585214?v=4",
"events_url": "https://api.github.com/users/Vandenn/events{/privacy}",
"followers_url": "https://api.github.com/users/Vandenn/followers",
"following_url": "https://api.github.com/users/Vandenn/following{/other_user}",
"gists_url": "https://api.github.com/users/Vandenn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Vandenn",
"id": 6585214,
"login": "Vandenn",
"node_id": "MDQ6VXNlcjY1ODUyMTQ=",
"organizations_url": "https://api.github.com/users/Vandenn/orgs",
"received_events_url": "https://api.github.com/users/Vandenn/received_events",
"repos_url": "https://api.github.com/users/Vandenn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Vandenn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Vandenn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Vandenn"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 6 | 2019-05-02T15:26:25Z | 2019-05-03T06:47:43Z | 2019-05-03T05:50:10Z | CONTRIBUTOR | null | - [x] closes #25296
- [x] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
Adding the regex example in the `str.split()` documentation to make people aware of the need to escape special characters when using regular expressions as the pattern.
Error from docstring validation already exists in master's HEAD with no modifications. No additional error was introduced by the new docstring content.
Output of docstring validation:
```
$ python scripts/validate_docstrings.py pandas.Series.str.split
################################################################################
##################### Docstring (pandas.Series.str.split) #####################
################################################################################
Split strings around given separator/delimiter.
Splits the string in the Series/Index from the beginning,
at the specified delimiter string. Equivalent to :meth:`str.split`.
Parameters
----------
pat : str, optional
String or regular expression to split on.
If not specified, split on whitespace.
n : int, default -1 (all)
Limit number of splits in output.
``None``, 0 and -1 will be interpreted as return all splits.
expand : bool, default False
Expand the splitted strings into separate columns.
* If ``True``, return DataFrame/MultiIndex expanding dimensionality.
* If ``False``, return Series/Index, containing lists of strings.
Returns
-------
Series, Index, DataFrame or MultiIndex
Type matches caller unless ``expand=True`` (see Notes).
See Also
--------
Series.str.split : Split strings around given separator/delimiter.
Series.str.rsplit : Splits string around given separator/delimiter,
starting from the right.
Series.str.join : Join lists contained as elements in the Series/Index
with passed delimiter.
str.split : Standard library version for split.
str.rsplit : Standard library version for rsplit.
Notes
-----
The handling of the `n` keyword depends on the number of found splits:
- If found splits > `n`, make first `n` splits only
- If found splits <= `n`, make all splits
- If for a certain row the number of found splits < `n`,
append `None` for padding up to `n` if ``expand=True``
If using ``expand=True``, Series and Index callers return DataFrame and
MultiIndex objects, respectively.
Examples
--------
>>> s = pd.Series(["this is a regular sentence",
"https://docs.python.org/3/tutorial/index.html", np.nan])
In the default setting, the string is split by whitespace.
>>> s.str.split()
0 [this, is, a, regular, sentence]
1 [https://docs.python.org/3/tutorial/index.html]
2 NaN
dtype: object
Without the `n` parameter, the outputs of `rsplit` and `split`
are identical.
>>> s.str.rsplit()
0 [this, is, a, regular, sentence]
1 [https://docs.python.org/3/tutorial/index.html]
2 NaN
dtype: object
The `n` parameter can be used to limit the number of splits on the
delimiter. The outputs of `split` and `rsplit` are different.
>>> s.str.split(n=2)
0 [this, is, a regular sentence]
1 [https://docs.python.org/3/tutorial/index.html]
2 NaN
dtype: object
>>> s.str.rsplit(n=2)
0 [this is a, regular, sentence]
1 [https://docs.python.org/3/tutorial/index.html]
2 NaN
dtype: object
The `pat` parameter can be used to split by other characters.
>>> s.str.split(pat = "/")
0 [this is a regular sentence]
1 [https:, , docs.python.org, 3, tutorial, index...
2 NaN
dtype: object
When using ``expand=True``, the split elements will expand out into
separate columns. If NaN is present, it is propagated throughout
the columns during the split.
>>> s.str.split(expand=True)
0 1 2 3
0 this is a regular
1 https://docs.python.org/3/tutorial/index.html None None None
2 NaN NaN NaN NaN
4
0 sentence
1 None
2 NaN
For slightly more complex use cases like splitting the html document name
from a url, a combination of parameter settings can be used.
>>> s.str.rsplit("/", n=1, expand=True)
0 1
0 this is a regular sentence None
1 https://docs.python.org/3/tutorial index.html
2 NaN NaN
Remember to escape special characters when explicitly using regular
expressions.
>>> s = pd.Series(["1+1=2", np.nan])
>>> s.str.split("\+|=", expand=True)
0 1 2
0 1 1 2
1 NaN NaN NaN
################################################################################
################################## Validation ##################################
################################################################################
3 Errors found:
Examples do not pass tests
flake8 error: E902 TokenError: EOF in multi-line statement
flake8 error: E999 SyntaxError: invalid syntax
################################################################################
################################### Doctests ###################################
################################################################################
**********************************************************************
Line 50, in pandas.Series.str.split
Failed example:
s = pd.Series(["this is a regular sentence",
Exception raised:
Traceback (most recent call last):
File "/home/evan/anaconda3/envs/pandas/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest pandas.Series.str.split[0]>", line 1
s = pd.Series(["this is a regular sentence",
^
SyntaxError: unexpected EOF while parsing
**********************************************************************
Line 55, in pandas.Series.str.split
Failed example:
s.str.split()
Exception raised:
Traceback (most recent call last):
File "/home/evan/anaconda3/envs/pandas/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest pandas.Series.str.split[1]>", line 1, in <module>
s.str.split()
NameError: name 's' is not defined
**********************************************************************
Line 64, in pandas.Series.str.split
Failed example:
s.str.rsplit()
Exception raised:
Traceback (most recent call last):
File "/home/evan/anaconda3/envs/pandas/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest pandas.Series.str.split[2]>", line 1, in <module>
s.str.rsplit()
NameError: name 's' is not defined
**********************************************************************
Line 73, in pandas.Series.str.split
Failed example:
s.str.split(n=2)
Exception raised:
Traceback (most recent call last):
File "/home/evan/anaconda3/envs/pandas/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest pandas.Series.str.split[3]>", line 1, in <module>
s.str.split(n=2)
NameError: name 's' is not defined
**********************************************************************
Line 79, in pandas.Series.str.split
Failed example:
s.str.rsplit(n=2)
Exception raised:
Traceback (most recent call last):
File "/home/evan/anaconda3/envs/pandas/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest pandas.Series.str.split[4]>", line 1, in <module>
s.str.rsplit(n=2)
NameError: name 's' is not defined
**********************************************************************
Line 87, in pandas.Series.str.split
Failed example:
s.str.split(pat = "/")
Exception raised:
Traceback (most recent call last):
File "/home/evan/anaconda3/envs/pandas/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest pandas.Series.str.split[5]>", line 1, in <module>
s.str.split(pat = "/")
NameError: name 's' is not defined
**********************************************************************
Line 97, in pandas.Series.str.split
Failed example:
s.str.split(expand=True)
Exception raised:
Traceback (most recent call last):
File "/home/evan/anaconda3/envs/pandas/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest pandas.Series.str.split[6]>", line 1, in <module>
s.str.split(expand=True)
NameError: name 's' is not defined
**********************************************************************
Line 110, in pandas.Series.str.split
Failed example:
s.str.rsplit("/", n=1, expand=True)
Exception raised:
Traceback (most recent call last):
File "/home/evan/anaconda3/envs/pandas/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest pandas.Series.str.split[7]>", line 1, in <module>
s.str.rsplit("/", n=1, expand=True)
NameError: name 's' is not defined
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26267/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26267/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26267.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26267",
"merged_at": "2019-05-03T05:50:10Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26267.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26267"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26268 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26268/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26268/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26268/events | https://github.com/pandas-dev/pandas/pull/26268 | 439,728,039 | MDExOlB1bGxSZXF1ZXN0Mjc1NDcxNTg5 | 26,268 | Canonicalize CRAN links | {
"avatar_url": "https://avatars.githubusercontent.com/u/9948149?v=4",
"events_url": "https://api.github.com/users/katrinleinweber/events{/privacy}",
"followers_url": "https://api.github.com/users/katrinleinweber/followers",
"following_url": "https://api.github.com/users/katrinleinweber/following{/other_user}",
"gists_url": "https://api.github.com/users/katrinleinweber/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/katrinleinweber",
"id": 9948149,
"login": "katrinleinweber",
"node_id": "MDQ6VXNlcjk5NDgxNDk=",
"organizations_url": "https://api.github.com/users/katrinleinweber/orgs",
"received_events_url": "https://api.github.com/users/katrinleinweber/received_events",
"repos_url": "https://api.github.com/users/katrinleinweber/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/katrinleinweber/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/katrinleinweber/subscriptions",
"type": "User",
"url": "https://api.github.com/users/katrinleinweber"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-02T18:32:10Z | 2019-05-03T06:26:07Z | 2019-05-02T20:24:07Z | CONTRIBUTOR | null | - [~] closes #xxxx
- [~] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [~] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26268/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26268/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26268.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26268",
"merged_at": "2019-05-02T20:24:07Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26268.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26268"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26269 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26269/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26269/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26269/events | https://github.com/pandas-dev/pandas/issues/26269 | 439,820,194 | MDU6SXNzdWU0Mzk4MjAxOTQ= | 26,269 | DataFrame constructor passing DataFrame for full copying references original DataFrame instead of being its own new object | {
"avatar_url": "https://avatars.githubusercontent.com/u/6676184?v=4",
"events_url": "https://api.github.com/users/mcarlisle/events{/privacy}",
"followers_url": "https://api.github.com/users/mcarlisle/followers",
"following_url": "https://api.github.com/users/mcarlisle/following{/other_user}",
"gists_url": "https://api.github.com/users/mcarlisle/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mcarlisle",
"id": 6676184,
"login": "mcarlisle",
"node_id": "MDQ6VXNlcjY2NzYxODQ=",
"organizations_url": "https://api.github.com/users/mcarlisle/orgs",
"received_events_url": "https://api.github.com/users/mcarlisle/received_events",
"repos_url": "https://api.github.com/users/mcarlisle/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mcarlisle/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mcarlisle/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mcarlisle"
} | [] | closed | false | null | [] | null | 1 | 2019-05-02T22:46:06Z | 2019-05-02T22:54:31Z | 2019-05-02T22:54:30Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
a = pd.DataFrame([[1,2,3,4], [10,20,30,40]])
b = pd.DataFrame(a)
a.loc[0,2] = 888
print(b) # this... should not have 888 in it.
a is b # yields False, which does not appear to be the case
```
#### Problem description
I hope we all agree that the constructor should copy the data and structure of the DataFrame a into a new DataFrame called b.
#### Expected Output
It is expected that b.loc[0,2] != 888 and b.loc[0,2] == 3.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Darwin
OS-release: 18.2.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26269/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26269/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26270 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26270/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26270/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26270/events | https://github.com/pandas-dev/pandas/pull/26270 | 439,837,455 | MDExOlB1bGxSZXF1ZXN0Mjc1NTU5MzE4 | 26,270 | Python2 String Handling Cleanup in parsers.pyx | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "5319e7",
"default": false,
"description": "read_csv, to_csv",
"id": 47229171,
"name": "IO CSV",
"node_id": "MDU6TGFiZWw0NzIyOTE3MQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20CSV"
},
{
"color": "207de5",
"default": false,
"descriptio... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-03T00:07:27Z | 2020-01-16T00:34:06Z | 2019-05-03T13:23:36Z | MEMBER | null | Just removing some old Py2 cruft hanging around in parsers.pyx | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26270/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26270/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26270.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26270",
"merged_at": "2019-05-03T13:23:36Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26270.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26270"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26271 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26271/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26271/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26271/events | https://github.com/pandas-dev/pandas/issues/26271 | 439,876,890 | MDU6SXNzdWU0Mzk4NzY4OTA= | 26,271 | read_csv() breaks if passing `encoding` and characters 0x1C - 0x1E appear | {
"avatar_url": "https://avatars.githubusercontent.com/u/620513?v=4",
"events_url": "https://api.github.com/users/dargueta/events{/privacy}",
"followers_url": "https://api.github.com/users/dargueta/followers",
"following_url": "https://api.github.com/users/dargueta/following{/other_user}",
"gists_url": "https://api.github.com/users/dargueta/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dargueta",
"id": 620513,
"login": "dargueta",
"node_id": "MDQ6VXNlcjYyMDUxMw==",
"organizations_url": "https://api.github.com/users/dargueta/orgs",
"received_events_url": "https://api.github.com/users/dargueta/received_events",
"repos_url": "https://api.github.com/users/dargueta/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dargueta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dargueta/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dargueta"
} | [] | closed | false | null | [] | null | 1 | 2019-05-03T04:00:49Z | 2019-05-03T04:09:59Z | 2019-05-03T04:08:04Z | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```python
import io
import pandas as pd
stream = io.BytesIO(b'col_1,col_2,col_3\nfoo,bar,baz\nabc,de\x1cfg,hijk\n')
df = pd.read_csv(stream, engine='python', encoding='ascii')
```
Using `engine='c'` produces the expected output (my terminal renders 0x1C as a line break)
```
>>> pd.read_csv(stream, engine='c', encoding='ascii', na_filter=False)
col_1 col_2 col_3
0 foo bar baz
1 abc de
fg hijk
```
However, using the Python engine breaks it:
```
>>> pd.read_csv(stream, engine='python', encoding='ascii', na_filter=False)
col_1 col_2 col_3
0 foo bar baz
1 abc de
None
2 fg hijk None
```
Notice that there's an extra row and also some nulls, even though I explicitly set `na_filter` to `False`. (Also -- shouldn't those be NaN and not None?) Similar problems occur with the characters 1D and 1E.
#### Problem description
It appears that the control codes 0x1C, 0x1D, and 0x1E cause the Python engine to think the line has ended and treat the first character after the control character as the beginning of the next line, filling in the "missing" columns in the truncated row with `None` instead of `NaN`.
The reason why I'm using a `BytesIO` for the example is because my code is handed a `GzipFile` object, a binary stream. Python 2 doesn't support text mode for gzip archives. Theoretically I should wrap the stream in a [`TextIOWrapper`](https://docs.python.org/2/library/io.html#io.TextIOWrapper) before using it but I can't due to [this bug](https://bugs.python.org/issue33361) in *all* versions of Python, and we need to use both `readline()` and `seek` before reading the file. We also have to pass `encoding` because some CSVs are in ISO-8859-1 and we can't just pretend everything's ASCII.
#### Expected Output
Control codes should not be treated specially, and `read_csv()` should behave identically regardless of the engine being used.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.15.final.0
python-bits: 64
OS: Darwin
OS-release: 17.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.24.2
pytest: 4.3.1
pip: 19.0.3
setuptools: 41.0.1
Cython: 0.29.5
numpy: 1.16.3
scipy: 1.1.0
pyarrow: 0.10.0
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: 2.5.14
xlrd: 1.1.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: 1.0.15
pymysql: None
psycopg2: 2.7.3.2 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: 0.1.6
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: 0.2.1
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26271/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26271/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26272 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26272/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26272/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26272/events | https://github.com/pandas-dev/pandas/pull/26272 | 439,880,651 | MDExOlB1bGxSZXF1ZXN0Mjc1NTg4MTkx | 26,272 | WIP: Maintain Int64 Precision on Construction | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "6138b5",
"default": false,
"description": "Extending pandas with custom dtypes or arrays.",
"id": 849023693,
"name": "ExtensionArray",
"node_id": "MDU6TGFiZWw4NDkwMjM2OTM=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray"
}
] | closed | false | null | [] | null | 6 | 2019-05-03T04:22:50Z | 2020-01-16T00:34:05Z | 2019-07-11T14:37:12Z | MEMBER | null | - [X] closes #26259
- [X] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
This is not the final implementation but providing for discussion and feedback. Consideration points are:
- `_from_sequence_of_strings` was hacked to just return an IntervalArray, which isn't correct. Do we want to potentially pass through a mask to `_from_sequence` -> `integer_array` -> `IntegerArray()` instead? I think there is also a bug when construction the DataFrame correctly which this might fix
- I'm not super familiar with the IntervalArray tests just yet, but I think I need to add a construction test in `arrays.test_integer` which may either supplement or replace the CSV test herein
- There appears to be a bug with `tm.assert_frame_equal` and large integers where precision could be lost. This probably applies to all of the `tm.assert_*_equal` functions | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26272/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26272/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26272.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26272",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26272.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26272"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26273 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26273/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26273/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26273/events | https://github.com/pandas-dev/pandas/pull/26273 | 439,908,244 | MDExOlB1bGxSZXF1ZXN0Mjc1NjA1OTY4 | 26,273 | DOC, CI: Correct wide_to_long docstring and add reshape/melt to CI | {
"avatar_url": "https://avatars.githubusercontent.com/u/6585214?v=4",
"events_url": "https://api.github.com/users/Vandenn/events{/privacy}",
"followers_url": "https://api.github.com/users/Vandenn/followers",
"following_url": "https://api.github.com/users/Vandenn/following{/other_user}",
"gists_url": "https://api.github.com/users/Vandenn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Vandenn",
"id": 6585214,
"login": "Vandenn",
"node_id": "MDQ6VXNlcjY1ODUyMTQ=",
"organizations_url": "https://api.github.com/users/Vandenn/orgs",
"received_events_url": "https://api.github.com/users/Vandenn/received_events",
"repos_url": "https://api.github.com/users/Vandenn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Vandenn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Vandenn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Vandenn"
} | [
{
"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": "eb6420",
"default": false,
"description": "Code style, linting, ... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-05-03T06:41:29Z | 2019-05-03T14:57:26Z | 2019-05-03T14:52:15Z | CONTRIBUTOR | null | - [x] closes #25733
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
Fix the erroneous example in the wide_to_long docstring (non-integer suffixes portion)
Update code_checks to include reshape/melt.py
Edits based on the PR made by `sanjusci` (#26010)
Docstring validation shows errors that are already present from HEAD. Changes made to the docstring did not introduce any new errors.
**Edit:** Update validation based on latest commit.
```
$ python scripts/validate_docstrings.py pandas.wide_to_long
################################################################################
####################### Docstring (pandas.wide_to_long) #######################
################################################################################
Wide panel to long format. Less flexible but more user-friendly than melt.
With stubnames ['A', 'B'], this function expects to find one or more
group of columns with format
A-suffix1, A-suffix2,..., B-suffix1, B-suffix2,...
You specify what you want to call this suffix in the resulting long format
with `j` (for example `j='year'`)
Each row of these wide variables are assumed to be uniquely identified by
`i` (can be a single column name or a list of column names)
All remaining variables in the data frame are left intact.
Parameters
----------
df : DataFrame
The wide-format DataFrame
stubnames : str or list-like
The stub name(s). The wide format variables are assumed to
start with the stub names.
i : str or list-like
Column(s) to use as id variable(s)
j : str
The name of the sub-observation variable. What you wish to name your
suffix in the long format.
sep : str, default ""
A character indicating the separation of the variable names
in the wide format, to be stripped from the names in the long format.
For example, if your column names are A-suffix1, A-suffix2, you
can strip the hyphen by specifying `sep='-'`
.. versionadded:: 0.20.0
suffix : str, default '\\d+'
A regular expression capturing the wanted suffixes. '\\d+' captures
numeric suffixes. Suffixes with no numbers could be specified with the
negated character class '\\D+'. You can also further disambiguate
suffixes, for example, if your wide variables are of the form
A-one, B-two,.., and you have an unrelated column A-rating, you can
ignore the last one by specifying `suffix='(!?one|two)'`
.. versionadded:: 0.20.0
.. versionchanged:: 0.23.0
When all suffixes are numeric, they are cast to int64/float64.
Returns
-------
DataFrame
A DataFrame that contains each stub name as a variable, with new index
(i, j).
Notes
-----
All extra variables are left untouched. This simply uses
`pandas.melt` under the hood, but is hard-coded to "do the right thing"
in a typical case.
Examples
--------
>>> np.random.seed(123)
>>> df = pd.DataFrame({"A1970" : {0 : "a", 1 : "b", 2 : "c"},
... "A1980" : {0 : "d", 1 : "e", 2 : "f"},
... "B1970" : {0 : 2.5, 1 : 1.2, 2 : .7},
... "B1980" : {0 : 3.2, 1 : 1.3, 2 : .1},
... "X" : dict(zip(range(3), np.random.randn(3)))
... })
>>> df["id"] = df.index
>>> df
A1970 A1980 B1970 B1980 X id
0 a d 2.5 3.2 -1.085631 0
1 b e 1.2 1.3 0.997345 1
2 c f 0.7 0.1 0.282978 2
>>> pd.wide_to_long(df, ["A", "B"], i="id", j="year")
... # doctest: +NORMALIZE_WHITESPACE
X A B
id year
0 1970 -1.085631 a 2.5
1 1970 0.997345 b 1.2
2 1970 0.282978 c 0.7
0 1980 -1.085631 d 3.2
1 1980 0.997345 e 1.3
2 1980 0.282978 f 0.1
With multiple id columns
>>> df = pd.DataFrame({
... 'famid': [1, 1, 1, 2, 2, 2, 3, 3, 3],
... 'birth': [1, 2, 3, 1, 2, 3, 1, 2, 3],
... 'ht1': [2.8, 2.9, 2.2, 2, 1.8, 1.9, 2.2, 2.3, 2.1],
... 'ht2': [3.4, 3.8, 2.9, 3.2, 2.8, 2.4, 3.3, 3.4, 2.9]
... })
>>> df
famid birth ht1 ht2
0 1 1 2.8 3.4
1 1 2 2.9 3.8
2 1 3 2.2 2.9
3 2 1 2.0 3.2
4 2 2 1.8 2.8
5 2 3 1.9 2.4
6 3 1 2.2 3.3
7 3 2 2.3 3.4
8 3 3 2.1 2.9
>>> l = pd.wide_to_long(df, stubnames='ht', i=['famid', 'birth'], j='age')
>>> l
... # doctest: +NORMALIZE_WHITESPACE
ht
famid birth age
1 1 1 2.8
2 3.4
2 1 2.9
2 3.8
3 1 2.2
2 2.9
2 1 1 2.0
2 3.2
2 1 1.8
2 2.8
3 1 1.9
2 2.4
3 1 1 2.2
2 3.3
2 1 2.3
2 3.4
3 1 2.1
2 2.9
Going from long back to wide just takes some creative use of `unstack`
>>> w = l.unstack()
>>> w.columns = w.columns.map('{0[0]}{0[1]}'.format)
>>> w.reset_index()
famid birth ht1 ht2
0 1 1 2.8 3.4
1 1 2 2.9 3.8
2 1 3 2.2 2.9
3 2 1 2.0 3.2
4 2 2 1.8 2.8
5 2 3 1.9 2.4
6 3 1 2.2 3.3
7 3 2 2.3 3.4
8 3 3 2.1 2.9
Less wieldy column names are also handled
>>> np.random.seed(0)
>>> df = pd.DataFrame({'A(weekly)-2010': np.random.rand(3),
... 'A(weekly)-2011': np.random.rand(3),
... 'B(weekly)-2010': np.random.rand(3),
... 'B(weekly)-2011': np.random.rand(3),
... 'X' : np.random.randint(3, size=3)})
>>> df['id'] = df.index
>>> df # doctest: +NORMALIZE_WHITESPACE, +ELLIPSIS
A(weekly)-2010 A(weekly)-2011 B(weekly)-2010 B(weekly)-2011 X id
0 0.548814 0.544883 0.437587 0.383442 0 0
1 0.715189 0.423655 0.891773 0.791725 1 1
2 0.602763 0.645894 0.963663 0.528895 1 2
>>> pd.wide_to_long(df, ['A(weekly)', 'B(weekly)'], i='id',
... j='year', sep='-')
... # doctest: +NORMALIZE_WHITESPACE
X A(weekly) B(weekly)
id year
0 2010 0 0.548814 0.437587
1 2010 1 0.715189 0.891773
2 2010 1 0.602763 0.963663
0 2011 0 0.544883 0.383442
1 2011 1 0.423655 0.791725
2 2011 1 0.645894 0.528895
If we have many columns, we could also use a regex to find our
stubnames and pass that list on to wide_to_long
>>> stubnames = sorted(
... set([match[0] for match in df.columns.str.findall(
... r'[A-B]\(.*\)').values if match != [] ])
... )
>>> list(stubnames)
['A(weekly)', 'B(weekly)']
All of the above examples have integers as suffixes. It is possible to
have non-integers as suffixes.
>>> df = pd.DataFrame({
... 'famid': [1, 1, 1, 2, 2, 2, 3, 3, 3],
... 'birth': [1, 2, 3, 1, 2, 3, 1, 2, 3],
... 'ht_one': [2.8, 2.9, 2.2, 2, 1.8, 1.9, 2.2, 2.3, 2.1],
... 'ht_two': [3.4, 3.8, 2.9, 3.2, 2.8, 2.4, 3.3, 3.4, 2.9]
... })
>>> df
famid birth ht_one ht_two
0 1 1 2.8 3.4
1 1 2 2.9 3.8
2 1 3 2.2 2.9
3 2 1 2.0 3.2
4 2 2 1.8 2.8
5 2 3 1.9 2.4
6 3 1 2.2 3.3
7 3 2 2.3 3.4
8 3 3 2.1 2.9
>>> l = pd.wide_to_long(df, stubnames='ht', i=['famid', 'birth'], j='age',
... sep='_', suffix='\w+')
>>> l
... # doctest: +NORMALIZE_WHITESPACE
ht
famid birth age
1 1 one 2.8
two 3.4
2 one 2.9
two 3.8
3 one 2.2
two 2.9
2 1 one 2.0
two 3.2
2 one 1.8
two 2.8
3 one 1.9
two 2.4
3 1 one 2.2
two 3.3
2 one 2.3
two 3.4
3 one 2.1
two 2.9
################################################################################
################################## Validation ##################################
################################################################################
11 Errors found:
Parameter "df" description should finish with "."
Parameter "i" description should finish with "."
Parameter "sep" description should finish with "."
Parameter "suffix" description should finish with "."
flake8 error: C403 Unnecessary list comprehension - rewrite as a set comprehension.
flake8 error: E124 closing bracket does not match visual indentation
flake8 error: E202 whitespace before ']'
flake8 error: E203 whitespace before ':' (18 times)
flake8 error: E261 at least two spaces before inline comment
flake8 error: E741 ambiguous variable name 'l' (2 times)
flake8 error: W605 invalid escape sequence '\w'
1 Warnings found:
See Also section not found
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26273/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26273/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26273.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26273",
"merged_at": "2019-05-03T14:52:15Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26273.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26273"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26274 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26274/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26274/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26274/events | https://github.com/pandas-dev/pandas/issues/26274 | 439,922,401 | MDU6SXNzdWU0Mzk5MjI0MDE= | 26,274 | Naming a Coulumn "name" leads to unexpected behaviour | {
"avatar_url": "https://avatars.githubusercontent.com/u/47354890?v=4",
"events_url": "https://api.github.com/users/marhofmann/events{/privacy}",
"followers_url": "https://api.github.com/users/marhofmann/followers",
"following_url": "https://api.github.com/users/marhofmann/following{/other_user}",
"gists_url": "https://api.github.com/users/marhofmann/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/marhofmann",
"id": 47354890,
"login": "marhofmann",
"node_id": "MDQ6VXNlcjQ3MzU0ODkw",
"organizations_url": "https://api.github.com/users/marhofmann/orgs",
"received_events_url": "https://api.github.com/users/marhofmann/received_events",
"repos_url": "https://api.github.com/users/marhofmann/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/marhofmann/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marhofmann/subscriptions",
"type": "User",
"url": "https://api.github.com/users/marhofmann"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 3 | 2019-05-03T07:30:26Z | 2019-05-03T17:35:24Z | 2019-05-03T17:35:24Z | NONE | null | The "name" column returns the index of the series
```
import pandas as pd
animals = ["name", "animal", "date_of_birth"]
frame = pd.DataFrame(columns=animals)
frame.loc[len(frame)] = ["Rita"]+["Elephant"]+["02.03.2008"]
frame.loc[len(frame)] = ["Alfred"]+["Mouse"]+["03.02.2018"]
for index, row in frame.iterrows():
print("Animal: " + str(row.animal))
print("Date of birth: " + str(row.date_of_birth))
print("Name: " + str(row.name))
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26274/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26274/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26275 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26275/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26275/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26275/events | https://github.com/pandas-dev/pandas/issues/26275 | 439,937,202 | MDU6SXNzdWU0Mzk5MzcyMDI= | 26,275 | Links on resample documentation page are broken | {
"avatar_url": "https://avatars.githubusercontent.com/u/22575361?v=4",
"events_url": "https://api.github.com/users/larsrinn/events{/privacy}",
"followers_url": "https://api.github.com/users/larsrinn/followers",
"following_url": "https://api.github.com/users/larsrinn/following{/other_user}",
"gists_url": "https://api.github.com/users/larsrinn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/larsrinn",
"id": 22575361,
"login": "larsrinn",
"node_id": "MDQ6VXNlcjIyNTc1MzYx",
"organizations_url": "https://api.github.com/users/larsrinn/orgs",
"received_events_url": "https://api.github.com/users/larsrinn/received_events",
"repos_url": "https://api.github.com/users/larsrinn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/larsrinn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/larsrinn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/larsrinn"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "0e8a16",
"default": true,
"description": null,
"id": 7171206... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 1 | 2019-05-03T08:17:52Z | 2019-05-09T12:37:08Z | 2019-05-09T12:37:08Z | NONE | null | I meant to open an issue about inconsistent behaviour of resampling for sub- and super-daily intervals. When I was almost done, I discovered it's already been reported/discussed #9586
Figuring all of this out myself wasted a couple of hours, that could have been saved by a clearer documentation on the `resample` page: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.resample.html
Some things to change here:
* The links under *Notes* are "broken" in a sense that the headers on the page they link to seem to be non-existing anymore. I guess the link labeled *this link* should go here: http://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#dateoffset-objects I'm unsure to which header *user guide* should link to.
* The docstring for the `rule` parameter is confusing. It's type annotation says it's supposed to be a `str` but the description is *The offset string or object representing target conversion.* What kind of object can it be if not a string? And shouldn't this be in the type annotation then? Is it possible to link to some more information on this directly from the description of the parameter so it becomes immediately clear what the options are? | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26275/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26275/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26276 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26276/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26276/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26276/events | https://github.com/pandas-dev/pandas/issues/26276 | 440,012,591 | MDU6SXNzdWU0NDAwMTI1OTE= | 26,276 | Dataframe.to_csv treats decimal.Decimal as string instead of numeric type and the 'decimal' sign parameter has no effect | {
"avatar_url": "https://avatars.githubusercontent.com/u/358046?v=4",
"events_url": "https://api.github.com/users/3f0c4/events{/privacy}",
"followers_url": "https://api.github.com/users/3f0c4/followers",
"following_url": "https://api.github.com/users/3f0c4/following{/other_user}",
"gists_url": "https://api.github.com/users/3f0c4/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/3f0c4",
"id": 358046,
"login": "3f0c4",
"node_id": "MDQ6VXNlcjM1ODA0Ng==",
"organizations_url": "https://api.github.com/users/3f0c4/orgs",
"received_events_url": "https://api.github.com/users/3f0c4/received_events",
"repos_url": "https://api.github.com/users/3f0c4/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/3f0c4/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/3f0c4/subscriptions",
"type": "User",
"url": "https://api.github.com/users/3f0c4"
} | [
{
"color": "0052cc",
"default": false,
"description": null,
"id": 34444536,
"name": "Usage Question",
"node_id": "MDU6TGFiZWwzNDQ0NDUzNg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Usage%20Question"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 2 | 2019-05-03T11:55:33Z | 2019-05-06T10:11:07Z | 2019-05-05T18:31:38Z | NONE | null | #### Code Sample
(float output is prepared for the sake of comparison to Decimal)
```python
# ----------------------------------
### imports
import pandas as pd
import decimal as dc
# ----------------------------------
### definitions
value_str = '2.445'
# ----------------------------------
### instantiations
#df_float = pd.DataFrame(data=[float(value_str)])
df_decimal = pd.DataFrame(data=[dc.Decimal(value_str)])
# ----------------------------------
### exports
# csv
#df_float.to_csv('float' + '.csv', sep=';', decimal=',')
df_decimal.to_csv('decimal' + '.csv', sep=';', decimal=',')
```
#### Observed Output
;0
0;2.445
#### Expected Output
;0
0;2,445
#### Problem description
Since Decimal represents a numeric type, one would expect that it gets treated as such and 'decimal' character replacement is applied, just like with floats.
Float values are converted to string followed by replacement of the default decimal sign '.' by the 'decimal' function parameter value ','.
Decimals are just treated as text, the replacement does not take place.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.5.final.0
python-bits: 64
OS: Windows
OS-release: 2012ServerR2
machine: AMD64
processor: Intel64 Family 6 Model 79 Stepping 0, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.2
pytest: None
pip: 10.0.1
setuptools: 39.1.0
Cython: None
numpy: 1.16.2
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.2
pytz: 2018.4
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: 2.6.2
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26276/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26276/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26277 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26277/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26277/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26277/events | https://github.com/pandas-dev/pandas/issues/26277 | 440,026,531 | MDU6SXNzdWU0NDAwMjY1MzE= | 26,277 | Dataframe.to_excel treats decimal.Decimal as string instead of numeric type, the data in the Excel cell is formatted as a string, not a number | {
"avatar_url": "https://avatars.githubusercontent.com/u/358046?v=4",
"events_url": "https://api.github.com/users/3f0c4/events{/privacy}",
"followers_url": "https://api.github.com/users/3f0c4/followers",
"following_url": "https://api.github.com/users/3f0c4/following{/other_user}",
"gists_url": "https://api.github.com/users/3f0c4/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/3f0c4",
"id": 358046,
"login": "3f0c4",
"node_id": "MDQ6VXNlcjM1ODA0Ng==",
"organizations_url": "https://api.github.com/users/3f0c4/orgs",
"received_events_url": "https://api.github.com/users/3f0c4/received_events",
"repos_url": "https://api.github.com/users/3f0c4/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/3f0c4/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/3f0c4/subscriptions",
"type": "User",
"url": "https://api.github.com/users/3f0c4"
} | [
{
"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, ... | closed | false | null | [] | null | 2 | 2019-05-03T12:37:20Z | 2019-05-06T17:36:44Z | 2019-05-06T17:35:45Z | NONE | null |
#### Code Sample
(float output is prepared for the sake of comparison to Decimal)
```python
# ----------------------------------
### imports
import pandas as pd
import decimal as dc
# ----------------------------------
### definitions
value_str = '2.445'
# ----------------------------------
### instantiations
#df_float = pd.DataFrame(data=[float(value_str)])
df_decimal = pd.DataFrame(data=[dc.Decimal(value_str)])
# ----------------------------------
### exports
# excel
#df_float.to_excel('float' + '.xlsx')
df_decimal.to_excel('decimal' + '.xlsx')
```
#### Observed Output
(settings : German locale, decimal sign is ',')
```
0
0 2.445
```
result and Excel warning : number formatted as string
#### Expected Output
(settings : German locale, decimal sign is ',')
```
0
0 2,445
```
#### Problem description
Since Decimal represents a numeric type, one would expect that it gets treated as such, just like floats.
The exported value in the Excel cell should be a number, not a string.
Presumably, the openpyxl Cell type should get set to 'n'.
Seemingly, openpyxl is able to handle decimals and knows a numeric Cell type 'n' but pandas deliberately sets string/non-numeric type as the openpyxl Cell type when a Decimal value is set.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.5.final.0
python-bits: 64
OS: Windows
OS-release: 2012ServerR2
machine: AMD64
processor: Intel64 Family 6 Model 79 Stepping 0, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.2
pytest: None
pip: 10.0.1
setuptools: 39.1.0
Cython: None
numpy: 1.16.2
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.2
pytz: 2018.4
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: 2.6.2
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26277/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26277/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26278 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26278/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26278/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26278/events | https://github.com/pandas-dev/pandas/issues/26278 | 440,151,367 | MDU6SXNzdWU0NDAxNTEzNjc= | 26,278 | Feature request: easier digit format in to_latex() | {
"avatar_url": "https://avatars.githubusercontent.com/u/44469195?v=4",
"events_url": "https://api.github.com/users/kolibril13/events{/privacy}",
"followers_url": "https://api.github.com/users/kolibril13/followers",
"following_url": "https://api.github.com/users/kolibril13/following{/other_user}",
"gists_url": "https://api.github.com/users/kolibril13/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kolibril13",
"id": 44469195,
"login": "kolibril13",
"node_id": "MDQ6VXNlcjQ0NDY5MTk1",
"organizations_url": "https://api.github.com/users/kolibril13/orgs",
"received_events_url": "https://api.github.com/users/kolibril13/received_events",
"repos_url": "https://api.github.com/users/kolibril13/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kolibril13/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kolibril13/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kolibril13"
} | [
{
"color": "4E9A06",
"default": false,
"description": null,
"id": 76812,
"name": "Enhancement",
"node_id": "MDU6TGFiZWw3NjgxMg==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Enhancement"
},
{
"color": "006b75",
"default": false,
"description": "to_latex... | 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"
} | 3 | 2019-05-03T17:45:39Z | 2021-05-24T13:44:05Z | 2021-05-24T13:44:05Z | NONE | null | #### Easier digit format
It is possible to change the digit format for the columns in a latex table like this
```python
import pandas as pd
data = [[1,2,3],
[4,5,6],
[7,8,9.001]]
df = pd.DataFrame(data, columns=['a', 'b', 'c'], index = ["foo", "bar" , "ho"])
cm0 =lambda x:'%1i' %x
cm1 =lambda x:'%1.1f' %x
cm3= lambda x:'%1.3f' %x
format= [cm0, cm1, cm3]
latex_tab = df.to_latex( formatters= format)
print(latex_tab)
```
#### However it is really inconvenient to define everytime a new lambda function. It would be great if there would be the option:
```python
latex_tab = df.to_latex( data, formatters_col= ['%1i','%1.1f','%1.3f'])
```
Furthermore, changing the digits for one row is even more difficult. It would be great to have also the option
```python
latex_tab = df.to_latex( data, formatters_index= ['%1i','%1.1f','%1.3f'])
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26278/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26278/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26279 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26279/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26279/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26279/events | https://github.com/pandas-dev/pandas/pull/26279 | 440,177,751 | MDExOlB1bGxSZXF1ZXN0Mjc1ODE1NjU1 | 26,279 | CLN: Remove compat.re_type | {
"avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4",
"events_url": "https://api.github.com/users/topper-123/events{/privacy}",
"followers_url": "https://api.github.com/users/topper-123/followers",
"following_url": "https://api.github.com/users/topper-123/following{/other_user}",
"gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/topper-123",
"id": 26364415,
"login": "topper-123",
"node_id": "MDQ6VXNlcjI2MzY0NDE1",
"organizations_url": "https://api.github.com/users/topper-123/orgs",
"received_events_url": "https://api.github.com/users/topper-123/received_events",
"repos_url": "https://api.github.com/users/topper-123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/topper-123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/topper-123"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-03T18:58:07Z | 2019-05-05T05:50:46Z | 2019-05-05T04:17:40Z | CONTRIBUTOR | null | - [ ] xref #25725 and #26252
This removes ``compat.re_type`` from the code base. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26279/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26279/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26279.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26279",
"merged_at": "2019-05-05T04:17:40Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26279.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26279"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26280 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26280/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26280/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26280/events | https://github.com/pandas-dev/pandas/pull/26280 | 440,274,429 | MDExOlB1bGxSZXF1ZXN0Mjc1ODg5MjA4 | 26,280 | Remove pandas.core.index.datetimelike from MyPy Blacklist | {
"avatar_url": "https://avatars.githubusercontent.com/u/14367887?v=4",
"events_url": "https://api.github.com/users/makbigc/events{/privacy}",
"followers_url": "https://api.github.com/users/makbigc/followers",
"following_url": "https://api.github.com/users/makbigc/following{/other_user}",
"gists_url": "https://api.github.com/users/makbigc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makbigc",
"id": 14367887,
"login": "makbigc",
"node_id": "MDQ6VXNlcjE0MzY3ODg3",
"organizations_url": "https://api.github.com/users/makbigc/orgs",
"received_events_url": "https://api.github.com/users/makbigc/received_events",
"repos_url": "https://api.github.com/users/makbigc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makbigc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makbigc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makbigc"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 15 | 2019-05-04T02:11:32Z | 2019-06-25T12:34:45Z | 2019-06-25T12:34:27Z | CONTRIBUTOR | null | - [x] closes #25882
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26280/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26280/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26280.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26280",
"merged_at": "2019-06-25T12:34:26Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26280.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26280"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26281 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26281/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26281/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26281/events | https://github.com/pandas-dev/pandas/pull/26281 | 440,294,948 | MDExOlB1bGxSZXF1ZXN0Mjc1OTAyOTYz | 26,281 | CLN: remove uses of compat.lrange, part I | {
"avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4",
"events_url": "https://api.github.com/users/topper-123/events{/privacy}",
"followers_url": "https://api.github.com/users/topper-123/followers",
"following_url": "https://api.github.com/users/topper-123/following{/other_user}",
"gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/topper-123",
"id": 26364415,
"login": "topper-123",
"node_id": "MDQ6VXNlcjI2MzY0NDE1",
"organizations_url": "https://api.github.com/users/topper-123/orgs",
"received_events_url": "https://api.github.com/users/topper-123/received_events",
"repos_url": "https://api.github.com/users/topper-123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/topper-123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/topper-123"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-05-04T07:29:26Z | 2019-05-05T18:30:49Z | 2019-05-05T17:34:19Z | CONTRIBUTOR | null | - [ ] xref #25725
This PR starts the removal of ``compat.lrange`` from the code base. This removal requires some attention, as in most cases a plain ``range(...)`` should be used, but in some cases a ``list(range(...))`` needs to be used.
``lrange`` is used quite a lot, so there will be 1 or 2 more PRs, before this is removal is completed. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26281/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26281/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26281.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26281",
"merged_at": "2019-05-05T17:34:19Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26281.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26281"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26282 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26282/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26282/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26282/events | https://github.com/pandas-dev/pandas/pull/26282 | 440,344,877 | MDExOlB1bGxSZXF1ZXN0Mjc1OTM0MjUz | 26,282 | BUG: Fix #26210: MultiIndex Sorting with NaNs | {
"avatar_url": "https://avatars.githubusercontent.com/u/9717992?v=4",
"events_url": "https://api.github.com/users/eoincondron/events{/privacy}",
"followers_url": "https://api.github.com/users/eoincondron/followers",
"following_url": "https://api.github.com/users/eoincondron/following{/other_user}",
"gists_url": "https://api.github.com/users/eoincondron/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eoincondron",
"id": 9717992,
"login": "eoincondron",
"node_id": "MDQ6VXNlcjk3MTc5OTI=",
"organizations_url": "https://api.github.com/users/eoincondron/orgs",
"received_events_url": "https://api.github.com/users/eoincondron/received_events",
"repos_url": "https://api.github.com/users/eoincondron/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eoincondron/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eoincondron/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eoincondron"
} | [
{
"color": "d7e102",
"default": false,
"description": "np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate",
"id": 2822342,
"name": "Missing-data",
"node_id": "MDU6TGFiZWwyODIyMzQy",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Missing-data"
},
{
"color": "207de5"... | closed | false | null | [] | null | 6 | 2019-05-04T16:56:26Z | 2019-06-27T22:15:54Z | 2019-06-27T22:15:54Z | NONE | null | - [x] closes #xxxx
- [x] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26282/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26282/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26282.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26282",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26282.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26282"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26283 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26283/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26283/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26283/events | https://github.com/pandas-dev/pandas/issues/26283 | 440,432,907 | MDU6SXNzdWU0NDA0MzI5MDc= | 26,283 | BUG: Series.combine_first raises ValueError on mixed-timezone datetime-index | {
"avatar_url": "https://avatars.githubusercontent.com/u/10784275?v=4",
"events_url": "https://api.github.com/users/DomKennedy/events{/privacy}",
"followers_url": "https://api.github.com/users/DomKennedy/followers",
"following_url": "https://api.github.com/users/DomKennedy/following{/other_user}",
"gists_url": "https://api.github.com/users/DomKennedy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DomKennedy",
"id": 10784275,
"login": "DomKennedy",
"node_id": "MDQ6VXNlcjEwNzg0Mjc1",
"organizations_url": "https://api.github.com/users/DomKennedy/orgs",
"received_events_url": "https://api.github.com/users/DomKennedy/received_events",
"repos_url": "https://api.github.com/users/DomKennedy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DomKennedy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DomKennedy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DomKennedy"
} | [
{
"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,
... | open | false | null | [] | null | 2 | 2019-05-05T11:17:51Z | 2020-04-02T04:19:03Z | null | NONE | null | ```python
import pytz
from pandas import Timestamp, Series
uniform_tz = Series({Timestamp("2019-05-01", tz=pytz.UTC): 1})
multi_tz = Series(
{
Timestamp("2019-05-01 01:00:00+0100", tz=pytz.timezone("Europe/London")): 2,
Timestamp("2019-05-02", tz=pytz.UTC): 3,
}
)
multi_tz.combine_first(uniform_tz) # works fine
uniform_tz.combine_first(multi_tz) # raises ValueError
```
#### Problem description
`left.combine_first(right)` unexpectedly raises a `ValueError` if:
* `left` has a timezone-aware datetime index, with the same timezone throughout the index.
* `right` has a timezone-aware datetime index, with a mix of different timezones.
The traceback is as follows:
```
Traceback (most recent call last):
File "~/.venv/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py", line 1861, in objects_to_datetime64ns
values, tz_parsed = conversion.datetime_to_datetime64(data)
File "pandas/_libs/tslibs/conversion.pyx", line 185, in pandas._libs.tslibs.conversion.datetime_to_datetime64
ValueError: Array must be all same time zone
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pandas_test.py", line 57, in <module>
uniform_tz.combine_first(multi_tz) # raises ValueError
File "~/.venv/lib/python3.7/site-packages/pandas/core/series.py", line 2605, in combine_first
new_index = self.index.union(other.index)
File "~/.venv/lib/python3.7/site-packages/pandas/core/indexes/datetimes.py", line 484, in union
other = DatetimeIndex(other)
File "~/.venv/lib/python3.7/site-packages/pandas/core/indexes/datetimes.py", line 303, in __new__
int_as_wall_time=True)
File "~/.venv/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py", line 376, in _from_sequence
ambiguous=ambiguous, int_as_wall_time=int_as_wall_time)
File "~/.venv/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py", line 1757, in sequence_to_dt64ns
data, dayfirst=dayfirst, yearfirst=yearfirst)
File "~/.venv/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py", line 1866, in objects_to_datetime64ns
raise e
File "~/.venv/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py", line 1857, in objects_to_datetime64ns
require_iso8601=require_iso8601
File "pandas/_libs/tslib.pyx", line 460, in pandas._libs.tslib.array_to_datetime
File "pandas/_libs/tslib.pyx", line 537, in pandas._libs.tslib.array_to_datetime
ValueError: Tz-aware datetime.datetime cannot be converted to datetime64 unless utc=True
```
If the same arguments are swapped, i.e. `right.combine_first(left)`, no error is raised, and the output is as expected (timestamps which are equal but in different timezones are identified, with the left argument's timezone propagating into the output).
The error also doesn't occur at all with the same setup on DataFrames.
It doesn't seem to me that there's any semantic reason that the operation should fail, so this appears to be a bug.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.0.final.0
python-bits: 64
OS: Darwin
OS-release: 17.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
pandas: 0.24.2
pytest: 4.3.1
pip: 19.0.3
setuptools: 40.8.0
Cython: None
numpy: 1.16.3
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: 1.3.3
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26283/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26283/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26284 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26284/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26284/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26284/events | https://github.com/pandas-dev/pandas/issues/26284 | 440,458,869 | MDU6SXNzdWU0NDA0NTg4Njk= | 26,284 | json_normalize should raise when record_path doesn't point to an array | {
"avatar_url": "https://avatars.githubusercontent.com/u/4273841?v=4",
"events_url": "https://api.github.com/users/Marky0/events{/privacy}",
"followers_url": "https://api.github.com/users/Marky0/followers",
"following_url": "https://api.github.com/users/Marky0/following{/other_user}",
"gists_url": "https://api.github.com/users/Marky0/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Marky0",
"id": 4273841,
"login": "Marky0",
"node_id": "MDQ6VXNlcjQyNzM4NDE=",
"organizations_url": "https://api.github.com/users/Marky0/orgs",
"received_events_url": "https://api.github.com/users/Marky0/received_events",
"repos_url": "https://api.github.com/users/Marky0/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Marky0/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Marky0/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Marky0"
} | [
{
"color": "ffa0ff",
"default": false,
"description": "Incorrect or improved errors from pandas",
"id": 42670965,
"name": "Error Reporting",
"node_id": "MDU6TGFiZWw0MjY3MDk2NQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting"
},
{
"color": "207d... | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 7 | 2019-05-05T15:46:04Z | 2020-04-16T23:38:21Z | 2020-04-16T23:38:21Z | NONE | null | There seems to be odd behaviour with json_normalize, specifically when json keys are inconsistently formatted.
json_normalize throws a keyword error as summarised in this question
https://stackoverflow.com/questions/55993192/inconsistent-behaviour-from-json-normalize-with-deeply-nested-json-data
Is this the expected behaviour ?
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26284/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26284/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26285 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26285/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26285/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26285/events | https://github.com/pandas-dev/pandas/issues/26285 | 440,462,906 | MDU6SXNzdWU0NDA0NjI5MDY= | 26,285 | dt-accessor fails to extract 'days' from timedelta-series | {
"avatar_url": "https://avatars.githubusercontent.com/u/6208056?v=4",
"events_url": "https://api.github.com/users/stefansimik/events{/privacy}",
"followers_url": "https://api.github.com/users/stefansimik/followers",
"following_url": "https://api.github.com/users/stefansimik/following{/other_user}",
"gists_url": "https://api.github.com/users/stefansimik/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stefansimik",
"id": 6208056,
"login": "stefansimik",
"node_id": "MDQ6VXNlcjYyMDgwNTY=",
"organizations_url": "https://api.github.com/users/stefansimik/orgs",
"received_events_url": "https://api.github.com/users/stefansimik/received_events",
"repos_url": "https://api.github.com/users/stefansimik/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stefansimik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stefansimik/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stefansimik"
} | [
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840,
"name": "Timeseries",
"node_id": "MDU6TGFiZWwyMTE4NDA=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Timeseries"
}
] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 8 | 2019-05-05T16:24:11Z | 2019-05-07T10:20:02Z | 2019-05-07T00:20:20Z | CONTRIBUTOR | null | #### Copy-pastable example
```python
import pandas as pd
import datetime as dt
# Create data
df = pd.DataFrame({'start_date': [dt.date(2019, 3, 31), dt.date(2019, 3, 31)],
'end_date': [dt.date(2019, 3, 31), dt.date(3014, 1, 1)] })
# Calculate duration (timedelta objects)
df['duration'] = df['end_date'] - df['start_date']
# EXAMPLE 1: PROBLEM HERE - THIS FAILS !!!
df['duration_days'] = df['duration'].dt.days
# EXAMPLE 2: This works as a workaround
# df['duration_days'] = df['duration'].apply(lambda x: x.days)
```
#### Problem description
dt-accessor cannot extract `days` value from timedelta-series
and throws exception:
```
AttributeErrorTraceback (most recent call last)
<ipython-input-5-ef0f32d83e8e> in <module>
----> 1 df['duration_days'] = df['duration'].dt.days
D:\data_science\bin\anaconda3\envs\nbo2\lib\site-packages\pandas\core\generic.py in __getattr__(self, name)
5061 if (name in self._internal_names_set or name in self._metadata or
5062 name in self._accessors):
-> 5063 return object.__getattribute__(self, name)
5064 else:
5065 if self._info_axis._can_hold_identifiers_and_holds_name(name):
D:\data_science\bin\anaconda3\envs\nbo2\lib\site-packages\pandas\core\accessor.py in __get__(self, obj, cls)
169 # we're accessing the attribute of the class, i.e., Dataset.geo
170 return self._accessor
--> 171 accessor_obj = self._accessor(obj)
172 # Replace the property with the accessor object. Inspired by:
173 # http://www.pydanny.com/cached-property.html
D:\data_science\bin\anaconda3\envs\nbo2\lib\site-packages\pandas\core\indexes\accessors.py in __new__(cls, data)
322 pass # we raise an attribute error anyway
323
--> 324 raise AttributeError("Can only use .dt accessor with datetimelike "
325 "values")
AttributeError: Can only use .dt accessor with datetimelike values
```
#### Expected Output
dt-accessor should extract `days` value from timedelta-series
without any exceptions.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 79 Stepping 1, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.1
pytest: None
pip: 19.0.1
setuptools: 40.8.0
Cython: None
numpy: 1.15.4
scipy: 1.2.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: None
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26285/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26285/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26286 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26286/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26286/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26286/events | https://github.com/pandas-dev/pandas/pull/26286 | 440,480,271 | MDExOlB1bGxSZXF1ZXN0Mjc2MDE5Nzcy | 26,286 | Update broken link to contributing.rst in contributing.md | {
"avatar_url": "https://avatars.githubusercontent.com/u/10407290?v=4",
"events_url": "https://api.github.com/users/stephenrauch/events{/privacy}",
"followers_url": "https://api.github.com/users/stephenrauch/followers",
"following_url": "https://api.github.com/users/stephenrauch/following{/other_user}",
"gists_url": "https://api.github.com/users/stephenrauch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stephenrauch",
"id": 10407290,
"login": "stephenrauch",
"node_id": "MDQ6VXNlcjEwNDA3Mjkw",
"organizations_url": "https://api.github.com/users/stephenrauch/orgs",
"received_events_url": "https://api.github.com/users/stephenrauch/received_events",
"repos_url": "https://api.github.com/users/stephenrauch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stephenrauch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stephenrauch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stephenrauch"
} | [
{
"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": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-05T19:25:25Z | 2019-05-05T21:19:19Z | 2019-05-05T21:19:15Z | 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/26286/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26286/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26286.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26286",
"merged_at": "2019-05-05T21:19:15Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26286.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26286"
} | |
https://api.github.com/repos/pandas-dev/pandas/issues/26287 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26287/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26287/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26287/events | https://github.com/pandas-dev/pandas/pull/26287 | 440,529,741 | MDExOlB1bGxSZXF1ZXN0Mjc2MDU0MTU5 | 26,287 | Remove Panel References | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 6 | 2019-05-06T03:40:35Z | 2019-05-07T14:53:18Z | 2019-05-07T11:28:00Z | MEMBER | null | progress towards #25632 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26287/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26287/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26287.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26287",
"merged_at": "2019-05-07T11:28:00Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26287.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26287"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26288 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26288/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26288/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26288/events | https://github.com/pandas-dev/pandas/issues/26288 | 440,531,515 | MDU6SXNzdWU0NDA1MzE1MTU= | 26,288 | DataFrame with datetime column cannot concat with non-identical columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/5110107?v=4",
"events_url": "https://api.github.com/users/ruiann/events{/privacy}",
"followers_url": "https://api.github.com/users/ruiann/followers",
"following_url": "https://api.github.com/users/ruiann/following{/other_user}",
"gists_url": "https://api.github.com/users/ruiann/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ruiann",
"id": 5110107,
"login": "ruiann",
"node_id": "MDQ6VXNlcjUxMTAxMDc=",
"organizations_url": "https://api.github.com/users/ruiann/orgs",
"received_events_url": "https://api.github.com/users/ruiann/received_events",
"repos_url": "https://api.github.com/users/ruiann/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ruiann/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ruiann/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ruiann"
} | [
{
"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, ... | open | false | null | [] | null | 9 | 2019-05-06T03:53:30Z | 2020-01-31T16:45:00Z | null | CONTRIBUTOR | null | #### Code Sample, a copy-pastable example if possible
```python
In [12]: df1 = pd.DataFrame({"A": pd.SparseArray(pd.date_range("2000", periods=2)), "B": [1, 2]})
In [13]: df2 = pd.DataFrame({"B": [1, 2]})
In [14]: pd.concat([df1, df2])
```
```pytb
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-14-6197998bc0b3> in <module>
----> 1 pd.concat([df1, df2])
~/sandbox/pandas/pandas/core/reshape/concat.py in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, sort, copy)
253 )
254
--> 255 return op.get_result()
256
257
~/sandbox/pandas/pandas/core/reshape/concat.py in get_result(self)
468
469 new_data = concatenate_block_managers(
--> 470 mgrs_indexers, self.new_axes, concat_axis=self.axis, copy=self.copy
471 )
472 if not self.copy:
~/sandbox/pandas/pandas/core/internals/managers.py in concatenate_block_managers(mgrs_indexers, axes, concat_axis, copy)
1992 else:
1993 b = make_block(
-> 1994 concatenate_join_units(join_units, concat_axis, copy=copy),
1995 placement=placement,
1996 )
~/sandbox/pandas/pandas/core/internals/concat.py in concatenate_join_units(join_units, concat_axis, copy)
262 concat_values = concat_values.copy()
263 else:
--> 264 concat_values = concat_compat(to_concat, axis=concat_axis)
265
266 return concat_values
~/sandbox/pandas/pandas/core/dtypes/concat.py in concat_compat(to_concat, axis)
111
112 elif _contains_datetime or "timedelta" in typs or _contains_period:
--> 113 return concat_datetime(to_concat, axis=axis, typs=typs)
114
115 # these are mandated to handle empties as well
~/sandbox/pandas/pandas/core/dtypes/concat.py in concat_datetime(to_concat, axis, typs)
387 if len(typs) != 1:
388 return _concatenate_2d(
--> 389 [_convert_datetimelike_to_object(x) for x in to_concat], axis=axis
390 )
391
~/sandbox/pandas/pandas/core/dtypes/concat.py in <listcomp>(.0)
387 if len(typs) != 1:
388 return _concatenate_2d(
--> 389 [_convert_datetimelike_to_object(x) for x in to_concat], axis=axis
390 )
391
~/sandbox/pandas/pandas/core/dtypes/concat.py in _convert_datetimelike_to_object(x)
422 else:
423 shape = x.shape
--> 424 x = tslib.ints_to_pydatetime(x.view(np.int64).ravel(), box="timestamp")
425 x = x.reshape(shape)
426
~/sandbox/pandas/pandas/core/arrays/base.py in view(self, dtype)
907 # giving a view with the same dtype as self.
908 if dtype is not None:
--> 909 raise NotImplementedError(dtype)
910 return self[:]
911
NotImplementedError: <class 'numpy.int64'>
``` | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26288/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26288/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26289 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26289/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26289/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26289/events | https://github.com/pandas-dev/pandas/pull/26289 | 440,538,357 | MDExOlB1bGxSZXF1ZXN0Mjc2MDYwNzA2 | 26,289 | CLN: remove compat.lrange, part II | {
"avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4",
"events_url": "https://api.github.com/users/topper-123/events{/privacy}",
"followers_url": "https://api.github.com/users/topper-123/followers",
"following_url": "https://api.github.com/users/topper-123/following{/other_user}",
"gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/topper-123",
"id": 26364415,
"login": "topper-123",
"node_id": "MDQ6VXNlcjI2MzY0NDE1",
"organizations_url": "https://api.github.com/users/topper-123/orgs",
"received_events_url": "https://api.github.com/users/topper-123/received_events",
"repos_url": "https://api.github.com/users/topper-123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/topper-123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/topper-123"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-06T04:44:04Z | 2019-05-07T03:52:33Z | 2019-05-07T00:26:13Z | CONTRIBUTOR | null | - [ ] xref #25725 & #26281
Second part of the removal of ``compat.lrange`` from the code base. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26289/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26289/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26289.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26289",
"merged_at": "2019-05-07T00:26:13Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26289.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26289"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26290 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26290/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26290/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26290/events | https://github.com/pandas-dev/pandas/issues/26290 | 440,554,614 | MDU6SXNzdWU0NDA1NTQ2MTQ= | 26,290 | Pandas UTF-8 handling is rubbish | {
"avatar_url": "https://avatars.githubusercontent.com/u/48542102?v=4",
"events_url": "https://api.github.com/users/james-martin-engineer/events{/privacy}",
"followers_url": "https://api.github.com/users/james-martin-engineer/followers",
"following_url": "https://api.github.com/users/james-martin-engineer/following{/other_user}",
"gists_url": "https://api.github.com/users/james-martin-engineer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/james-martin-engineer",
"id": 48542102,
"login": "james-martin-engineer",
"node_id": "MDQ6VXNlcjQ4NTQyMTAy",
"organizations_url": "https://api.github.com/users/james-martin-engineer/orgs",
"received_events_url": "https://api.github.com/users/james-martin-engineer/received_events",
"repos_url": "https://api.github.com/users/james-martin-engineer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/james-martin-engineer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/james-martin-engineer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/james-martin-engineer"
} | [
{
"color": "207de5",
"default": false,
"description": "Clarification about behavior needed to assess issue",
"id": 307649777,
"name": "Needs Info",
"node_id": "MDU6TGFiZWwzMDc2NDk3Nzc=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Needs%20Info"
}
] | closed | false | null | [] | null | 2 | 2019-05-06T06:21:31Z | 2019-05-10T04:17:18Z | 2019-05-10T04:17:18Z | NONE | null | I'm using Pandas as part of PDFKIT. The UTF-8 Handling in Pandas is abysmal. I've rendered a HTML from a DOC file using Microsoft Word. Word has rendered in some 96 and A0 ASCII characters (a minus and a space respectively) as part of this process (actually, it does it every time). Unfortuantely, Pandas can't handle either of these characters resulting in
`UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0x96 in position 1054: invalid start byte`
`UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0xa0 in position 1054: invalid start byte`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26290/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26290/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26291 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26291/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26291/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26291/events | https://github.com/pandas-dev/pandas/issues/26291 | 440,590,662 | MDU6SXNzdWU0NDA1OTA2NjI= | 26,291 | Old date is saved as a random negative number in Excel file | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost"
} | [
{
"color": "bfe5bf",
"default": false,
"description": "read_excel, to_excel",
"id": 49254273,
"name": "IO Excel",
"node_id": "MDU6TGFiZWw0OTI1NDI3Mw==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/IO%20Excel"
},
{
"color": "207de5",
"default": false,
"de... | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 5 | 2019-05-06T08:21:45Z | 2019-05-07T01:23:45Z | 2019-05-07T01:23:45Z | NONE | null | If a date is very old, and you save the dataframe as an Excel file, pandas will save a random negative number instead of the actual date. This does not happen if you save it in a csv file. I attach the resulting Excel file for completeness.
[test.xlsx](https://github.com/pandas-dev/pandas/files/3147076/test.xlsx)
#### Code Sample, a copy-pastable example if possible
```python
import pandas
import datetime
mydate = datetime.date(1800,10,1)
df = pandas.DataFrame({"Dates":[mydate]})
df.to_excel("test.xlsx", sheet_name="Results", index=False)
```
#### Problem description
It's a problem because the data is not saved correctly. Instead of a date, a reandom negative number is saved.
#### Expected Output
An excel file with the data saved correctly
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here below this line]
>>> pandas.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.1+0.g1700680.dirty
pytest: None
pip: 10.0.1
setuptools: 39.0.1.post20190227
Cython: 0.29.3
numpy: 1.16.1
scipy: 1.2.0
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2018.4
blosc: None
bottleneck: None
tables: None
numexpr: 2.6.8
feather: None
matplotlib: 3.0.1
openpyxl: 2.6.2
xlrd: 1.2.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26291/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26291/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26292 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26292/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26292/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26292/events | https://github.com/pandas-dev/pandas/pull/26292 | 440,668,379 | MDExOlB1bGxSZXF1ZXN0Mjc2MTYxODUx | 26,292 | [BUG] Adding offset with nonzero month to DatetimeIndex (GH26258) | {
"avatar_url": "https://avatars.githubusercontent.com/u/14367887?v=4",
"events_url": "https://api.github.com/users/makbigc/events{/privacy}",
"followers_url": "https://api.github.com/users/makbigc/followers",
"following_url": "https://api.github.com/users/makbigc/following{/other_user}",
"gists_url": "https://api.github.com/users/makbigc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makbigc",
"id": 14367887,
"login": "makbigc",
"node_id": "MDQ6VXNlcjE0MzY3ODg3",
"organizations_url": "https://api.github.com/users/makbigc/orgs",
"received_events_url": "https://api.github.com/users/makbigc/received_events",
"repos_url": "https://api.github.com/users/makbigc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makbigc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makbigc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makbigc"
} | [
{
"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,
... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-06T12:08:38Z | 2019-05-14T05:23:27Z | 2019-05-12T20:51:59Z | CONTRIBUTOR | null | - [x] closes #26258
- [x] 1 test added
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26292/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26292/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26292.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26292",
"merged_at": "2019-05-12T20:51:59Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26292.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26292"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26293 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26293/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26293/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26293/events | https://github.com/pandas-dev/pandas/issues/26293 | 440,728,607 | MDU6SXNzdWU0NDA3Mjg2MDc= | 26,293 | Changes to major/minor locator on a DateTime index leads to messed up axis | {
"avatar_url": "https://avatars.githubusercontent.com/u/1880943?v=4",
"events_url": "https://api.github.com/users/metaswirl/events{/privacy}",
"followers_url": "https://api.github.com/users/metaswirl/followers",
"following_url": "https://api.github.com/users/metaswirl/following{/other_user}",
"gists_url": "https://api.github.com/users/metaswirl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/metaswirl",
"id": 1880943,
"login": "metaswirl",
"node_id": "MDQ6VXNlcjE4ODA5NDM=",
"organizations_url": "https://api.github.com/users/metaswirl/orgs",
"received_events_url": "https://api.github.com/users/metaswirl/received_events",
"repos_url": "https://api.github.com/users/metaswirl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/metaswirl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/metaswirl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/metaswirl"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "AFEEEE",
"default": false,
"description": null,
"id": 211840... | open | false | null | [] | null | 8 | 2019-05-06T14:30:29Z | 2021-07-02T05:43:11Z | null | NONE | null | #### Code Sample
```python
import matplotlib
matplotlib.use('Agg')
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
from matplotlib import pyplot as plt
from datetime import datetime
import pandas
# Creates problems
hours = range(24)
# Works fine
# hours = list(range(12)) + list(range(13, 24))
times = []
for hour in hours:
times.append(datetime(year=2019, month=5, day=6, hour=hour))
df_example = pandas.DataFrame({'column':range(len(times))}, index=times)
f, ax = plt.subplots()
# Works fine
# ax.plot(df_example.index, df_example['column'])
# Creates problems
df_example.plot(ax=ax)
hour_locator = mdates.HourLocator(byhour=range(0, 24, 6))
ax.xaxis.set_minor_formatter(mdates.DateFormatter('%H:%M'))
ax.xaxis.set_minor_locator(hour_locator)
ax.xaxis.set_major_locator(ticker.NullLocator())
ax.xaxis.set_major_formatter(ticker.NullFormatter())
f.savefig('example.png')
```
#### Problem description
I was plotting a DataFrame with a DateTime index and tried to change the major and minor ticks afterwards. I expected an x-axis with ticks every 6-hours. Instead the x-axis became filled with ticks at what I assume to be hourly intervals.
This behavior does not occur, when either matplotlib is used to plot the columns `ax.plot(...)` or when the DateTime index contains gaps. Both cases are shown in the comments above.
The issue appeared both with pandas versions 0.24.1 and 0.24.2.
#### Expected Output

#### Output

| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26293/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26293/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26294 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26294/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26294/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26294/events | https://github.com/pandas-dev/pandas/issues/26294 | 440,781,775 | MDU6SXNzdWU0NDA3ODE3NzU= | 26,294 | Fix type annotations in pandas.core.computation | {
"avatar_url": "https://avatars.githubusercontent.com/u/1430066?v=4",
"events_url": "https://api.github.com/users/gwrome/events{/privacy}",
"followers_url": "https://api.github.com/users/gwrome/followers",
"following_url": "https://api.github.com/users/gwrome/following{/other_user}",
"gists_url": "https://api.github.com/users/gwrome/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gwrome",
"id": 1430066,
"login": "gwrome",
"node_id": "MDQ6VXNlcjE0MzAwNjY=",
"organizations_url": "https://api.github.com/users/gwrome/orgs",
"received_events_url": "https://api.github.com/users/gwrome/received_events",
"repos_url": "https://api.github.com/users/gwrome/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gwrome/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gwrome/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gwrome"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 0 | 2019-05-06T16:29:13Z | 2019-05-08T03:51:26Z | 2019-05-08T03:51:26Z | CONTRIBUTOR | null | Part of #25882
The files in pandas.core.computation have the following errors:
```
pandas/core/computation/ops.py:169: error: Read-only property cannot override read-write property
pandas/core/computation/pytables.py:59: error: Read-only property cannot override read-write property
pandas/core/computation/pytables.py:384: error: Incompatible types in assignment (expression has type "Type[pandas.core.computation.pytables.Constant]", base class "BaseExprVisitor" defined the type as "Type[pandas.core.computation.ops.Constant]")
```
Pull request to follow. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26294/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26294/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26295 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26295/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26295/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26295/events | https://github.com/pandas-dev/pandas/pull/26295 | 440,850,029 | MDExOlB1bGxSZXF1ZXN0Mjc2MzAzOTQ5 | 26,295 | Fix type annotations in pandas.core.computation | {
"avatar_url": "https://avatars.githubusercontent.com/u/1430066?v=4",
"events_url": "https://api.github.com/users/gwrome/events{/privacy}",
"followers_url": "https://api.github.com/users/gwrome/followers",
"following_url": "https://api.github.com/users/gwrome/following{/other_user}",
"gists_url": "https://api.github.com/users/gwrome/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gwrome",
"id": 1430066,
"login": "gwrome",
"node_id": "MDQ6VXNlcjE0MzAwNjY=",
"organizations_url": "https://api.github.com/users/gwrome/orgs",
"received_events_url": "https://api.github.com/users/gwrome/received_events",
"repos_url": "https://api.github.com/users/gwrome/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gwrome/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gwrome/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gwrome"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-06T19:28:32Z | 2019-05-08T12:34:47Z | 2019-05-08T03:51:26Z | CONTRIBUTOR | null | - [X] closes #26294
- [X] tests passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26295/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26295/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26295.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26295",
"merged_at": "2019-05-08T03:51:26Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26295.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26295"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26296 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26296/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26296/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26296/events | https://github.com/pandas-dev/pandas/issues/26296 | 440,873,458 | MDU6SXNzdWU0NDA4NzM0NTg= | 26,296 | Fix type annotations in pandas.core.base | {
"avatar_url": "https://avatars.githubusercontent.com/u/1430066?v=4",
"events_url": "https://api.github.com/users/gwrome/events{/privacy}",
"followers_url": "https://api.github.com/users/gwrome/followers",
"following_url": "https://api.github.com/users/gwrome/following{/other_user}",
"gists_url": "https://api.github.com/users/gwrome/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gwrome",
"id": 1430066,
"login": "gwrome",
"node_id": "MDQ6VXNlcjE0MzAwNjY=",
"organizations_url": "https://api.github.com/users/gwrome/orgs",
"received_events_url": "https://api.github.com/users/gwrome/received_events",
"repos_url": "https://api.github.com/users/gwrome/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gwrome/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gwrome/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gwrome"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 0 | 2019-05-06T20:29:54Z | 2019-05-07T00:21:51Z | 2019-05-07T00:21:51Z | CONTRIBUTOR | null | Part of #25882
pandas.core.base has the following mypy errors:
```
pandas/core/base.py:840: error: "IndexOpsMixin" has no attribute "_values"; maybe "_map_values"?
pandas/core/base.py:963: error: "IndexOpsMixin" has no attribute "values"
```
Pull request to follow | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26296/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26296/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26297 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26297/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26297/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26297/events | https://github.com/pandas-dev/pandas/pull/26297 | 440,877,511 | MDExOlB1bGxSZXF1ZXN0Mjc2MzI2MDY2 | 26,297 | Fix type annotations in pandas.core.base | {
"avatar_url": "https://avatars.githubusercontent.com/u/1430066?v=4",
"events_url": "https://api.github.com/users/gwrome/events{/privacy}",
"followers_url": "https://api.github.com/users/gwrome/followers",
"following_url": "https://api.github.com/users/gwrome/following{/other_user}",
"gists_url": "https://api.github.com/users/gwrome/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gwrome",
"id": 1430066,
"login": "gwrome",
"node_id": "MDQ6VXNlcjE0MzAwNjY=",
"organizations_url": "https://api.github.com/users/gwrome/orgs",
"received_events_url": "https://api.github.com/users/gwrome/received_events",
"repos_url": "https://api.github.com/users/gwrome/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gwrome/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gwrome/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gwrome"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 1 | 2019-05-06T20:40:52Z | 2019-05-07T00:28:51Z | 2019-05-07T00:21:51Z | CONTRIBUTOR | null | - [X] closes #26296
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26297/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26297/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26297.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26297",
"merged_at": "2019-05-07T00:21:51Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26297.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26297"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26298 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26298/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26298/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26298/events | https://github.com/pandas-dev/pandas/pull/26298 | 440,878,540 | MDExOlB1bGxSZXF1ZXN0Mjc2MzI2ODk1 | 26,298 | BUG-20629 allow .at accessor with CategoricalIndex | {
"avatar_url": "https://avatars.githubusercontent.com/u/29615021?v=4",
"events_url": "https://api.github.com/users/JustinZhengBC/events{/privacy}",
"followers_url": "https://api.github.com/users/JustinZhengBC/followers",
"following_url": "https://api.github.com/users/JustinZhengBC/following{/other_user}",
"gists_url": "https://api.github.com/users/JustinZhengBC/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JustinZhengBC",
"id": 29615021,
"login": "JustinZhengBC",
"node_id": "MDQ6VXNlcjI5NjE1MDIx",
"organizations_url": "https://api.github.com/users/JustinZhengBC/orgs",
"received_events_url": "https://api.github.com/users/JustinZhengBC/received_events",
"repos_url": "https://api.github.com/users/JustinZhengBC/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JustinZhengBC/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JustinZhengBC/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JustinZhengBC"
} | [
{
"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 s... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 8 | 2019-05-06T20:43:42Z | 2019-05-20T00:24:05Z | 2019-05-20T00:23:56Z | CONTRIBUTOR | null | - [X] closes #20629
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry
This PR alters exception handling in various `get_value` functions to make calls to `.at` on non-integer `CategoricalIndex` fall back on positional indexing methods instead of raising exceptions, allowing queries like those mentioned in #20629. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26298/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26298/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26298.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26298",
"merged_at": "2019-05-20T00:23:56Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26298.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26298"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26299 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26299/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26299/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26299/events | https://github.com/pandas-dev/pandas/issues/26299 | 440,943,241 | MDU6SXNzdWU0NDA5NDMyNDE= | 26,299 | Fix type annotations in pandas.core.config_init | {
"avatar_url": "https://avatars.githubusercontent.com/u/1430066?v=4",
"events_url": "https://api.github.com/users/gwrome/events{/privacy}",
"followers_url": "https://api.github.com/users/gwrome/followers",
"following_url": "https://api.github.com/users/gwrome/following{/other_user}",
"gists_url": "https://api.github.com/users/gwrome/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gwrome",
"id": 1430066,
"login": "gwrome",
"node_id": "MDQ6VXNlcjE0MzAwNjY=",
"organizations_url": "https://api.github.com/users/gwrome/orgs",
"received_events_url": "https://api.github.com/users/gwrome/received_events",
"repos_url": "https://api.github.com/users/gwrome/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gwrome/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gwrome/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gwrome"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | null | 0 | 2019-05-06T23:19:22Z | 2019-05-09T17:23:19Z | 2019-05-09T17:23:19Z | CONTRIBUTOR | null | Part of #25882
pandas.core.config_init throws the following mypy error:
```
pandas/core/config_init.py:280: error: Need type annotation for 'style_backup'
```
PR to follow | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26299/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26299/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26300 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26300/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26300/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26300/events | https://github.com/pandas-dev/pandas/pull/26300 | 440,944,391 | MDExOlB1bGxSZXF1ZXN0Mjc2MzgxMzY2 | 26,300 | Add type annotation to config_init | {
"avatar_url": "https://avatars.githubusercontent.com/u/1430066?v=4",
"events_url": "https://api.github.com/users/gwrome/events{/privacy}",
"followers_url": "https://api.github.com/users/gwrome/followers",
"following_url": "https://api.github.com/users/gwrome/following{/other_user}",
"gists_url": "https://api.github.com/users/gwrome/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gwrome",
"id": 1430066,
"login": "gwrome",
"node_id": "MDQ6VXNlcjE0MzAwNjY=",
"organizations_url": "https://api.github.com/users/gwrome/orgs",
"received_events_url": "https://api.github.com/users/gwrome/received_events",
"repos_url": "https://api.github.com/users/gwrome/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gwrome/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gwrome/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gwrome"
} | [
{
"color": "ea91a4",
"default": false,
"description": "type annotations, mypy/pyright type checking",
"id": 1280988427,
"name": "Typing",
"node_id": "MDU6TGFiZWwxMjgwOTg4NDI3",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Typing"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 4 | 2019-05-06T23:24:09Z | 2019-05-09T17:22:59Z | 2019-05-07T01:37:05Z | CONTRIBUTOR | null | - [X] closes #26297
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26300/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26300/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26300.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26300",
"merged_at": "2019-05-07T01:37:05Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26300.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26300"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26301 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26301/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26301/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26301/events | https://github.com/pandas-dev/pandas/pull/26301 | 440,950,870 | MDExOlB1bGxSZXF1ZXN0Mjc2Mzg1MjY4 | 26,301 | DOC Fix inconsistencies | {
"avatar_url": "https://avatars.githubusercontent.com/u/32966226?v=4",
"events_url": "https://api.github.com/users/Scowley4/events{/privacy}",
"followers_url": "https://api.github.com/users/Scowley4/followers",
"following_url": "https://api.github.com/users/Scowley4/following{/other_user}",
"gists_url": "https://api.github.com/users/Scowley4/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Scowley4",
"id": 32966226,
"login": "Scowley4",
"node_id": "MDQ6VXNlcjMyOTY2MjI2",
"organizations_url": "https://api.github.com/users/Scowley4/orgs",
"received_events_url": "https://api.github.com/users/Scowley4/received_events",
"repos_url": "https://api.github.com/users/Scowley4/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Scowley4/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Scowley4/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Scowley4"
} | [
{
"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 | 17 | 2019-05-06T23:45:42Z | 2019-05-08T16:51:13Z | 2019-05-08T10:12:02Z | CONTRIBUTOR | null | Fix a few inconsistencies in the docstrings.
Not sure how pandas community feels about these kinds of fixes (and this is my first PR to pandas). I just notice things that are different from how they occur most of the time and decided to fix them up.
### Examples
#### Add 's' to headers
```
Example
```
to
```
Examples
```
#### Correct number of hyphens under headers
```
Yields
-------
```
to
```
Yields
------
```
#### Rewrite testcase in standard format
```
In [1]: c = pd.Categorical(list('aabca'))
```
to
```
>>> c = pd.Categorical(list('aabca'))
```
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26301/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26301/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26301.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26301",
"merged_at": "2019-05-08T10:12:02Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26301.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26301"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26302 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26302/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26302/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26302/events | https://github.com/pandas-dev/pandas/issues/26302 | 440,977,736 | MDU6SXNzdWU0NDA5Nzc3MzY= | 26,302 | Add Annotations to assert_*_equal functions | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "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": "ea91a4",
"d... | open | false | null | [] | {
"closed_at": null,
"closed_issues": 786,
"created_at": "2015-01-13T10:53:19Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "Changes that would be nice to have in the next release. These issues are not blocking. They will be pushed to the next release if no one has time to fix them.",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/32",
"id": 933188,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels",
"node_id": "MDk6TWlsZXN0b25lOTMzMTg4",
"number": 32,
"open_issues": 1053,
"state": "open",
"title": "Contributions Welcome",
"updated_at": "2021-11-21T00:50:06Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/32"
} | 2 | 2019-05-07T00:59:39Z | 2021-01-31T17:30:42Z | null | MEMBER | null | Follow up to https://github.com/pandas-dev/pandas/pull/25462#issuecomment-489862882 want to add annotations for parameters.
Would ideally probably want to add NoReturn but that requires 3.5.4 at a minimum so may want to explore other options | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26302/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26302/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26303 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26303/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26303/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26303/events | https://github.com/pandas-dev/pandas/issues/26303 | 441,063,408 | MDU6SXNzdWU0NDEwNjM0MDg= | 26,303 | MultiIndex DataFrame to_csv() terminates python process | {
"avatar_url": "https://avatars.githubusercontent.com/u/44474807?v=4",
"events_url": "https://api.github.com/users/miburk/events{/privacy}",
"followers_url": "https://api.github.com/users/miburk/followers",
"following_url": "https://api.github.com/users/miburk/following{/other_user}",
"gists_url": "https://api.github.com/users/miburk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/miburk",
"id": 44474807,
"login": "miburk",
"node_id": "MDQ6VXNlcjQ0NDc0ODA3",
"organizations_url": "https://api.github.com/users/miburk/orgs",
"received_events_url": "https://api.github.com/users/miburk/received_events",
"repos_url": "https://api.github.com/users/miburk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/miburk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/miburk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/miburk"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "207de5",
"default": false,
"description": null,
"id": 71268330,... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 2 | 2019-05-07T06:36:48Z | 2019-05-16T01:47:40Z | 2019-05-16T01:47:39Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import traceback
import pandas as pd
# index is actually a MultiIndex
index = pd.Index([(1,), (2,), (3,)])
data = pd.DataFrame([[1, 2, 3]], columns=index)
data = data.reindex(columns=[(1,), (3,)])
try:
# This call fails with a TypeError.
data.to_csv('crash.csv')
except TypeError as err:
traceback.print_exc()
# This print seems to be essential to trigger an immediate crash of the process
# in the following .to_csv call. The crash happens also if the preceding
# try/except block is removed.
print(data)
data.to_csv('crash.csv')
```
#### Problem description
The python-code above shows two, maybe three errors.
(1) The first call to DataFrame.to_csv raises a TypeError. This it uninformative at best. Printing the DataFrame works, so it should be possible to export it to csv.
(2) The second call to DataFrame.to_csv leads to terminating python with exit code -1073741819 (0xC0000005).
(3) It seems that the print call triggers this crash, even though I would expect a print to not alter the printed data structure.
The Windows event log shows an error happened in lib\site-packages\pandas\_libs\writers.cp36-win_amd64.pyd.
#### Expected Output
Because the DataFrame is printable on the console, I would expect a successful call of to_csv().
#### Output of ``pd.show_versions()``
<details>
Python Version: Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.6.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.24.2
pytest: None
pip: 10.0.1
setuptools: 39.1.0
Cython: None
numpy: 1.15.4
scipy: 1.2.0
pyarrow: None
xarray: None
IPython: 7.0.1
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: 2.6.1
xlrd: 1.2.0
xlwt: None
xlsxwriter: None
lxml.etree: 4.3.0
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26303/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26303/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26304 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26304/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26304/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26304/events | https://github.com/pandas-dev/pandas/issues/26304 | 441,094,981 | MDU6SXNzdWU0NDEwOTQ5ODE= | 26,304 | Inconsistency in `to_datetime` parsing as day and as month for different rows | {
"avatar_url": "https://avatars.githubusercontent.com/u/1769283?v=4",
"events_url": "https://api.github.com/users/vshkolyar/events{/privacy}",
"followers_url": "https://api.github.com/users/vshkolyar/followers",
"following_url": "https://api.github.com/users/vshkolyar/following{/other_user}",
"gists_url": "https://api.github.com/users/vshkolyar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vshkolyar",
"id": 1769283,
"login": "vshkolyar",
"node_id": "MDQ6VXNlcjE3NjkyODM=",
"organizations_url": "https://api.github.com/users/vshkolyar/orgs",
"received_events_url": "https://api.github.com/users/vshkolyar/received_events",
"repos_url": "https://api.github.com/users/vshkolyar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vshkolyar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vshkolyar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vshkolyar"
} | [
{
"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": "009800",
"default": false,
"description": "Duplicate... | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 2 | 2019-05-07T08:03:49Z | 2019-05-07T12:26:11Z | 2019-05-07T12:25:44Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
import pandas as pd
s = pd.Series(['12.01.2017 17:18', '01.02.2017 11:12', '15.04.2017 02:40'])
pd.to_datetime(s)
```
#### Problem description
In our example the result will be as following:
```
0 2017-12-01 17:18:00
1 2017-01-02 11:12:00
2 2017-04-15 02:03:00
dtype: datetime64[ns]
```
#### Expected Output
```
0 2017-01-12 17:18:00
1 2017-02-01 11:12:00
2 2017-04-15 02:03:00
dtype: datetime64[ns]
```
#### Workaround
Specifiyng explicitly `dayfirst=True` parameter in `pd.to_datetime()` call.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Darwin
OS-release: 17.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: None
pip: 19.0.3
setuptools: 41.0.0
Cython: None
numpy: 1.16.3
scipy: None
pyarrow: None
xarray: None
IPython: 7.4.0
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: 1.2.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details> | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26304/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26304/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26305 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26305/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26305/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26305/events | https://github.com/pandas-dev/pandas/issues/26305 | 441,122,745 | MDU6SXNzdWU0NDExMjI3NDU= | 26,305 | DataFrame should allow to hand in dtypes for every column | {
"avatar_url": "https://avatars.githubusercontent.com/u/57199?v=4",
"events_url": "https://api.github.com/users/dwt/events{/privacy}",
"followers_url": "https://api.github.com/users/dwt/followers",
"following_url": "https://api.github.com/users/dwt/following{/other_user}",
"gists_url": "https://api.github.com/users/dwt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dwt",
"id": 57199,
"login": "dwt",
"node_id": "MDQ6VXNlcjU3MTk5",
"organizations_url": "https://api.github.com/users/dwt/orgs",
"received_events_url": "https://api.github.com/users/dwt/received_events",
"repos_url": "https://api.github.com/users/dwt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dwt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dwt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dwt"
} | [
{
"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": "009... | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 2361,
"created_at": "2015-02-26T19:29:05Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/1020496?v=4",
"events_url": "https://api.github.com/users/jorisvandenbossche/events{/privacy}",
"followers_url": "https://api.github.com/users/jorisvandenbossche/followers",
"following_url": "https://api.github.com/users/jorisvandenbossche/following{/other_user}",
"gists_url": "https://api.github.com/users/jorisvandenbossche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorisvandenbossche",
"id": 1020496,
"login": "jorisvandenbossche",
"node_id": "MDQ6VXNlcjEwMjA0OTY=",
"organizations_url": "https://api.github.com/users/jorisvandenbossche/orgs",
"received_events_url": "https://api.github.com/users/jorisvandenbossche/received_events",
"repos_url": "https://api.github.com/users/jorisvandenbossche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorisvandenbossche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorisvandenbossche"
},
"description": "A milestone for closed or open issues for which there is no action needed (eg not a bug, just a question / discussion, nothing to resolve, wontfix, etc).\r\n\r\n",
"due_on": null,
"html_url": "https://github.com/pandas-dev/pandas/milestone/33",
"id": 997544,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33/labels",
"node_id": "MDk6TWlsZXN0b25lOTk3NTQ0",
"number": 33,
"open_issues": 11,
"state": "open",
"title": "No action",
"updated_at": "2021-11-19T17:33:16Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/33"
} | 1 | 2019-05-07T09:08:02Z | 2019-05-07T11:05:58Z | 2019-05-07T11:05:43Z | NONE | null | Currently it's quite hard to create empty data frames that have specific columns and types. This seems to happen to me on a regular basis, which is why I add this feature request.
#### Code Sample, a copy-pastable example if possible
```python
# state of the art / workaround
empty_result = pd.DataFrame(np.empty((0,),
dtype=[
('time', datetime),
('ability', float),
('error', float),
('index', int),
('index_error', float)
]))
# how it should be
empty_result = pd.DataFrame(
dtype=[
('time', datetime),
('ability', float),
('error', float),
('index', int),
('index_error', float)
])
```
#### Problem description
It's just very non intuitive to specify a data frame completely when it's empty. I seem to need this on a regular basis when writing apis that deal with empty incoming data, which would then fail other pandas operations and correct empty data frames need to be constructed to return them instead.
#### Expected Output
An empty data frame should be constructed.
#### Output of ``pd.show_versions()``
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.10.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: de_DE.utf-8
LOCALE: None.None
pandas: 0.24.2
pytest: 3.4.2
pip: 19.1
setuptools: 40.6.3
Cython: None
numpy: 1.14.6
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 5.8.0
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: 1.2.1
tables: None
numexpr: 2.6.9
feather: None
matplotlib: 2.2.4
openpyxl: 2.6.1
xlrd: 1.2.0
xlwt: None
xlsxwriter: 1.1.5
lxml.etree: 4.3.2
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.2.18
pymysql: 0.9.3
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details> | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26305/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26305/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26306 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26306/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26306/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26306/events | https://github.com/pandas-dev/pandas/pull/26306 | 441,155,633 | MDExOlB1bGxSZXF1ZXN0Mjc2NTM2OTg1 | 26,306 | DOC: Improve links and fix issues on resample documentation page | {
"avatar_url": "https://avatars.githubusercontent.com/u/13381361?v=4",
"events_url": "https://api.github.com/users/Bharat123rox/events{/privacy}",
"followers_url": "https://api.github.com/users/Bharat123rox/followers",
"following_url": "https://api.github.com/users/Bharat123rox/following{/other_user}",
"gists_url": "https://api.github.com/users/Bharat123rox/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Bharat123rox",
"id": 13381361,
"login": "Bharat123rox",
"node_id": "MDQ6VXNlcjEzMzgxMzYx",
"organizations_url": "https://api.github.com/users/Bharat123rox/orgs",
"received_events_url": "https://api.github.com/users/Bharat123rox/received_events",
"repos_url": "https://api.github.com/users/Bharat123rox/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Bharat123rox/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Bharat123rox/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Bharat123rox"
} | [
{
"color": "3465A4",
"default": false,
"description": null,
"id": 134699,
"name": "Docs",
"node_id": "MDU6TGFiZWwxMzQ2OTk=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Docs"
},
{
"color": "0052cc",
"default": false,
"description": "DateOffsets",
"id... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 6 | 2019-05-07T10:19:01Z | 2019-05-09T12:37:13Z | 2019-05-09T12:37:09Z | CONTRIBUTOR | null | - [x] closes #26275
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry (Not required IMO)
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26306/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26306/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26306.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26306",
"merged_at": "2019-05-09T12:37:08Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26306.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26306"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26307 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26307/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26307/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26307/events | https://github.com/pandas-dev/pandas/issues/26307 | 441,250,560 | MDU6SXNzdWU0NDEyNTA1NjA= | 26,307 | Missing `GL06` and `GL07` errors for invalid docstrings | {
"avatar_url": "https://avatars.githubusercontent.com/u/32966226?v=4",
"events_url": "https://api.github.com/users/Scowley4/events{/privacy}",
"followers_url": "https://api.github.com/users/Scowley4/followers",
"following_url": "https://api.github.com/users/Scowley4/following{/other_user}",
"gists_url": "https://api.github.com/users/Scowley4/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Scowley4",
"id": 32966226,
"login": "Scowley4",
"node_id": "MDQ6VXNlcjMyOTY2MjI2",
"organizations_url": "https://api.github.com/users/Scowley4/orgs",
"received_events_url": "https://api.github.com/users/Scowley4/received_events",
"repos_url": "https://api.github.com/users/Scowley4/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Scowley4/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Scowley4/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Scowley4"
} | [
{
"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": "eb6420",
"default": false,
"description": "Code style, linting, ... | closed | false | null | [] | null | 5 | 2019-05-07T14:01:37Z | 2020-09-23T21:29:58Z | 2020-09-23T21:29:58Z | CONTRIBUTOR | null | As discovered in the process of working on #26301, there are invalid docstrings that should throw either `GL06 - Found unknown section` or `GL07 - Sections are in the wrong order` errors.
Without too much investigation, it's not clear why `GL06` is not being thrown. Currently unsure if this is even a problem because, as @datapythonista mentioned in comments on #26301, we may not even run these checks on the private methods.
The missing `GL07` are because section headers were only considered section headers if the following line had an equal number of `-----`'s (underlines).
This code is found here (where `content[0]` is the section header):
https://github.com/pandas-dev/pandas/blob/2bbc0c2c198374546408cb15fff447c1e306f99f/scripts/validate_docstrings.py#L383-L386
- [x] Reorder sections that are failing #26301 and merge
- [ ] ~Fix GL07 to correctly throw errors with invalid underlines~
- [ ] ~Investigate GL06~
- [ ] Add error for valid section title words with invalid number of underlines
If it's okay with others, I'd like to take a crack at this issue.
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26307/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26307/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26308 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26308/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26308/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26308/events | https://github.com/pandas-dev/pandas/pull/26308 | 441,280,933 | MDExOlB1bGxSZXF1ZXN0Mjc2NjM3Mjc4 | 26,308 | Removed to_panel references | {
"avatar_url": "https://avatars.githubusercontent.com/u/609873?v=4",
"events_url": "https://api.github.com/users/WillAyd/events{/privacy}",
"followers_url": "https://api.github.com/users/WillAyd/followers",
"following_url": "https://api.github.com/users/WillAyd/following{/other_user}",
"gists_url": "https://api.github.com/users/WillAyd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WillAyd",
"id": 609873,
"login": "WillAyd",
"node_id": "MDQ6VXNlcjYwOTg3Mw==",
"organizations_url": "https://api.github.com/users/WillAyd/orgs",
"received_events_url": "https://api.github.com/users/WillAyd/received_events",
"repos_url": "https://api.github.com/users/WillAyd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WillAyd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WillAyd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WillAyd"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 2 | 2019-05-07T14:58:10Z | 2019-05-07T17:49:54Z | 2019-05-07T17:49:50Z | MEMBER | null | Follow up to fix some CI issues caused by #26287 | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26308/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26308/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26308.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26308",
"merged_at": "2019-05-07T17:49:50Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26308.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26308"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26309 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26309/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26309/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26309/events | https://github.com/pandas-dev/pandas/issues/26309 | 441,292,742 | MDU6SXNzdWU0NDEyOTI3NDI= | 26,309 | Upsample spline interpolation with smoothing | {
"avatar_url": "https://avatars.githubusercontent.com/u/4156237?v=4",
"events_url": "https://api.github.com/users/tritemio/events{/privacy}",
"followers_url": "https://api.github.com/users/tritemio/followers",
"following_url": "https://api.github.com/users/tritemio/following{/other_user}",
"gists_url": "https://api.github.com/users/tritemio/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tritemio",
"id": 4156237,
"login": "tritemio",
"node_id": "MDQ6VXNlcjQxNTYyMzc=",
"organizations_url": "https://api.github.com/users/tritemio/orgs",
"received_events_url": "https://api.github.com/users/tritemio/received_events",
"repos_url": "https://api.github.com/users/tritemio/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tritemio/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tritemio/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tritemio"
} | [
{
"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": "d7e102",
"default": false,
"description": "np.nan, ... | open | false | null | [] | null | 6 | 2019-05-07T15:20:41Z | 2021-07-02T05:44:09Z | null | NONE | null | #### Code Sample, a copy-pastable example if possible
```python
from io import StringIO
import numpy as np
import pandas as pd
from scipy import interpolate
import matplotlib.pyplot as plt
csv = StringIO("""
date_time,temperature
2019-05-05 01:30:00,38.8
2019-05-05 03:20:00,39.5
2019-05-05 04:30:00,39.3
2019-05-05 05:30:00,38.9
2019-05-05 07:55:00,38.7
2019-05-05 09:45:00,39.1
""")
df = pd.read_csv(csv, parse_dates=['date_time'], index_col=0)
s = 0.3
x = df.index.values
y = df.temperature.values
xnew = np.arange(x[0], x[-1], np.timedelta64(5, 'm'))
tck = interpolate.splrep(x, y, k=3, s=s)
ynew = interpolate.splev(xnew.view(int), tck)
df.temperature.plot(marker='o', ls='', label='data')
plt.plot(xnew, ynew, label=f'scipy cubic spline (s={s})')
(df.temperature.resample('5min')
.interpolate(method='spline', order=3, s=s)
.plot(label=f'pandas cubic spline (s={s})'))
plt.legend();
```
See the same script as a notebook:
- https://gist.github.com/tritemio/aea8c0e18e9bde6984ca199b7c012ad8
#### Problem description
Spline interpolation of order 3 with smoothing (`s>0`) gives an interpolation that does not pass through the data points. Scipy's version shows this behaviour. Pandas's version shows a smooth spline and then "jumps" in correspondence to the data points in order to "pass through the data". See figure below:
<img width="380" alt="index" src="https://user-images.githubusercontent.com/4156237/57311250-8efbc180-70eb-11e9-8800-0fd467e198b8.png">
#### Expected Output
Scipy and pandas interpolation should match.
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here below this line]
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.2.final.0
python-bits: 64
OS: Darwin
OS-release: 18.2.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: 4.3.0
pip: 19.0.3
setuptools: 40.8.0
Cython: None
numpy: 1.16.2
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.3.0
sphinx: None
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: 1.2.1
tables: None
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: 4.3.2
bs4: 4.7.1
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26309/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26309/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26310 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26310/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26310/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26310/events | https://github.com/pandas-dev/pandas/issues/26310 | 441,324,728 | MDU6SXNzdWU0NDEzMjQ3Mjg= | 26,310 | groupby.agg (first, last, min, etc...) returns incorrect results for uint64 columns | {
"avatar_url": "https://avatars.githubusercontent.com/u/58944?v=4",
"events_url": "https://api.github.com/users/toliwaga/events{/privacy}",
"followers_url": "https://api.github.com/users/toliwaga/followers",
"following_url": "https://api.github.com/users/toliwaga/following{/other_user}",
"gists_url": "https://api.github.com/users/toliwaga/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/toliwaga",
"id": 58944,
"login": "toliwaga",
"node_id": "MDQ6VXNlcjU4OTQ0",
"organizations_url": "https://api.github.com/users/toliwaga/orgs",
"received_events_url": "https://api.github.com/users/toliwaga/received_events",
"repos_url": "https://api.github.com/users/toliwaga/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/toliwaga/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/toliwaga/subscriptions",
"type": "User",
"url": "https://api.github.com/users/toliwaga"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 76811,
"name": "Bug",
"node_id": "MDU6TGFiZWw3NjgxMQ==",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Bug"
},
{
"color": "729FCF",
"default": false,
"description": null,
"id": 233160,
... | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 3 | 2019-05-07T16:26:23Z | 2019-05-18T14:45:05Z | 2019-05-18T14:45:05Z | NONE | null | #### Code Sample, a copy-pastable example if possible
```
import pandas as pd
import numpy as np
df = pd.DataFrame({'x': 6903052872240755750, 'y': [1,2]})
print(df.groupby('y').agg({'x': 'first'}))
df.x = df.x.astype(np.uint64)
print(df.groupby('y').agg({'x': 'first'}))
```
#### Problem description
groupby.agg (first, last, min, etc...) returns incorrect results for uint64 columns
#### Expected Output
expect same results in both cases below:
x
y
1 6903052872240755750
2 6903052872240755750
x
y
1 6903052872240755712
2 6903052872240755712
#### Output of ``pd.show_versions()``
<details>
[paste the output of ``pd.show_versions()`` here below this line]
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: None
pip: 19.1
setuptools: 41.0.1
Cython: None
numpy: 1.16.3
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
| {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26310/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26310/timeline | null | null | null |
https://api.github.com/repos/pandas-dev/pandas/issues/26311 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26311/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26311/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26311/events | https://github.com/pandas-dev/pandas/pull/26311 | 441,357,681 | MDExOlB1bGxSZXF1ZXN0Mjc2Njk4NDc4 | 26,311 | CLN;: remove compat.lzip | {
"avatar_url": "https://avatars.githubusercontent.com/u/26364415?v=4",
"events_url": "https://api.github.com/users/topper-123/events{/privacy}",
"followers_url": "https://api.github.com/users/topper-123/followers",
"following_url": "https://api.github.com/users/topper-123/following{/other_user}",
"gists_url": "https://api.github.com/users/topper-123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/topper-123",
"id": 26364415,
"login": "topper-123",
"node_id": "MDQ6VXNlcjI2MzY0NDE1",
"organizations_url": "https://api.github.com/users/topper-123/orgs",
"received_events_url": "https://api.github.com/users/topper-123/received_events",
"repos_url": "https://api.github.com/users/topper-123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/topper-123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/topper-123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/topper-123"
} | [
{
"color": "207de5",
"default": false,
"description": null,
"id": 211029535,
"name": "Clean",
"node_id": "MDU6TGFiZWwyMTEwMjk1MzU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Clean"
}
] | closed | false | null | [] | {
"closed_at": "2019-07-19T00:34:29Z",
"closed_issues": 1289,
"created_at": "2018-10-23T02:34:15Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/953992?v=4",
"events_url": "https://api.github.com/users/jreback/events{/privacy}",
"followers_url": "https://api.github.com/users/jreback/followers",
"following_url": "https://api.github.com/users/jreback/following{/other_user}",
"gists_url": "https://api.github.com/users/jreback/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jreback",
"id": 953992,
"login": "jreback",
"node_id": "MDQ6VXNlcjk1Mzk5Mg==",
"organizations_url": "https://api.github.com/users/jreback/orgs",
"received_events_url": "https://api.github.com/users/jreback/received_events",
"repos_url": "https://api.github.com/users/jreback/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jreback/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jreback/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jreback"
},
"description": "",
"due_on": "2019-07-01T07:00:00Z",
"html_url": "https://github.com/pandas-dev/pandas/milestone/61",
"id": 3759483,
"labels_url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61/labels",
"node_id": "MDk6TWlsZXN0b25lMzc1OTQ4Mw==",
"number": 61,
"open_issues": 0,
"state": "closed",
"title": "0.25.0",
"updated_at": "2020-01-02T15:10:40Z",
"url": "https://api.github.com/repos/pandas-dev/pandas/milestones/61"
} | 5 | 2019-05-07T17:48:12Z | 2019-05-08T04:32:55Z | 2019-05-08T04:18:40Z | CONTRIBUTOR | null | - [x] xref #25725
Removal of ``compat.lzip`` from the code base. | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26311/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26311/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26311.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26311",
"merged_at": "2019-05-08T04:18:39Z",
"patch_url": "https://github.com/pandas-dev/pandas/pull/26311.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26311"
} |
https://api.github.com/repos/pandas-dev/pandas/issues/26312 | https://api.github.com/repos/pandas-dev/pandas | https://api.github.com/repos/pandas-dev/pandas/issues/26312/labels{/name} | https://api.github.com/repos/pandas-dev/pandas/issues/26312/comments | https://api.github.com/repos/pandas-dev/pandas/issues/26312/events | https://github.com/pandas-dev/pandas/pull/26312 | 441,465,385 | MDExOlB1bGxSZXF1ZXN0Mjc2Nzg3NDUz | 26,312 | Added Hypothesis property-based test for timedelta addition | {
"avatar_url": "https://avatars.githubusercontent.com/u/41354105?v=4",
"events_url": "https://api.github.com/users/c74p/events{/privacy}",
"followers_url": "https://api.github.com/users/c74p/followers",
"following_url": "https://api.github.com/users/c74p/following{/other_user}",
"gists_url": "https://api.github.com/users/c74p/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/c74p",
"id": 41354105,
"login": "c74p",
"node_id": "MDQ6VXNlcjQxMzU0MTA1",
"organizations_url": "https://api.github.com/users/c74p/orgs",
"received_events_url": "https://api.github.com/users/c74p/received_events",
"repos_url": "https://api.github.com/users/c74p/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/c74p/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/c74p/subscriptions",
"type": "User",
"url": "https://api.github.com/users/c74p"
} | [
{
"color": "C4A000",
"default": false,
"description": "pandas testing functions or related to the test suite",
"id": 127685,
"name": "Testing",
"node_id": "MDU6TGFiZWwxMjc2ODU=",
"url": "https://api.github.com/repos/pandas-dev/pandas/labels/Testing"
}
] | closed | false | null | [] | null | 5 | 2019-05-07T22:03:06Z | 2019-05-13T21:01:06Z | 2019-05-13T21:01:06Z | NONE | null | - [ ] closes #xxxx
- [1 ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
- This is the first pull request I've done on any project in any language. Any feedback, pointing to docs, requests to work on other issues instead, etc. happily accepted. Thanks for your work on Pandas! | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/pandas-dev/pandas/issues/26312/reactions"
} | https://api.github.com/repos/pandas-dev/pandas/issues/26312/timeline | null | 0 | {
"diff_url": "https://github.com/pandas-dev/pandas/pull/26312.diff",
"html_url": "https://github.com/pandas-dev/pandas/pull/26312",
"merged_at": null,
"patch_url": "https://github.com/pandas-dev/pandas/pull/26312.patch",
"url": "https://api.github.com/repos/pandas-dev/pandas/pulls/26312"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.