Skip to content

Commit 5b850ac

Browse files
committed
Merge branch 'main' into 37715-remove-mypy-ignore
2 parents c861a74 + 2e0c8a4 commit 5b850ac

35 files changed

+81
-40
lines changed

ci/code_checks.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
524524
pandas.api.extensions.ExtensionArray.insert \
525525
pandas.api.extensions.ExtensionArray.isin \
526526
pandas.api.extensions.ExtensionArray.isna \
527+
pandas.api.extensions.ExtensionArray.map \
527528
pandas.api.extensions.ExtensionArray.ravel \
528529
pandas.api.extensions.ExtensionArray.searchsorted \
529530
pandas.api.extensions.ExtensionArray.shift \

doc/source/getting_started/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ Data sets do not only contain numerical data. pandas provides a wide range of fu
533533
Coming from...
534534
--------------
535535

536-
Are you familiar with other software for manipulating tablular data? Learn
536+
Are you familiar with other software for manipulating tabular data? Learn
537537
the pandas-equivalent operations compared to software you already know:
538538

539539
.. panels::

doc/source/reference/extensions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ objects.
5353
api.extensions.ExtensionArray.insert
5454
api.extensions.ExtensionArray.isin
5555
api.extensions.ExtensionArray.isna
56+
api.extensions.ExtensionArray.map
5657
api.extensions.ExtensionArray.ravel
5758
api.extensions.ExtensionArray.repeat
5859
api.extensions.ExtensionArray.searchsorted

doc/source/user_guide/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ As usual, **both sides** of the slicers are included as this is label indexing.
322322
.. warning::
323323

324324
You should specify all axes in the ``.loc`` specifier, meaning the indexer for the **index** and
325-
for the **columns**. There are some ambiguous cases where the passed indexer could be mis-interpreted
325+
for the **columns**. There are some ambiguous cases where the passed indexer could be misinterpreted
326326
  as indexing *both* axes, rather than into say the ``MultiIndex`` for the rows.
327327

328328
You should do this:

doc/source/user_guide/groupby.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ the columns except the one we specify:
149149
grouped.sum()
150150
151151
The above GroupBy will split the DataFrame on its index (rows). To split by columns, first do
152-
a tranpose:
152+
a transpose:
153153

154154
.. ipython::
155155

doc/source/user_guide/timeseries.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,14 +507,18 @@ used if a custom frequency string is passed.
507507
Timestamp limitations
508508
---------------------
509509

510-
Since pandas represents timestamps in nanosecond resolution, the time span that
510+
The limits of timestamp representation depend on the chosen resolution. For
511+
nanosecond resolution, the time span that
511512
can be represented using a 64-bit integer is limited to approximately 584 years:
512513

513514
.. ipython:: python
514515
515516
pd.Timestamp.min
516517
pd.Timestamp.max
517518
519+
When choosing second-resolution, the available range grows to ``+/- 2.9e11 years``.
520+
Different resolutions can be converted to each other through ``as_unit``.
521+
518522
.. seealso::
519523

520524
:ref:`timeseries.oob`

doc/source/whatsnew/v2.1.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ I/O
209209
^^^
210210
- Bug in :func:`read_html`, tail texts were removed together with elements containing ``display:none`` style (:issue:`51629`)
211211
- :meth:`DataFrame.to_orc` now raising ``ValueError`` when non-default :class:`Index` is given (:issue:`51828`)
212+
- Bug in :func:`read_html`, style elements were read into DataFrames (:issue:`52197`)
212213
-
213214

214215
Period

pandas/core/apply.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ def validate_func_kwargs(
14911491
Returns
14921492
-------
14931493
columns : List[str]
1494-
List of user-provied keys.
1494+
List of user-provided keys.
14951495
func : List[Union[str, callable[...,Any]]]
14961496
List of user-provided aggfuncs
14971497

pandas/core/arrays/arrow/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def _from_sequence(cls, scalars, *, dtype: Dtype | None = None, copy: bool = Fal
251251
except pa.ArrowInvalid:
252252
# GH50430: let pyarrow infer type, then cast
253253
scalars = pa.array(scalars, from_pandas=True)
254-
if pa_dtype:
254+
if pa_dtype and scalars.type != pa_dtype:
255255
scalars = scalars.cast(pa_dtype)
256256
return cls(scalars)
257257

pandas/core/arrays/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,6 +1719,12 @@ def map(self, mapper, na_action=None):
17191719
The output of the mapping function applied to the array.
17201720
If the function returns a tuple with more than one element
17211721
a MultiIndex will be returned.
1722+
1723+
Examples
1724+
--------
1725+
>>> ext_arr = pd.array([1, 2, 3])
1726+
>>> ext_arr.map(str)
1727+
array(['1', '2', '3'], dtype=object)
17221728
"""
17231729
return map_array(self, mapper, na_action=na_action)
17241730

0 commit comments

Comments
 (0)