Skip to content

Commit 411b403

Browse files
committed
DOC: fix merge conflicts
2 parents d0a88e3 + 00a7c41 commit 411b403

File tree

84 files changed

+1193
-763
lines changed

Some content is hidden

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

84 files changed

+1193
-763
lines changed

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,7 @@ jobs:
320320
strategy:
321321
fail-fast: false
322322
matrix:
323-
# Separate out macOS 13 and 14, since macOS 14 is arm64 only
324-
os: [ubuntu-24.04, macOS-13, macOS-14, windows-2025]
323+
os: [ubuntu-24.04, macos-15-intel, macos-15, windows-2025]
325324

326325
timeout-minutes: 90
327326

doc/source/getting_started/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ index from the PyPI registry of anaconda.org. You can install it by running.
112112

113113
.. code-block:: shell
114114
115-
pip install --pre --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas
115+
pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas
116116
117117
.. note::
118118
You might be required to uninstall an existing version of pandas to install the development version.

doc/source/user_guide/io.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ compression : {``'infer'``, ``'gzip'``, ``'bz2'``, ``'zip'``, ``'xz'``, ``'zstd'
303303
As an example, the following could be passed for faster compression and to
304304
create a reproducible gzip archive:
305305
``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``.
306-
307-
.. versionchanged:: 1.2.0 Previous versions forwarded dict entries for 'gzip' to ``gzip.open``.
308306
thousands : str, default ``None``
309307
Thousands separator.
310308
decimal : str, default ``'.'``
@@ -1472,7 +1470,7 @@ rather than reading the entire file into memory, such as the following:
14721470
table
14731471
14741472
1475-
By specifying a ``chunksize`` to ``read_csv``, the return
1473+
By specifying a ``chunksize`` to :func:`read_csv` as a context manager, the return
14761474
value will be an iterable object of type ``TextFileReader``:
14771475

14781476
.. ipython:: python
@@ -1482,10 +1480,6 @@ value will be an iterable object of type ``TextFileReader``:
14821480
for chunk in reader:
14831481
print(chunk)
14841482
1485-
.. versionchanged:: 1.2
1486-
1487-
``read_csv/json/sas`` return a context-manager when iterating through a file.
1488-
14891483
Specifying ``iterator=True`` will also return the ``TextFileReader`` object:
14901484

14911485
.. ipython:: python

doc/source/user_guide/visualization.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,6 @@ The ``by`` keyword can be specified to plot grouped histograms:
326326
327327
In addition, the ``by`` keyword can also be specified in :meth:`DataFrame.plot.hist`.
328328

329-
.. versionchanged:: 1.4.0
330-
331329
.. ipython:: python
332330
333331
data = pd.DataFrame(
@@ -480,8 +478,6 @@ columns:
480478
481479
You could also create groupings with :meth:`DataFrame.plot.box`, for instance:
482480

483-
.. versionchanged:: 1.4.0
484-
485481
.. ipython:: python
486482
:suppress:
487483

doc/source/whatsnew/v3.0.0.rst

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,71 @@ In cases with mixed-resolution inputs, the highest resolution is used:
374374
In [2]: pd.to_datetime([pd.Timestamp("2024-03-22 11:43:01"), "2024-03-22 11:43:01.002"]).dtype
375375
Out[2]: dtype('<M8[ns]')
376376
377+
.. _whatsnew_300.api_breaking.concat_datetime_sorting:
378+
379+
:func:`concat` no longer ignores ``sort`` when all objects have a :class:`DatetimeIndex`
380+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
381+
382+
When all objects passed to :func:`concat` have a :class:`DatetimeIndex`,
383+
passing ``sort=False`` will now result in the non-concatenation axis not
384+
being sorted. Previously, the result would always be sorted along
385+
the non-concatenation axis even when ``sort=False`` is passed. :issue:`57335`
386+
387+
If you do not specify the ``sort`` argument, pandas will continue to return a
388+
sorted result but this behavior is deprecated and you will receive a warning.
389+
In order to make this less noisy for users, pandas checks if not sorting would
390+
impact the result and only warns when it would. This check can be expensive,
391+
and users can skip the check by explicitly specifying ``sort=True`` or
392+
``sort=False``.
393+
394+
This deprecation can also impact pandas' internal usage of :func:`concat`.
395+
Here cases where :func:`concat` was sorting a :class:`DatetimeIndex` but not
396+
other indexes are considered bugs and have been fixed as noted below. However
397+
it is possible some have been missed. In order to be cautious here, pandas has *not*
398+
added ``sort=False`` to any internal calls where we believe behavior should not change.
399+
If we have missed something, users will not experience a behavior change but they
400+
will receive a warning about :func:`concat` even though they are not directly
401+
calling this function. If this does occur, we ask users to open an issue so that
402+
we may address any potential behavior changes.
403+
404+
.. ipython:: python
405+
406+
idx1 = pd.date_range("2025-01-02", periods=3, freq="h")
407+
df1 = pd.DataFrame({"a": [1, 2, 3]}, index=idx1)
408+
df1
409+
410+
idx2 = pd.date_range("2025-01-01", periods=3, freq="h")
411+
df2 = pd.DataFrame({"b": [1, 2, 3]}, index=idx2)
412+
df2
413+
414+
*Old behavior*
415+
416+
.. code-block:: ipython
417+
418+
In [3]: pd.concat([df1, df2], axis=1, sort=False)
419+
Out[3]:
420+
a b
421+
2025-01-01 00:00:00 NaN 1.0
422+
2025-01-01 01:00:00 NaN 2.0
423+
2025-01-01 02:00:00 NaN 3.0
424+
2025-01-02 00:00:00 1.0 NaN
425+
2025-01-02 01:00:00 2.0 NaN
426+
2025-01-02 02:00:00 3.0 NaN
427+
428+
*New behavior*
429+
430+
.. ipython:: python
431+
432+
pd.concat([df1, df2], axis=1, sort=False)
433+
434+
Cases where pandas' internal usage of :func:`concat` resulted in inconsistent sorting
435+
that are now fixed in this release are as follows.
436+
437+
- :meth:`Series.apply` and :meth:`DataFrame.apply` with a list-like or dict-like ``func`` argument.
438+
- :meth:`Series.shift`, :meth:`DataFrame.shift`, :meth:`.SeriesGroupBy.shift`, :meth:`.DataFrameGroupBy.shift` with the ``periods`` argument a list of length greater than 1.
439+
- :meth:`DataFrame.join` with ``other`` a list of one or more Series or DataFrames and ``how="inner"``, ``how="left"``, or ``how="right"``.
440+
- :meth:`Series.str.cat` with ``others`` a Series or DataFrame.
441+
377442
.. _whatsnew_300.api_breaking.value_counts_sorting:
378443

379444
Changed behavior in :meth:`DataFrame.value_counts` and :meth:`DataFrameGroupBy.value_counts` when ``sort=False``
@@ -740,7 +805,9 @@ Other Deprecations
740805
- Deprecated allowing strings representing full dates in :meth:`DataFrame.at_time` and :meth:`Series.at_time` (:issue:`50839`)
741806
- Deprecated backward-compatibility behavior for :meth:`DataFrame.select_dtypes` matching "str" dtype when ``np.object_`` is specified (:issue:`61916`)
742807
- Deprecated option "future.no_silent_downcasting", as it is no longer used. In a future version accessing this option will raise (:issue:`59502`)
808+
- Deprecated passing non-Index types to :meth:`Index.join`; explicitly convert to Index first (:issue:`62897`)
743809
- Deprecated silent casting of non-datetime 'other' to datetime in :meth:`Series.combine_first` (:issue:`62931`)
810+
- Deprecated silently casting strings to :class:`Timedelta` in binary operations with :class:`Timedelta` (:issue:`59653`)
744811
- Deprecated slicing on a :class:`Series` or :class:`DataFrame` with a :class:`DatetimeIndex` using a ``datetime.date`` object, explicitly cast to :class:`Timestamp` instead (:issue:`35830`)
745812
- Deprecated support for the Dataframe Interchange Protocol (:issue:`56732`)
746813
- Deprecated the 'inplace' keyword from :meth:`Resampler.interpolate`, as passing ``True`` raises ``AttributeError`` (:issue:`58690`)
@@ -1016,6 +1083,7 @@ Timedelta
10161083
- Bug in :class:`Timedelta` constructor failing to raise when passed an invalid keyword (:issue:`53801`)
10171084
- Bug in :meth:`DataFrame.cumsum` which was raising ``IndexError`` if dtype is ``timedelta64[ns]`` (:issue:`57956`)
10181085
- Bug in multiplication operations with ``timedelta64`` dtype failing to raise ``TypeError`` when multiplying by ``bool`` objects or dtypes (:issue:`58054`)
1086+
- Bug in multiplication operations with ``timedelta64`` dtype incorrectly raising when multiplying by numpy-nullable dtypes or pyarrow integer dtypes (:issue:`58054`)
10191087

10201088
Timezones
10211089
^^^^^^^^^
@@ -1065,6 +1133,7 @@ Indexing
10651133
^^^^^^^^
10661134
- Bug in :meth:`DataFrame.__getitem__` returning modified columns when called with ``slice`` in Python 3.12 (:issue:`57500`)
10671135
- Bug in :meth:`DataFrame.__getitem__` when slicing a :class:`DataFrame` with many rows raised an ``OverflowError`` (:issue:`59531`)
1136+
- Bug in :meth:`DataFrame.__setitem__` on an empty :class:`DataFrame` with a tuple corrupting the frame (:issue:`54385`)
10681137
- Bug in :meth:`DataFrame.from_records` throwing a ``ValueError`` when passed an empty list in ``index`` (:issue:`58594`)
10691138
- Bug in :meth:`DataFrame.loc` and :meth:`DataFrame.iloc` returning incorrect dtype when selecting from a :class:`DataFrame` with mixed data types. (:issue:`60600`)
10701139
- Bug in :meth:`DataFrame.loc` with inconsistent behavior of loc-set with 2 given indexes to Series (:issue:`59933`)
@@ -1187,6 +1256,7 @@ Groupby/resample/rolling
11871256
- Bug in :meth:`DataFrameGroupby.transform` and :meth:`SeriesGroupby.transform` with a reducer and ``observed=False`` that coerces dtype to float when there are unobserved categories. (:issue:`55326`)
11881257
- Bug in :meth:`Rolling.apply` for ``method="table"`` where column order was not being respected due to the columns getting sorted by default. (:issue:`59666`)
11891258
- Bug in :meth:`Rolling.apply` where the applied function could be called on fewer than ``min_period`` periods if ``method="table"``. (:issue:`58868`)
1259+
- Bug in :meth:`Rolling.skew` incorrectly computing skewness for windows following outliers due to numerical instability. The calculation now properly handles catastrophic cancellation by recomputing affected windows (:issue:`47461`)
11901260
- Bug in :meth:`Series.resample` could raise when the date range ended shortly before a non-existent time. (:issue:`58380`)
11911261
- Bug in :meth:`Series.resample` raising error when resampling non-nanosecond resolutions out of bounds for nanosecond precision (:issue:`57427`)
11921262

@@ -1199,6 +1269,7 @@ Reshaping
11991269
- Bug in :meth:`DataFrame.combine` with non-unique columns incorrectly raising (:issue:`51340`)
12001270
- Bug in :meth:`DataFrame.explode` producing incorrect result for :class:`pyarrow.large_list` type (:issue:`61091`)
12011271
- Bug in :meth:`DataFrame.join` inconsistently setting result index name (:issue:`55815`)
1272+
- Bug in :meth:`DataFrame.join` not producing the correct row order when joining with a list of Series/DataFrames (:issue:`62954`)
12021273
- Bug in :meth:`DataFrame.join` when a :class:`DataFrame` with a :class:`MultiIndex` would raise an ``AssertionError`` when :attr:`MultiIndex.names` contained ``None``. (:issue:`58721`)
12031274
- Bug in :meth:`DataFrame.merge` where merging on a column containing only ``NaN`` values resulted in an out-of-bounds array access (:issue:`59421`)
12041275
- Bug in :meth:`Series.combine_first` incorrectly replacing ``None`` entries with ``NaN`` (:issue:`58977`)

0 commit comments

Comments
 (0)