Skip to content

Commit 01ee13f

Browse files
Merge remote-tracking branch 'upstream/main' into string-dtype-categorical-repr
2 parents 200c336 + faf3bbb commit 01ee13f

Some content is hidden

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

47 files changed

+675
-265
lines changed

.github/workflows/docbuild-and-upload.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ jobs:
5757
run: python web/pandas_web.py web/pandas --target-path=web/build
5858

5959
- name: Build documentation
60-
# TEMP don't let errors fail the build until all string dtype changes are fixed
61-
continue-on-error: true
6260
run: doc/make.py --warnings-are-errors
6361

6462
- name: Build the interactive terminal

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
LANG: ${{ matrix.lang || 'C.UTF-8' }}
9292
LC_ALL: ${{ matrix.lc_all || '' }}
9393
PANDAS_CI: '1'
94-
PANDAS_FUTURE_INFER_STRING: ${{ matrix.pandas_future_infer_string || '0' }}
94+
PANDAS_FUTURE_INFER_STRING: ${{ matrix.pandas_future_infer_string || '1' }}
9595
TEST_ARGS: ${{ matrix.test_args || '' }}
9696
PYTEST_WORKERS: 'auto'
9797
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}

ci/code_checks.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7474
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
7575
-i "pandas.Period.freq GL08" \
7676
-i "pandas.Period.ordinal GL08" \
77+
-i "pandas.errors.IncompatibleFrequency SA01,SS06,EX01" \
7778
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
7879
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
7980
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \

doc/source/development/maintaining.rst

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,11 @@ Pre-release
388388

389389
3. Make sure the CI is green for the last commit of the branch being released.
390390

391-
4. If not a release candidate, make sure all backporting pull requests to the branch
392-
being released are merged.
391+
4. If not a release candidate, make sure all backporting pull requests to the
392+
branch being released are merged, and no merged pull requests are missing a
393+
backport (check the
394+
["Still Needs Manual Backport"](https://github.com/pandas-dev/pandas/labels/Still%20Needs%20Manual%20Backport)
395+
label for this).
393396

394397
5. Create a new issue and milestone for the version after the one being released.
395398
If the release was a release candidate, we would usually want to create issues and
@@ -435,6 +438,9 @@ which will be triggered when the tag is pushed.
435438

436439
scripts/download_wheels.sh <VERSION>
437440

441+
ATTENTION: this is currently not downloading *all* wheels, and you have to
442+
manually download the remainings wheels and sdist!
443+
438444
4. Create a `new GitHub release <https://github.com/pandas-dev/pandas/releases/new>`_:
439445

440446
- Tag: ``<version>``
@@ -462,15 +468,22 @@ Post-Release
462468
````````````
463469

464470
1. Update symlinks to stable documentation by logging in to our web server, and
465-
editing ``/var/www/html/pandas-docs/stable`` to point to ``version/<latest-version>``
466-
for major and minor releases, or ``version/<minor>`` to ``version/<patch>`` for
471+
editing ``/var/www/html/pandas-docs/stable`` to point to ``version/<X.Y>``
472+
for major and minor releases, or ``version/<X.Y>`` to ``version/<patch>`` for
467473
patch releases. The exact instructions are (replace the example version numbers by
468474
the appropriate ones for the version you are releasing):
469475

470476
- Log in to the server and use the correct user.
471477
- ``cd /var/www/html/pandas-docs/``
472-
- ``ln -sfn version/2.1 stable`` (for a major or minor release)
473-
- ``ln -sfn version/2.0.3 version/2.0`` (for a patch release)
478+
- For a major or minor release (assuming the ``/version/2.1.0/`` docs have been uploaded to the server):
479+
480+
- Create a new X.Y symlink to X.Y.Z: ``cd version; ln -sfn 2.1.0 2.1``
481+
- Update stable symlink to point to X.Y: ``ln -sfn version/2.1 stable``
482+
483+
- For a patch release (assuming the ``/version/2.1.3/`` docs have been uploaded to the server):
484+
485+
- Update the X.Y symlink to the new X.Y.Z patch version: ``cd version; ln -sfn 2.1.3 2.1``
486+
- (the stable symlink should already be pointing to the correct X.Y version)
474487

475488
2. If releasing a major or minor release, open a PR in our source code to update
476489
``web/pandas/versions.json``, to have the desired versions in the documentation

doc/source/reference/testing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Exceptions and warnings
3636
errors.DuplicateLabelError
3737
errors.EmptyDataError
3838
errors.IncompatibilityWarning
39+
errors.IncompatibleFrequency
3940
errors.IndexingError
4041
errors.InvalidColumnName
4142
errors.InvalidComparison

doc/source/user_guide/basics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ arguments. The special value ``all`` can also be used:
590590

591591
.. ipython:: python
592592
593-
frame.describe(include=["object"])
593+
frame.describe(include=["str"])
594594
frame.describe(include=["number"])
595595
frame.describe(include="all")
596596

doc/source/whatsnew/v0.13.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ API changes
184184
.. ipython:: python
185185
:okwarning:
186186
187-
dfc.loc[0]['A'] = 1111
187+
dfc.loc[0]['B'] = 1111
188188
189189
::
190190

@@ -198,7 +198,7 @@ API changes
198198

199199
.. ipython:: python
200200
201-
dfc.loc[0, 'A'] = 11
201+
dfc.loc[0, 'B'] = 1111
202202
dfc
203203
204204
- ``Panel.reindex`` has the following call signature ``Panel.reindex(items=None, major_axis=None, minor_axis=None, **kwargs)``

doc/source/whatsnew/v0.15.0.rst

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,20 +1025,49 @@ Other:
10251025
- :func:`describe` on mixed-types DataFrames is more flexible. Type-based column filtering is now possible via the ``include``/``exclude`` arguments.
10261026
See the :ref:`docs <basics.describe>` (:issue:`8164`).
10271027

1028-
.. ipython:: python
1028+
.. code-block:: python
10291029
1030-
df = pd.DataFrame({'catA': ['foo', 'foo', 'bar'] * 8,
1031-
'catB': ['a', 'b', 'c', 'd'] * 6,
1032-
'numC': np.arange(24),
1033-
'numD': np.arange(24.) + .5})
1034-
df.describe(include=["object"])
1035-
df.describe(include=["number", "object"], exclude=["float"])
1030+
>>> df = pd.DataFrame({'catA': ['foo', 'foo', 'bar'] * 8,
1031+
... 'catB': ['a', 'b', 'c', 'd'] * 6,
1032+
... 'numC': np.arange(24),
1033+
... 'numD': np.arange(24.) + .5})
1034+
>>> df.describe(include=["object"])
1035+
catA catB
1036+
count 24 24
1037+
unique 2 4
1038+
top foo a
1039+
freq 16 6
1040+
>>> df.describe(include=["number", "object"], exclude=["float"])
1041+
catA catB numC
1042+
count 24 24 24.000000
1043+
unique 2 4 NaN
1044+
top foo a NaN
1045+
freq 16 6 NaN
1046+
mean NaN NaN 11.500000
1047+
std NaN NaN 7.071068
1048+
min NaN NaN 0.000000
1049+
25% NaN NaN 5.750000
1050+
50% NaN NaN 11.500000
1051+
75% NaN NaN 17.250000
1052+
max NaN NaN 23.000000
10361053
10371054
Requesting all columns is possible with the shorthand 'all'
10381055

1039-
.. ipython:: python
1056+
.. code-block:: python
10401057
1041-
df.describe(include='all')
1058+
>>> df.describe(include='all')
1059+
catA catB numC numD
1060+
count 24 24 24.000000 24.000000
1061+
unique 2 4 NaN NaN
1062+
top foo a NaN NaN
1063+
freq 16 6 NaN NaN
1064+
mean NaN NaN 11.500000 12.000000
1065+
std NaN NaN 7.071068 7.071068
1066+
min NaN NaN 0.000000 0.500000
1067+
25% NaN NaN 5.750000 6.250000
1068+
50% NaN NaN 11.500000 12.000000
1069+
75% NaN NaN 17.250000 17.750000
1070+
max NaN NaN 23.000000 23.500000
10421071
10431072
Without those arguments, ``describe`` will behave as before, including only numerical columns or, if none are, only categorical columns. See also the :ref:`docs <basics.describe>`
10441073

doc/source/whatsnew/v3.0.0.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _whatsnew_300:
22

3-
What's new in 3.0.0 (Month XX, 2024)
3+
What's new in 3.0.0 (Month XX, 2025)
44
------------------------------------
55

66
These are the changes in pandas 3.0.0. See :ref:`release` for a full changelog
@@ -414,6 +414,7 @@ Other API changes
414414
- Index set operations (like union or intersection) will now ignore the dtype of
415415
an empty ``RangeIndex`` or empty ``Index`` with object dtype when determining
416416
the dtype of the resulting Index (:issue:`60797`)
417+
- :class:`IncompatibleFrequency` now subclasses ``TypeError`` instead of ``ValueError``. As a result, joins with mismatched frequencies now cast to object like other non-comparable joins, and arithmetic with indexes with mismatched frequencies align (:issue:`55782`)
417418
- Comparison operations between :class:`Index` and :class:`Series` now consistently return :class:`Series` regardless of which object is on the left or right (:issue:`36759`)
418419
- Numpy functions like ``np.isinf`` that return a bool dtype when called on a :class:`Index` object now return a bool-dtype :class:`Index` instead of ``np.ndarray`` (:issue:`52676`)
419420

@@ -456,6 +457,7 @@ Other Deprecations
456457
- Deprecated :meth:`.DataFrameGroupby.corrwith` (:issue:`57158`)
457458
- Deprecated :meth:`Timestamp.utcfromtimestamp`, use ``Timestamp.fromtimestamp(ts, "UTC")`` instead (:issue:`56680`)
458459
- Deprecated :meth:`Timestamp.utcnow`, use ``Timestamp.now("UTC")`` instead (:issue:`56680`)
460+
- Deprecated ``pd.core.internals.api.maybe_infer_ndim`` (:issue:`40226`)
459461
- Deprecated allowing non-keyword arguments in :meth:`DataFrame.all`, :meth:`DataFrame.min`, :meth:`DataFrame.max`, :meth:`DataFrame.sum`, :meth:`DataFrame.prod`, :meth:`DataFrame.mean`, :meth:`DataFrame.median`, :meth:`DataFrame.sem`, :meth:`DataFrame.var`, :meth:`DataFrame.std`, :meth:`DataFrame.skew`, :meth:`DataFrame.kurt`, :meth:`Series.all`, :meth:`Series.min`, :meth:`Series.max`, :meth:`Series.sum`, :meth:`Series.prod`, :meth:`Series.mean`, :meth:`Series.median`, :meth:`Series.sem`, :meth:`Series.var`, :meth:`Series.std`, :meth:`Series.skew`, and :meth:`Series.kurt`. (:issue:`57087`)
460462
- Deprecated allowing non-keyword arguments in :meth:`Series.to_markdown` except ``buf``. (:issue:`57280`)
461463
- Deprecated allowing non-keyword arguments in :meth:`Series.to_string` except ``buf``. (:issue:`57280`)
@@ -694,6 +696,7 @@ Datetimelike
694696
- Bug in :attr:`is_year_start` where a DateTimeIndex constructed via a date_range with frequency 'MS' wouldn't have the correct year or quarter start attributes (:issue:`57377`)
695697
- Bug in :class:`DataFrame` raising ``ValueError`` when ``dtype`` is ``timedelta64`` and ``data`` is a list containing ``None`` (:issue:`60064`)
696698
- Bug in :class:`Timestamp` constructor failing to raise when ``tz=None`` is explicitly specified in conjunction with timezone-aware ``tzinfo`` or data (:issue:`48688`)
699+
- Bug in :class:`Timestamp` constructor failing to raise when given a ``np.datetime64`` object with non-standard unit (:issue:`25611`)
697700
- Bug in :func:`date_range` where the last valid timestamp would sometimes not be produced (:issue:`56134`)
698701
- Bug in :func:`date_range` where using a negative frequency value would not include all points between the start and end values (:issue:`56147`)
699702
- Bug in :func:`tseries.api.guess_datetime_format` would fail to infer time format when "%Y" == "%H%M" (:issue:`57452`)

pandas/_libs/groupby.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def group_sum(
6767
result_mask: np.ndarray | None = ...,
6868
min_count: int = ...,
6969
is_datetimelike: bool = ...,
70+
initial: object = ...,
7071
skipna: bool = ...,
7172
) -> None: ...
7273
def group_prod(

0 commit comments

Comments
 (0)