Skip to content

Commit 8859cf7

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into knf
2 parents edd49db + 9dc4d71 commit 8859cf7

File tree

24 files changed

+374
-158
lines changed

24 files changed

+374
-158
lines changed

doc/source/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@
315315
import numpy as np
316316
import pandas as pd
317317
318-
randn = np.random.randn
319318
np.random.seed(123456)
320319
np.set_printoptions(precision=4, suppress=True)
321320
pd.options.display.max_rows = 15

doc/source/whatsnew/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Version 0.25
2424
.. toctree::
2525
:maxdepth: 2
2626

27+
v0.25.2
2728
v0.25.1
2829
v0.25.0
2930

doc/source/whatsnew/v0.10.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ Here is a taste of what to expect.
498498

499499
.. code-block:: ipython
500500
501-
In [58]: p4d = Panel4D(randn(2, 2, 5, 4),
501+
In [58]: p4d = Panel4D(np.random.randn(2, 2, 5, 4),
502502
....: labels=['Label1','Label2'],
503503
....: items=['Item1', 'Item2'],
504504
....: major_axis=date_range('1/1/2000', periods=5),

doc/source/whatsnew/v0.25.1.rst

+25-86
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,44 @@
11
.. _whatsnew_0251:
22

3-
What's new in 0.25.1 (July XX, 2019)
4-
------------------------------------
3+
What's new in 0.25.1 (August 21, 2019)
4+
--------------------------------------
55

6-
Enhancements
7-
~~~~~~~~~~~~
8-
9-
10-
.. _whatsnew_0251.enhancements.other:
6+
These are the changes in pandas 0.25.1. See :ref:`release` for a full changelog
7+
including other versions of pandas.
118

12-
Other enhancements
13-
^^^^^^^^^^^^^^^^^^
9+
I/O and LZMA
10+
~~~~~~~~~~~~
1411

15-
-
16-
-
17-
-
12+
Some users may unknowingly have an incomplete Python installation lacking the `lzma` module from the standard library. In this case, `import pandas` failed due to an `ImportError` (:issue: `27575`).
13+
Pandas will now warn, rather than raising an `ImportError` if the `lzma` module is not present. Any subsequent attempt to use `lzma` methods will raise a `RuntimeError`.
14+
A possible fix for the lack of the `lzma` module is to ensure you have the necessary libraries and then re-install Python.
15+
For example, on MacOS installing Python with `pyenv` may lead to an incomplete Python installation due to unmet system dependencies at compilation time (like `xz`). Compilation will succeed, but Python might fail at run time. The issue can be solved by installing the necessary dependencies and then re-installing Python.
1816

1917
.. _whatsnew_0251.bug_fixes:
2018

2119
Bug fixes
2220
~~~~~~~~~
2321

24-
2522
Categorical
2623
^^^^^^^^^^^
2724

28-
- Bug in :meth:`Categorical.fillna` would replace all values, not just those that are ``NaN`` (:issue:`26215`)
29-
-
25+
- Bug in :meth:`Categorical.fillna` that would replace all values, not just those that are ``NaN`` (:issue:`26215`)
3026

3127
Datetimelike
3228
^^^^^^^^^^^^
29+
3330
- Bug in :func:`to_datetime` where passing a timezone-naive :class:`DatetimeArray` or :class:`DatetimeIndex` and ``utc=True`` would incorrectly return a timezone-naive result (:issue:`27733`)
3431
- Bug in :meth:`Period.to_timestamp` where a :class:`Period` outside the :class:`Timestamp` implementation bounds (roughly 1677-09-21 to 2262-04-11) would return an incorrect :class:`Timestamp` instead of raising ``OutOfBoundsDatetime`` (:issue:`19643`)
35-
-
36-
-
37-
38-
Timedelta
39-
^^^^^^^^^
40-
41-
-
42-
-
43-
-
32+
- Bug in iterating over :class:`DatetimeIndex` when the underlying data is read-only (:issue:`28055`)
4433

4534
Timezones
4635
^^^^^^^^^
4736

4837
- Bug in :class:`Index` where a numpy object array with a timezone aware :class:`Timestamp` and ``np.nan`` would not return a :class:`DatetimeIndex` (:issue:`27011`)
49-
-
50-
-
5138

5239
Numeric
5340
^^^^^^^
41+
5442
- Bug in :meth:`Series.interpolate` when using a timezone aware :class:`DatetimeIndex` (:issue:`27548`)
5543
- Bug when printing negative floating point complex numbers would raise an ``IndexError`` (:issue:`27484`)
5644
- Bug where :class:`DataFrame` arithmetic operators such as :meth:`DataFrame.mul` with a :class:`Series` with axis=1 would raise an ``AttributeError`` on :class:`DataFrame` larger than the minimum threshold to invoke numexpr (:issue:`27636`)
@@ -60,23 +48,11 @@ Conversion
6048
^^^^^^^^^^
6149

6250
- Improved the warnings for the deprecated methods :meth:`Series.real` and :meth:`Series.imag` (:issue:`27610`)
63-
-
64-
-
65-
66-
Strings
67-
^^^^^^^
68-
69-
-
70-
-
71-
-
72-
7351

7452
Interval
7553
^^^^^^^^
54+
7655
- Bug in :class:`IntervalIndex` where `dir(obj)` would raise ``ValueError`` (:issue:`27571`)
77-
-
78-
-
79-
-
8056

8157
Indexing
8258
^^^^^^^^
@@ -85,92 +61,55 @@ Indexing
8561
- Break reference cycle involving :class:`Index` and other index classes to allow garbage collection of index objects without running the GC. (:issue:`27585`, :issue:`27840`)
8662
- Fix regression in assigning values to a single column of a DataFrame with a ``MultiIndex`` columns (:issue:`27841`).
8763
- Fix regression in ``.ix`` fallback with an ``IntervalIndex`` (:issue:`27865`).
88-
-
8964

9065
Missing
9166
^^^^^^^
9267

93-
- Bug in :func:`pandas.isnull` or :func:`pandas.isna` when the input is a type e.g. `type(pandas.Series())` (:issue:`27482`)
94-
-
95-
-
96-
97-
MultiIndex
98-
^^^^^^^^^^
99-
100-
-
101-
-
102-
-
68+
- Bug in :func:`pandas.isnull` or :func:`pandas.isna` when the input is a type e.g. ``type(pandas.Series())`` (:issue:`27482`)
10369

10470
I/O
10571
^^^
72+
10673
- Avoid calling ``S3File.s3`` when reading parquet, as this was removed in s3fs version 0.3.0 (:issue:`27756`)
10774
- Better error message when a negative header is passed in :func:`pandas.read_csv` (:issue:`27779`)
108-
- Follow the ``min_rows`` display option (introduced in v0.25.0) correctly in the html repr in the notebook (:issue:`27991`).
109-
-
75+
- Follow the ``min_rows`` display option (introduced in v0.25.0) correctly in the HTML repr in the notebook (:issue:`27991`).
11076

11177
Plotting
11278
^^^^^^^^
11379

114-
- Added a pandas_plotting_backends entrypoint group for registering plot backends. See :ref:`extending.plotting-backends` for more (:issue:`26747`).
80+
- Added a ``pandas_plotting_backends`` entrypoint group for registering plot backends. See :ref:`extending.plotting-backends` for more (:issue:`26747`).
11581
- Fixed the re-instatement of Matplotlib datetime converters after calling
116-
`pandas.plotting.deregister_matplotlib_converters()` (:issue:`27481`).
117-
-
82+
:meth:`pandas.plotting.deregister_matplotlib_converters` (:issue:`27481`).
11883
- Fix compatibility issue with matplotlib when passing a pandas ``Index`` to a plot call (:issue:`27775`).
119-
-
12084

12185
Groupby/resample/rolling
12286
^^^^^^^^^^^^^^^^^^^^^^^^
12387

88+
- Fixed regression in :meth:`pands.core.groupby.DataFrameGroupBy.quantile` raising when multiple quantiles are given (:issue:`27526`)
12489
- Bug in :meth:`pandas.core.groupby.DataFrameGroupBy.transform` where applying a timezone conversion lambda function would drop timezone information (:issue:`27496`)
12590
- Bug in :meth:`pandas.core.groupby.GroupBy.nth` where ``observed=False`` was being ignored for Categorical groupers (:issue:`26385`)
12691
- Bug in windowing over read-only arrays (:issue:`27766`)
12792
- Fixed segfault in `pandas.core.groupby.DataFrameGroupBy.quantile` when an invalid quantile was passed (:issue:`27470`)
128-
-
12993

13094
Reshaping
13195
^^^^^^^^^
13296

13397
- A ``KeyError`` is now raised if ``.unstack()`` is called on a :class:`Series` or :class:`DataFrame` with a flat :class:`Index` passing a name which is not the correct one (:issue:`18303`)
98+
- Bug :meth:`merge_asof` could not merge :class:`Timedelta` objects when passing `tolerance` kwarg (:issue:`27642`)
13499
- Bug in :meth:`DataFrame.crosstab` when ``margins`` set to ``True`` and ``normalize`` is not ``False``, an error is raised. (:issue:`27500`)
135100
- :meth:`DataFrame.join` now suppresses the ``FutureWarning`` when the sort parameter is specified (:issue:`21952`)
136101
- Bug in :meth:`DataFrame.join` raising with readonly arrays (:issue:`27943`)
137102

138103
Sparse
139104
^^^^^^
140-
- Bug in reductions for :class:`Series` with Sparse dtypes (:issue:`27080`)
141-
-
142-
-
143-
-
144-
145-
146-
Build Changes
147-
^^^^^^^^^^^^^
148-
149-
-
150-
-
151-
-
152-
153-
ExtensionArray
154-
^^^^^^^^^^^^^^
155105

156-
-
157-
-
158-
-
106+
- Bug in reductions for :class:`Series` with Sparse dtypes (:issue:`27080`)
159107

160108
Other
161109
^^^^^
162-
- Bug in :meth:`Series.replace` and :meth:`DataFrame.replace` when replacing timezone-aware timestamps using a dict-like replacer (:issue:`27720`)
163-
-
164-
-
165-
-
166-
167-
I/O and LZMA
168-
~~~~~~~~~~~~
169110

170-
Some users may unknowingly have an incomplete Python installation, which lacks the `lzma` module from the standard library. In this case, `import pandas` failed due to an `ImportError` (:issue: `27575`).
171-
Pandas will now warn, rather than raising an `ImportError` if the `lzma` module is not present. Any subsequent attempt to use `lzma` methods will raise a `RuntimeError`.
172-
A possible fix for the lack of the `lzma` module is to ensure you have the necessary libraries and then re-install Python.
173-
For example, on MacOS installing Python with `pyenv` may lead to an incomplete Python installation due to unmet system dependencies at compilation time (like `xz`). Compilation will succeed, but Python might fail at run time. The issue can be solved by installing the necessary dependencies and then re-installing Python.
111+
- Bug in :meth:`Series.replace` and :meth:`DataFrame.replace` when replacing timezone-aware timestamps using a dict-like replacer (:issue:`27720`)
112+
- Bug in :meth:`Series.rename` when using a custom type indexer. Now any value that isn't callable or dict-like is treated as a scalar. (:issue:`27814`)
174113

175114
.. _whatsnew_0.251.contributors:
176115

doc/source/whatsnew/v0.25.2.rst

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
.. _whatsnew_0252:
2+
3+
What's new in 0.25.2 (October XX, 2019)
4+
---------------------------------------
5+
6+
These are the changes in pandas 0.25.2. See :ref:`release` for a full changelog
7+
including other versions of pandas.
8+
9+
.. _whatsnew_0252.bug_fixes:
10+
11+
Bug fixes
12+
~~~~~~~~~
13+
14+
Categorical
15+
^^^^^^^^^^^
16+
17+
-
18+
19+
Datetimelike
20+
^^^^^^^^^^^^
21+
22+
-
23+
-
24+
-
25+
26+
Timezones
27+
^^^^^^^^^
28+
29+
-
30+
31+
Numeric
32+
^^^^^^^
33+
34+
-
35+
-
36+
-
37+
-
38+
39+
Conversion
40+
^^^^^^^^^^
41+
42+
-
43+
44+
Interval
45+
^^^^^^^^
46+
47+
-
48+
49+
Indexing
50+
^^^^^^^^
51+
52+
-
53+
-
54+
-
55+
-
56+
57+
Missing
58+
^^^^^^^
59+
60+
-
61+
62+
I/O
63+
^^^
64+
65+
-
66+
-
67+
-
68+
69+
Plotting
70+
^^^^^^^^
71+
72+
-
73+
-
74+
-
75+
76+
Groupby/resample/rolling
77+
^^^^^^^^^^^^^^^^^^^^^^^^
78+
79+
-
80+
-
81+
-
82+
-
83+
-
84+
85+
Reshaping
86+
^^^^^^^^^
87+
88+
-
89+
-
90+
-
91+
-
92+
-
93+
94+
Sparse
95+
^^^^^^
96+
97+
-
98+
99+
Other
100+
^^^^^
101+
102+
-
103+
-
104+
105+
.. _whatsnew_0.252.contributors:
106+
107+
Contributors
108+
~~~~~~~~~~~~
109+
110+
.. contributors:: v0.25.1..HEAD

pandas/_libs/tslib.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ cdef inline object create_time_from_ts(
7171

7272
@cython.wraparound(False)
7373
@cython.boundscheck(False)
74-
def ints_to_pydatetime(int64_t[:] arr, object tz=None, object freq=None,
74+
def ints_to_pydatetime(const int64_t[:] arr, object tz=None, object freq=None,
7575
str box="datetime"):
7676
"""
7777
Convert an i8 repr to an ndarray of datetimes, date, time or Timestamp

pandas/core/arrays/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def fillna(self, value=None, method=None, limit=None):
514514

515515
def dropna(self):
516516
"""
517-
Return ExtensionArray without NA values
517+
Return ExtensionArray without NA values.
518518
519519
Returns
520520
-------
@@ -957,7 +957,7 @@ def _concat_same_type(
957957
cls, to_concat: Sequence[ABCExtensionArray]
958958
) -> ABCExtensionArray:
959959
"""
960-
Concatenate multiple array
960+
Concatenate multiple array.
961961
962962
Parameters
963963
----------

pandas/core/arrays/datetimes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ def tz_localize(self, tz, ambiguous="raise", nonexistent="raise", errors=None):
11581158
def to_pydatetime(self):
11591159
"""
11601160
Return Datetime Array/Index as object ndarray of datetime.datetime
1161-
objects
1161+
objects.
11621162
11631163
Returns
11641164
-------
@@ -1283,7 +1283,7 @@ def to_perioddelta(self, freq):
12831283
"""
12841284
Calculate TimedeltaArray of difference between index
12851285
values and index converted to PeriodArray at specified
1286-
freq. Used for vectorized offsets
1286+
freq. Used for vectorized offsets.
12871287
12881288
Parameters
12891289
----------

pandas/core/arrays/period.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def __array__(self, dtype=None):
426426
@property
427427
def is_leap_year(self):
428428
"""
429-
Logical indicating if the date belongs to a leap year
429+
Logical indicating if the date belongs to a leap year.
430430
"""
431431
return isleapyear_arr(np.asarray(self.year))
432432

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3098,7 +3098,7 @@ def _ensure_valid_index(self, value):
30983098
passed value.
30993099
"""
31003100
# GH5632, make sure that we are a Series convertible
3101-
if not len(self.index) and is_list_like(value):
3101+
if not len(self.index) and is_list_like(value) and len(value):
31023102
try:
31033103
value = Series(value)
31043104
except (ValueError, NotImplementedError, TypeError):

0 commit comments

Comments
 (0)