Skip to content

Commit fe52a7a

Browse files
Merge branch 'main' into fix-59242
2 parents bcb7e3d + e557039 commit fe52a7a

File tree

14 files changed

+54
-26
lines changed

14 files changed

+54
-26
lines changed

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/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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ Styler
793793
Other
794794
^^^^^
795795
- 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`)
796797
- Bug in :func:`eval` on :class:`ExtensionArray` on including division ``/`` failed with a ``TypeError``. (:issue:`58748`)
797798
- Bug in :func:`eval` where the names of the :class:`Series` were not preserved when using ``engine="numexpr"``. (:issue:`10239`)
798799
- Bug in :func:`eval` with ``engine="numexpr"`` returning unexpected result for float division. (:issue:`59736`)

pandas/_config/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,11 @@ def option_context(*args) -> Generator[None]:
433433
"""
434434
Context manager to temporarily set options in a ``with`` statement.
435435
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+
436441
Parameters
437442
----------
438443
*args : str | object

pandas/_libs/tslibs/period.pyx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2842,6 +2842,11 @@ class Period(_Period):
28422842
"""
28432843
Represents a period of time.
28442844
2845+
A `Period` represents a specific time span rather than a point in time.
2846+
Unlike `Timestamp`, which represents a single instant, a `Period` defines a
2847+
duration, such as a month, quarter, or year. The exact representation is
2848+
determined by the `freq` parameter.
2849+
28452850
Parameters
28462851
----------
28472852
value : Period, str, datetime, date or pandas.Timestamp, default None

pandas/core/construction.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ def array(
8181
"""
8282
Create an array.
8383
84+
This method constructs an array using pandas extension types when possible.
85+
If `dtype` is specified, it determines the type of array returned. Otherwise,
86+
pandas attempts to infer the appropriate dtype based on `data`.
87+
8488
Parameters
8589
----------
8690
data : Sequence of objects

pandas/core/frame.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,10 @@ def shape(self) -> tuple[int, int]:
10211021
"""
10221022
Return a tuple representing the dimensionality of the DataFrame.
10231023
1024+
Unlike the `len()` method, which only returns the number of rows, `shape`
1025+
provides both row and column counts, making it a more informative method for
1026+
understanding dataset size.
1027+
10241028
See Also
10251029
--------
10261030
numpy.ndarray.shape : Tuple of array dimensions.

0 commit comments

Comments
 (0)