Skip to content

Commit ecf3133

Browse files
committed
Merge remote-tracking branch 'upstream/main' into cln/deps
2 parents d73740c + 7bb58a8 commit ecf3133

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 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.11.4
22+
rev: v0.11.8
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -95,14 +95,14 @@ 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: v20.1.0
98+
rev: v20.1.3
9999
hooks:
100100
- id: clang-format
101101
files: ^pandas/_libs/src|^pandas/_libs/include
102102
args: [-i]
103103
types_or: [c, c++]
104104
- repo: https://github.com/trim21/pre-commit-mirror-meson
105-
rev: v1.7.2
105+
rev: v1.8.0
106106
hooks:
107107
- id: meson-fmt
108108
args: ['--inplace']

doc/source/_static/css/getting_started.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,15 @@ ul.task-bullet > li > p:first-child {
249249

250250
.tutorial-card .card-header {
251251
--bs-card-cap-color: var(--pst-color-text-base);
252+
color: var(--pst-color-text-base);
252253
cursor: pointer;
253254
background-color: var(--pst-color-surface);
254255
border: 1px solid var(--pst-color-border)
255256
}
256257

257258
.tutorial-card .card-body {
258259
background-color: var(--pst-color-on-background);
260+
color: var(--pst-color-text-base);
259261
}
260262

261263
.tutorial-card .badge {

doc/source/reference/arrays.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ Data type introspection
664664
api.types.is_datetime64_dtype
665665
api.types.is_datetime64_ns_dtype
666666
api.types.is_datetime64tz_dtype
667+
api.types.is_dtype_equal
667668
api.types.is_extension_array_dtype
668669
api.types.is_float_dtype
669670
api.types.is_int64_dtype

pandas/core/dtypes/common.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,24 +655,38 @@ def is_dtype_equal(source, target) -> bool:
655655
656656
Parameters
657657
----------
658-
source : The first dtype to compare
659-
target : The second dtype to compare
658+
source : type or str
659+
The first dtype to compare.
660+
target : type or str
661+
The second dtype to compare.
660662
661663
Returns
662664
-------
663665
boolean
664666
Whether or not the two dtypes are equal.
665667
668+
See Also
669+
--------
670+
api.types.is_categorical_dtype : Check whether the provided array or dtype
671+
is of the Categorical dtype.
672+
api.types.is_string_dtype : Check whether the provided array or dtype
673+
is of the string dtype.
674+
api.types.is_object_dtype : Check whether an array-like or dtype is of the
675+
object dtype.
676+
666677
Examples
667678
--------
679+
>>> from pandas.api.types import is_dtype_equal
668680
>>> is_dtype_equal(int, float)
669681
False
670682
>>> is_dtype_equal("int", int)
671683
True
672684
>>> is_dtype_equal(object, "category")
673685
False
686+
>>> from pandas.core.dtypes.dtypes import CategoricalDtype
674687
>>> is_dtype_equal(CategoricalDtype(), "category")
675688
True
689+
>>> from pandas.core.dtypes.dtypes import DatetimeTZDtype
676690
>>> is_dtype_equal(DatetimeTZDtype(tz="UTC"), "datetime64")
677691
False
678692
"""

0 commit comments

Comments
 (0)