Skip to content

Commit 6ef0f74

Browse files
Merge remote-tracking branch 'upstream/main' into string-dtype-index-union-with-empty-object
2 parents 3425948 + e557039 commit 6ef0f74

Some content is hidden

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

57 files changed

+702
-191
lines changed

doc/source/user_guide/cookbook.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ CSV
10431043

10441044
The :ref:`CSV <io.read_csv_table>` docs
10451045

1046-
`read_csv in action <https://wesmckinney.com/blog/update-on-upcoming-pandas-v0-10-new-file-parser-other-performance-wins/>`__
1046+
`read_csv in action <https://www.datacamp.com/tutorial/pandas-read-csv>`__
10471047

10481048
`appending to a csv
10491049
<https://stackoverflow.com/questions/17134942/pandas-dataframe-output-end-of-csv>`__

doc/source/user_guide/enhancingperf.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ prefer that Numba throw an error if it cannot compile a function in a way that
427427
speeds up your code, pass Numba the argument
428428
``nopython=True`` (e.g. ``@jit(nopython=True)``). For more on
429429
troubleshooting Numba modes, see the `Numba troubleshooting page
430-
<https://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#the-compiled-code-is-too-slow>`__.
430+
<https://numba.readthedocs.io/en/stable/user/troubleshoot.html>`__.
431431

432432
Using ``parallel=True`` (e.g. ``@jit(parallel=True)``) may result in a ``SIGABRT`` if the threading layer leads to unsafe
433433
behavior. You can first `specify a safe threading layer <https://numba.readthedocs.io/en/stable/user/threading-layer.html#selecting-a-threading-layer-for-safe-parallel-execution>`__

doc/source/user_guide/groupby.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ You can also include the grouping columns if you want to operate on them.
418418
419419
.. note::
420420

421-
The ``groupby`` operation in Pandas drops the ``name`` field of the columns Index object
421+
The ``groupby`` operation in pandas drops the ``name`` field of the columns Index object
422422
after the operation. This change ensures consistency in syntax between different
423423
column selection methods within groupby operations.
424424

doc/source/user_guide/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ Thousand separators
990990

991991
For large numbers that have been written with a thousands separator, you can
992992
set the ``thousands`` keyword to a string of length 1 so that integers will be parsed
993-
correctly:
993+
correctly.
994994

995995
By default, numbers with a thousands separator will be parsed as strings:
996996

doc/source/user_guide/merging.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ A string argument to ``indicator`` will use the value as the name for the indica
586586
Overlapping value columns
587587
~~~~~~~~~~~~~~~~~~~~~~~~~
588588

589-
The merge ``suffixes`` argument takes a tuple of list of strings to append to
589+
The merge ``suffixes`` argument takes a tuple or list of strings to append to
590590
overlapping column names in the input :class:`DataFrame` to disambiguate the result
591591
columns:
592592

@@ -979,7 +979,7 @@ nearest key rather than equal keys. For each row in the ``left`` :class:`DataFra
979979
the last row in the ``right`` :class:`DataFrame` are selected where the ``on`` key is less
980980
than the left's key. Both :class:`DataFrame` must be sorted by the key.
981981

982-
Optionally an :func:`merge_asof` can perform a group-wise merge by matching the
982+
Optionally :func:`merge_asof` can perform a group-wise merge by matching the
983983
``by`` key in addition to the nearest match on the ``on`` key.
984984

985985
.. ipython:: python

doc/source/user_guide/pyarrow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Data Structure Integration
2222

2323
A :class:`Series`, :class:`Index`, or the columns of a :class:`DataFrame` can be directly backed by a :external+pyarrow:py:class:`pyarrow.ChunkedArray`
2424
which is similar to a NumPy array. To construct these from the main pandas data structures, you can pass in a string of the type followed by
25-
``[pyarrow]``, e.g. ``"int64[pyarrow]""`` into the ``dtype`` parameter
25+
``[pyarrow]``, e.g. ``"int64[pyarrow]"`` into the ``dtype`` parameter
2626

2727
.. ipython:: python
2828

doc/source/user_guide/scale.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Scaling to large datasets
55
*************************
66

77
pandas provides data structures for in-memory analytics, which makes using pandas
8-
to analyze datasets that are larger than memory datasets somewhat tricky. Even datasets
8+
to analyze datasets that are larger than memory somewhat tricky. Even datasets
99
that are a sizable fraction of memory become unwieldy, as some pandas operations need
1010
to make intermediate copies.
1111

doc/source/user_guide/timeseries.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ the pandas objects.
15801580
ts = ts[:5]
15811581
ts.shift(1)
15821582
1583-
The ``shift`` method accepts an ``freq`` argument which can accept a
1583+
The ``shift`` method accepts a ``freq`` argument which can accept a
15841584
``DateOffset`` class or other ``timedelta``-like object or also an
15851585
:ref:`offset alias <timeseries.offset_aliases>`.
15861586

@@ -2570,7 +2570,7 @@ because daylight savings time (DST) in a local time zone causes some times to oc
25702570
twice within one day ("clocks fall back"). The following options are available:
25712571

25722572
* ``'raise'``: Raises a ``ValueError`` (the default behavior)
2573-
* ``'infer'``: Attempt to determine the correct offset base on the monotonicity of the timestamps
2573+
* ``'infer'``: Attempt to determine the correct offset based on the monotonicity of the timestamps
25742574
* ``'NaT'``: Replaces ambiguous times with ``NaT``
25752575
* ``bool``: ``True`` represents a DST time, ``False`` represents non-DST time. An array-like of ``bool`` values is supported for a sequence of times.
25762576

doc/source/whatsnew/v3.0.0.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Other enhancements
3535
- :class:`pandas.api.typing.NoDefault` is available for typing ``no_default``
3636
- :func:`DataFrame.to_excel` now raises an ``UserWarning`` when the character count in a cell exceeds Excel's limitation of 32767 characters (:issue:`56954`)
3737
- :func:`pandas.merge` now validates the ``how`` parameter input (merge type) (:issue:`59435`)
38+
- :func:`pandas.merge`, :meth:`DataFrame.merge` and :meth:`DataFrame.join` now support anti joins (``left_anti`` and ``right_anti``) in the ``how`` parameter (:issue:`42916`)
3839
- :func:`read_spss` now supports kwargs to be passed to pyreadstat (:issue:`56356`)
3940
- :func:`read_stata` now returns ``datetime64`` resolutions better matching those natively stored in the stata format (:issue:`55642`)
4041
- :meth:`DataFrame.agg` called with ``axis=1`` and a ``func`` which relabels the result index now raises a ``NotImplementedError`` (:issue:`58807`).
@@ -68,6 +69,7 @@ Other enhancements
6869
- :meth:`Series.map` can now accept kwargs to pass on to func (:issue:`59814`)
6970
- :meth:`Series.str.get_dummies` now accepts a ``dtype`` parameter to specify the dtype of the resulting DataFrame (:issue:`47872`)
7071
- :meth:`pandas.concat` will raise a ``ValueError`` when ``ignore_index=True`` and ``keys`` is not ``None`` (:issue:`59274`)
72+
- :py:class:`frozenset` elements in pandas objects are now natively printed (:issue:`60690`)
7173
- Implemented :meth:`Series.str.isascii` and :meth:`Series.str.isascii` (:issue:`59091`)
7274
- Multiplying two :class:`DateOffset` objects will now raise a ``TypeError`` instead of a ``RecursionError`` (:issue:`59442`)
7375
- Restore support for reading Stata 104-format and enable reading 103-format dta files (:issue:`58554`)
@@ -631,6 +633,7 @@ Datetimelike
631633
- Bug in :func:`date_range` where using a negative frequency value would not include all points between the start and end values (:issue:`56147`)
632634
- Bug in :func:`tseries.api.guess_datetime_format` would fail to infer time format when "%Y" == "%H%M" (:issue:`57452`)
633635
- Bug in :func:`tseries.frequencies.to_offset` would fail to parse frequency strings starting with "LWOM" (:issue:`59218`)
636+
- Bug in :meth:`DataFrame.min` and :meth:`DataFrame.max` casting ``datetime64`` and ``timedelta64`` columns to ``float64`` and losing precision (:issue:`60850`)
634637
- Bug in :meth:`Dataframe.agg` with df with missing values resulting in IndexError (:issue:`58810`)
635638
- Bug in :meth:`DatetimeIndex.is_year_start` and :meth:`DatetimeIndex.is_quarter_start` does not raise on Custom business days frequencies bigger then "1C" (:issue:`58664`)
636639
- Bug in :meth:`DatetimeIndex.is_year_start` and :meth:`DatetimeIndex.is_quarter_start` returning ``False`` on double-digit frequencies (:issue:`58523`)
@@ -790,6 +793,7 @@ Styler
790793
Other
791794
^^^^^
792795
- Bug in :class:`DataFrame` when passing a ``dict`` with a NA scalar and ``columns`` that would always return ``np.nan`` (:issue:`57205`)
796+
- Bug in :class:`Series` ignoring errors when trying to convert :class:`Series` input data to the given ``dtype`` (:issue:`60728`)
793797
- Bug in :func:`eval` on :class:`ExtensionArray` on including division ``/`` failed with a ``TypeError``. (:issue:`58748`)
794798
- Bug in :func:`eval` where the names of the :class:`Series` were not preserved when using ``engine="numexpr"``. (:issue:`10239`)
795799
- Bug in :func:`eval` with ``engine="numexpr"`` returning unexpected result for float division. (:issue:`59736`)

pandas/_config/config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ def get_option(pat: str) -> Any:
141141
"""
142142
Retrieve the value of the specified option.
143143
144+
This method allows users to query the current value of a given option
145+
in the pandas configuration system. Options control various display,
146+
performance, and behavior-related settings within pandas.
147+
144148
Parameters
145149
----------
146150
pat : str
@@ -429,6 +433,11 @@ def option_context(*args) -> Generator[None]:
429433
"""
430434
Context manager to temporarily set options in a ``with`` statement.
431435
436+
This method allows users to set one or more pandas options temporarily
437+
within a controlled block. The previous options' values are restored
438+
once the block is exited. This is useful when making temporary adjustments
439+
to pandas' behavior without affecting the global state.
440+
432441
Parameters
433442
----------
434443
*args : str | object

0 commit comments

Comments
 (0)