Skip to content

Commit 13889b4

Browse files
authored
Merge branch 'main' into Test_issue_57930
2 parents 067e16f + 315b549 commit 13889b4

29 files changed

+230
-87
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ci:
1919
skip: [pyright, mypy]
2020
repos:
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.8.1
22+
rev: v0.8.6
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -34,7 +34,7 @@ repos:
3434
- id: ruff-format
3535
exclude: ^scripts|^pandas/tests/frame/test_query_eval.py
3636
- repo: https://github.com/jendrikseipp/vulture
37-
rev: 'v2.13'
37+
rev: 'v2.14'
3838
hooks:
3939
- id: vulture
4040
entry: python scripts/run_vulture.py
@@ -74,7 +74,7 @@ repos:
7474
hooks:
7575
- id: isort
7676
- repo: https://github.com/asottile/pyupgrade
77-
rev: v3.19.0
77+
rev: v3.19.1
7878
hooks:
7979
- id: pyupgrade
8080
args: [--py310-plus]
@@ -95,7 +95,7 @@ repos:
9595
- id: sphinx-lint
9696
args: ["--enable", "all", "--disable", "line-too-long"]
9797
- repo: https://github.com/pre-commit/mirrors-clang-format
98-
rev: v19.1.4
98+
rev: v19.1.6
9999
hooks:
100100
- id: clang-format
101101
files: ^pandas/_libs/src|^pandas/_libs/include

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ BSD 3-Clause License
33
Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
44
All rights reserved.
55

6-
Copyright (c) 2011-2024, Open source contributors.
6+
Copyright (c) 2011-2025, Open source contributors.
77

88
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:

ci/code_checks.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,11 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8181
-i "pandas.Timestamp.resolution PR02" \
8282
-i "pandas.Timestamp.tzinfo GL08" \
8383
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
84-
-i "pandas.arrays.NumpyExtensionArray SA01" \
8584
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
8685
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
8786
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
88-
-i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
89-
-i "pandas.core.resample.Resampler.mean SA01" \
90-
-i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
91-
-i "pandas.core.resample.Resampler.prod SA01" \
9287
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
93-
-i "pandas.core.resample.Resampler.std SA01" \
9488
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
95-
-i "pandas.core.resample.Resampler.var SA01" \
96-
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
9789
-i "pandas.plotting.andrews_curves RT03,SA01" \
9890
-i "pandas.tseries.offsets.BDay PR02,SA01" \
9991
-i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \
507 KB
Binary file not shown.
119 KB
Binary file not shown.

doc/cheatsheet/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ and pick "PDF" as the format.
66

77
This cheat sheet, originally written by Irv Lustig, [Princeton Consultants](https://www.princetonoptimization.com/), was inspired by the [RStudio Data Wrangling Cheatsheet](https://www.rstudio.com/wp-content/uploads/2015/02/data-wrangling-cheatsheet.pdf).
88

9-
| Topic | PDF | PPT |
10-
|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
11-
| Pandas_Cheat_Sheet | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
12-
| Pandas_Cheat_Sheet_JA | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_JA.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_JA.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
9+
| Topic | Language | PDF | PPT |
10+
|------------------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
11+
| Pandas_Cheat_Sheet | English | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
12+
| Pandas_Cheat_Sheet_JA | Japanese | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_JA.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_JA.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
13+
| Pandas_Cheat_Sheet_FA | Persian | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_FA.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_FA.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
14+
1315

1416

1517
**Alternative**

doc/source/user_guide/indexing.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,10 @@ and :ref:`Advanced Indexing <advanced>` you may select along more than one axis
858858
859859
.. warning::
860860

861-
``iloc`` supports two kinds of boolean indexing. If the indexer is a boolean ``Series``,
862-
an error will be raised. For instance, in the following example, ``df.iloc[s.values, 1]`` is ok.
863-
The boolean indexer is an array. But ``df.iloc[s, 1]`` would raise ``ValueError``.
861+
While ``loc`` supports two kinds of boolean indexing, ``iloc`` only supports indexing with a
862+
boolean array. If the indexer is a boolean ``Series``, an error will be raised. For instance,
863+
in the following example, ``df.iloc[s.values, 1]`` is ok. The boolean indexer is an array.
864+
But ``df.iloc[s, 1]`` would raise ``ValueError``.
864865

865866
.. ipython:: python
866867

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Other enhancements
6060
- :meth:`Series.map` can now accept kwargs to pass on to func (:issue:`59814`)
6161
- :meth:`pandas.concat` will raise a ``ValueError`` when ``ignore_index=True`` and ``keys`` is not ``None`` (:issue:`59274`)
6262
- :meth:`str.get_dummies` now accepts a ``dtype`` parameter to specify the dtype of the resulting DataFrame (:issue:`47872`)
63+
- Implemented :meth:`Series.str.isascii` and :meth:`Series.str.isascii` (:issue:`59091`)
6364
- Multiplying two :class:`DateOffset` objects will now raise a ``TypeError`` instead of a ``RecursionError`` (:issue:`59442`)
6465
- Restore support for reading Stata 104-format and enable reading 103-format dta files (:issue:`58554`)
6566
- Support passing a :class:`Iterable[Hashable]` input to :meth:`DataFrame.drop_duplicates` (:issue:`59237`)

pandas/_libs/index.pyx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -561,23 +561,15 @@ cdef class StringObjectEngine(ObjectEngine):
561561

562562
cdef:
563563
object na_value
564-
bint uses_na
565564

566565
def __init__(self, ndarray values, na_value):
567566
super().__init__(values)
568567
self.na_value = na_value
569-
self.uses_na = na_value is C_NA
570-
571-
cdef bint _checknull(self, object val):
572-
if self.uses_na:
573-
return val is C_NA
574-
else:
575-
return util.is_nan(val)
576568

577569
cdef _check_type(self, object val):
578570
if isinstance(val, str):
579571
return val
580-
elif self._checknull(val):
572+
elif checknull(val):
581573
return self.na_value
582574
else:
583575
raise KeyError(val)

pandas/core/arrays/_arrow_string_mixins.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ def _str_isalpha(self):
253253
result = pc.utf8_is_alpha(self._pa_array)
254254
return self._convert_bool_result(result)
255255

256+
def _str_isascii(self):
257+
result = pc.string_is_ascii(self._pa_array)
258+
return self._convert_bool_result(result)
259+
256260
def _str_isdecimal(self):
257261
result = pc.utf8_is_decimal(self._pa_array)
258262
return self._convert_bool_result(result)

0 commit comments

Comments
 (0)