Skip to content

Commit f7d5b6a

Browse files
authored
Merge branch 'main' into 60237
2 parents 4422307 + d067e08 commit f7d5b6a

Some content is hidden

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

80 files changed

+530
-418
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.7.2
22+
rev: v0.8.1
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -47,7 +47,7 @@ repos:
4747
types_or: [python, rst, markdown, cython, c]
4848
additional_dependencies: [tomli]
4949
- repo: https://github.com/MarcoGorelli/cython-lint
50-
rev: v0.16.2
50+
rev: v0.16.6
5151
hooks:
5252
- id: cython-lint
5353
- id: double-quote-cython-strings
@@ -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.3
98+
rev: v19.1.4
9999
hooks:
100100
- id: clang-format
101101
files: ^pandas/_libs/src|^pandas/_libs/include

asv_bench/benchmarks/groupby.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,7 @@ def setup(self, dtype, method, application, ncols, engine):
511511
# grouping on multiple columns
512512
# and we lack kernels for a bunch of methods
513513
if (
514-
engine == "numba"
515-
and method in _numba_unsupported_methods
514+
(engine == "numba" and method in _numba_unsupported_methods)
516515
or ncols > 1
517516
or application == "transformation"
518517
or dtype == "datetime"

ci/code_checks.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8383
-i "pandas.Timestamp.resolution PR02" \
8484
-i "pandas.Timestamp.tzinfo GL08" \
8585
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
86-
-i "pandas.arrays.IntegerArray SA01" \
8786
-i "pandas.arrays.IntervalArray.length SA01" \
8887
-i "pandas.arrays.NumpyExtensionArray SA01" \
8988
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
@@ -105,15 +104,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
105104
-i "pandas.core.resample.Resampler.std SA01" \
106105
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
107106
-i "pandas.core.resample.Resampler.var SA01" \
108-
-i "pandas.errors.IntCastingNaNError SA01" \
109107
-i "pandas.errors.NullFrequencyError SA01" \
110108
-i "pandas.errors.NumbaUtilError SA01" \
111109
-i "pandas.errors.PerformanceWarning SA01" \
112110
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
113111
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
114-
-i "pandas.infer_freq SA01" \
115112
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
116-
-i "pandas.io.stata.StataWriter.write_file SA01" \
117113
-i "pandas.plotting.andrews_curves RT03,SA01" \
118114
-i "pandas.plotting.scatter_matrix PR07,SA01" \
119115
-i "pandas.tseries.offsets.BDay PR02,SA01" \

doc/source/getting_started/install.rst

Lines changed: 81 additions & 81 deletions
Large diffs are not rendered by default.

doc/source/whatsnew/v3.0.0.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ Indexing
668668
^^^^^^^^
669669
- Bug in :meth:`DataFrame.__getitem__` returning modified columns when called with ``slice`` in Python 3.12 (:issue:`57500`)
670670
- Bug in :meth:`DataFrame.from_records` throwing a ``ValueError`` when passed an empty list in ``index`` (:issue:`58594`)
671+
- Bug in :meth:`MultiIndex.insert` when a new value inserted to a datetime-like level gets cast to ``NaT`` and fails indexing (:issue:`60388`)
671672
- Bug in printing :attr:`Index.names` and :attr:`MultiIndex.levels` would not escape single quotes (:issue:`60190`)
672673

673674
Missing
@@ -701,6 +702,7 @@ I/O
701702
- Bug in :meth:`read_csv` raising ``TypeError`` when ``nrows`` and ``iterator`` are specified without specifying a ``chunksize``. (:issue:`59079`)
702703
- Bug in :meth:`read_csv` where the order of the ``na_values`` makes an inconsistency when ``na_values`` is a list non-string values. (:issue:`59303`)
703704
- Bug in :meth:`read_excel` raising ``ValueError`` when passing array of boolean values when ``dtype="boolean"``. (:issue:`58159`)
705+
- Bug in :meth:`read_html` where ``rowspan`` in header row causes incorrect conversion to ``DataFrame``. (:issue:`60210`)
704706
- Bug in :meth:`read_json` not validating the ``typ`` argument to not be exactly ``"frame"`` or ``"series"`` (:issue:`59124`)
705707
- Bug in :meth:`read_json` where extreme value integers in string format were incorrectly parsed as a different integer number (:issue:`20608`)
706708
- Bug in :meth:`read_stata` raising ``KeyError`` when input file is stored in big-endian format and contains strL data. (:issue:`58638`)
@@ -737,6 +739,7 @@ Groupby/resample/rolling
737739
- Bug in :meth:`DataFrameGroupBy.cumsum` and :meth:`DataFrameGroupBy.cumprod` where ``numeric_only`` parameter was passed indirectly through kwargs instead of passing directly. (:issue:`58811`)
738740
- Bug in :meth:`DataFrameGroupBy.cumsum` where it did not return the correct dtype when the label contained ``None``. (:issue:`58811`)
739741
- Bug in :meth:`DataFrameGroupby.transform` and :meth:`SeriesGroupby.transform` with a reducer and ``observed=False`` that coerces dtype to float when there are unobserved categories. (:issue:`55326`)
742+
- Bug in :meth:`Rolling.apply` for ``method="table"`` where column order was not being respected due to the columns getting sorted by default. (:issue:`59666`)
740743
- Bug in :meth:`Rolling.apply` where the applied function could be called on fewer than ``min_period`` periods if ``method="table"``. (:issue:`58868`)
741744
- Bug in :meth:`Series.resample` could raise when the the date range ended shortly before a non-existent time. (:issue:`58380`)
742745

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ dependencies:
8787
- google-auth
8888
- natsort # DataFrame.sort_values doctest
8989
- numpydoc
90-
- pydata-sphinx-theme=0.14
90+
- pydata-sphinx-theme=0.16
9191
- pytest-cython # doctest
9292
- sphinx
9393
- sphinx-design

pandas/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@
235235
# Pandas is not (yet) a py.typed library: the public API is determined
236236
# based on the documentation.
237237
__all__ = [
238+
"NA",
238239
"ArrowDtype",
239240
"BooleanDtype",
240241
"Categorical",
@@ -253,15 +254,14 @@
253254
"HDFStore",
254255
"Index",
255256
"IndexSlice",
257+
"Int8Dtype",
256258
"Int16Dtype",
257259
"Int32Dtype",
258260
"Int64Dtype",
259-
"Int8Dtype",
260261
"Interval",
261262
"IntervalDtype",
262263
"IntervalIndex",
263264
"MultiIndex",
264-
"NA",
265265
"NaT",
266266
"NamedAgg",
267267
"Period",
@@ -274,10 +274,10 @@
274274
"Timedelta",
275275
"TimedeltaIndex",
276276
"Timestamp",
277+
"UInt8Dtype",
277278
"UInt16Dtype",
278279
"UInt32Dtype",
279280
"UInt64Dtype",
280-
"UInt8Dtype",
281281
"api",
282282
"array",
283283
"arrays",
@@ -290,8 +290,8 @@
290290
"errors",
291291
"eval",
292292
"factorize",
293-
"get_dummies",
294293
"from_dummies",
294+
"get_dummies",
295295
"get_option",
296296
"infer_freq",
297297
"interval_range",

pandas/_config/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
__all__ = [
1010
"config",
11+
"describe_option",
1112
"detect_console_encoding",
1213
"get_option",
13-
"set_option",
14-
"reset_option",
15-
"describe_option",
1614
"option_context",
1715
"options",
16+
"reset_option",
17+
"set_option",
1818
]
1919
from pandas._config import config
2020
from pandas._config import dates # pyright: ignore[reportUnusedImport] # noqa: F401

pandas/_config/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ def set_option(*args) -> None:
188188
"""
189189
Set the value of the specified option or options.
190190
191+
This method allows fine-grained control over the behavior and display settings
192+
of pandas. Options affect various functionalities such as output formatting,
193+
display limits, and operational behavior. Settings can be modified at runtime
194+
without requiring changes to global configurations or environment variables.
195+
191196
Parameters
192197
----------
193198
*args : str | object

pandas/_libs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
__all__ = [
2+
"Interval",
23
"NaT",
34
"NaTType",
45
"OutOfBoundsDatetime",
56
"Period",
67
"Timedelta",
78
"Timestamp",
89
"iNaT",
9-
"Interval",
1010
]
1111

1212

0 commit comments

Comments
 (0)