Skip to content

Commit a5deefb

Browse files
committed
Merge branch 'master' into PR_TOOL_MERGE_PR_19021
2 parents a4dec6f + f0cd23c commit a5deefb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3325
-3333
lines changed

doc/source/contributing.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ We'll now kick off a three-step process:
171171
# Create and activate the build environment
172172
conda env create -f ci/environment-dev.yaml
173173
conda activate pandas-dev
174+
175+
# or with older versions of Anaconda:
176+
source activate pandas-dev
174177
175178
# Build and install pandas
176179
python setup.py build_ext --inplace -j 4
@@ -456,7 +459,7 @@ Here are *some* of the more common ``cpplint`` issues:
456459
- we restrict line-length to 80 characters to promote readability
457460
- every header file must include a header guard to avoid name collisions if re-included
458461

459-
:ref:`Continuous Integration <contributing.ci>`. will run the
462+
:ref:`Continuous Integration <contributing.ci>` will run the
460463
`cpplint <https://pypi.python.org/pypi/cpplint>`_ tool
461464
and report any stylistic errors in your code. Therefore, it is helpful before
462465
submitting code to run the check yourself::

doc/source/io.rst

+14-2
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,20 @@ na_values : scalar, str, list-like, or dict, default ``None``
214214
for a list of the values interpreted as NaN by default.
215215

216216
keep_default_na : boolean, default ``True``
217-
If na_values are specified and keep_default_na is ``False`` the default NaN
218-
values are overridden, otherwise they're appended to.
217+
Whether or not to include the default NaN values when parsing the data.
218+
Depending on whether `na_values` is passed in, the behavior is as follows:
219+
220+
* If `keep_default_na` is True, and `na_values` are specified, `na_values`
221+
is appended to the default NaN values used for parsing.
222+
* If `keep_default_na` is True, and `na_values` are not specified, only
223+
the default NaN values are used for parsing.
224+
* If `keep_default_na` is False, and `na_values` are specified, only
225+
the NaN values specified `na_values` are used for parsing.
226+
* If `keep_default_na` is False, and `na_values` are not specified, no
227+
strings will be parsed as NaN.
228+
229+
Note that if `na_filter` is passed in as False, the `keep_default_na` and
230+
`na_values` parameters will be ignored.
219231
na_filter : boolean, default ``True``
220232
Detect missing value markers (empty strings and the value of na_values). In
221233
data without any NAs, passing ``na_filter=False`` can improve the performance

doc/source/whatsnew/v0.23.0.txt

+8-2
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,11 @@ Other API Changes
306306
- :class:`IntervalIndex` and ``IntervalDtype`` no longer support categorical, object, and string subtypes (:issue:`19016`)
307307
- The default ``Timedelta`` constructor now accepts an ``ISO 8601 Duration`` string as an argument (:issue:`19040`)
308308
- ``IntervalDtype`` now returns ``True`` when compared against ``'interval'`` regardless of subtype, and ``IntervalDtype.name`` now returns ``'interval'`` regardless of subtype (:issue:`18980`)
309+
- ``KeyError`` now raises instead of ``ValueError`` in :meth:`~DataFrame.drop`, :meth:`~Panel.drop`, :meth:`~Series.drop`, :meth:`~Index.drop` when dropping a non-existent element in an axis with duplicates (:issue:`19186`)
309310
- :func:`Series.to_csv` now accepts a ``compression`` argument that works in the same way as the ``compression`` argument in :func:`DataFrame.to_csv` (:issue:`18958`)
310311
- Addition or subtraction of ``NaT`` from :class:`TimedeltaIndex` will return ``TimedeltaIndex`` instead of ``DatetimeIndex`` (:issue:`19124`)
311312
- :func:`DatetimeIndex.shift` and :func:`TimedeltaIndex.shift` will now raise ``NullFrequencyError`` (which subclasses ``ValueError``, which was raised in older versions) when the index object frequency is ``None`` (:issue:`19147`)
313+
- Addition and subtraction of ``NaN`` from a :class:`Series` with ``dtype='timedelta64[ns]'`` will raise a ``TypeError` instead of treating the ``NaN`` as ``NaT`` (:issue:`19274`)
312314

313315
.. _whatsnew_0230.deprecations:
314316

@@ -426,11 +428,10 @@ Conversion
426428
- Bug in :class:`Index` multiplication and division methods where operating with a ``Series`` would return an ``Index`` object instead of a ``Series`` object (:issue:`19042`)
427429

428430

429-
-
430431
-
431432
- Bug in ``.astype()`` to non-ns timedelta units would hold the incorrect dtype (:issue:`19176`, :issue:`19223`, :issue:`12425`)
432433
- Bug in subtracting :class:`Series` from ``NaT`` incorrectly returning ``NaT`` (:issue:`19158`)
433-
434+
- Bug in comparison of timezone-aware :class:`DatetimeIndex` against ``NaT`` incorrectly raising ``TypeError`` (:issue:`19276`)
434435

435436
Indexing
436437
^^^^^^^^
@@ -455,16 +456,20 @@ Indexing
455456
- Bug in :func:`MultiIndex.set_labels` which would cause casting (and potentially clipping) of the new labels if the ``level`` argument is not 0 or a list like [0, 1, ... ] (:issue:`19057`)
456457
- Bug in ``str.extractall`` when there were no matches empty :class:`Index` was returned instead of appropriate :class:`MultiIndex` (:issue:`19034`)
457458
- Bug in :class:`IntervalIndex` where set operations that returned an empty ``IntervalIndex`` had the wrong dtype (:issue:`19101`)
459+
- Bug in :meth:`~DataFrame.drop`, :meth:`~Panel.drop`, :meth:`~Series.drop`, :meth:`~Index.drop` where no ``KeyError`` is raised when dropping a non-existent element from an axis that contains duplicates (:issue:`19186`)
460+
-
458461

459462
I/O
460463
^^^
461464

462465
- :func:`read_html` now rewinds seekable IO objects after parse failure, before attempting to parse with a new parser. If a parser errors and the object is non-seekable, an informative error is raised suggesting the use of a different parser (:issue:`17975`)
463466
- Bug in :func:`read_msgpack` with a non existent file is passed in Python 2 (:issue:`15296`)
464467
- Bug in :func:`read_csv` where a ``MultiIndex`` with duplicate columns was not being mangled appropriately (:issue:`18062`)
468+
- Bug in :func:`read_csv` where missing values were not being handled properly when ``keep_default_na=False`` with dictionary ``na_values`` (:issue:`19227`)
465469
- Bug in :func:`read_sas` where a file with 0 variables gave an ``AttributeError`` incorrectly. Now it gives an ``EmptyDataError`` (:issue:`18184`)
466470
- Bug in :func:`DataFrame.to_latex()` where pairs of braces meant to serve as invisible placeholders were escaped (:issue:`18667`)
467471
- Bug in :func:`read_json` where large numeric values were causing an ``OverflowError`` (:issue:`18842`)
472+
- Bug in :func:`DataFrame.to_parquet` where an exception was raised if the write destination is S3 (:issue:`19134`)
468473
-
469474

470475
Plotting
@@ -502,6 +507,7 @@ Reshaping
502507
- Bug in :func:`Dataframe.pivot_table` which fails when the ``aggfunc`` arg is of type string. The behavior is now consistent with other methods like ``agg`` and ``apply`` (:issue:`18713`)
503508
- Bug in :func:`DataFrame.merge` in which merging using ``Index`` objects as vectors raised an Exception (:issue:`19038`)
504509
- Bug in :func:`DataFrame.stack`, :func:`DataFrame.unstack`, :func:`Series.unstack` which were not returning subclasses (:issue:`15563`)
510+
- Bug in timezone comparisons, manifesting as a conversion of the index to UTC in ``.concat()`` (:issue:`18523`)
505511
-
506512

507513
Numeric

0 commit comments

Comments
 (0)