Skip to content

Commit 474b776

Browse files
Merge branch 'main' into demo-ci-check
2 parents fde6486 + 04a554c commit 474b776

File tree

30 files changed

+674
-676
lines changed

30 files changed

+674
-676
lines changed

.github/workflows/wheels.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ jobs:
164164
uses: pypa/cibuildwheel@v3.2.1
165165
with:
166166
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
167+
output-dir: ./dist
167168
env:
168169
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
169170
CIBW_BUILD_FRONTEND: ${{ matrix.cibw_build_frontend || 'pip' }}
@@ -194,18 +195,18 @@ jobs:
194195

195196
- name: Validate wheel RECORD
196197
shell: bash -el {0}
197-
run: for whl in $(ls wheelhouse); do wheel unpack wheelhouse/$whl -d /tmp; done
198+
run: for whl in $(ls ./dist/*.whl); do wheel unpack $whl -d /tmp; done
198199

199200
- uses: actions/upload-artifact@v5
200201
with:
201202
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
202-
path: ./wheelhouse/*.whl
203+
path: ./dist/*.whl
203204

204205
- name: Upload wheels & sdist
205206
if: ${{ success() && env.IS_SCHEDULE_DISPATCH == 'true' }}
206207
uses: scientific-python/upload-nightly-action@0.6.2
207208
with:
208-
artifacts_path: dist
209+
artifacts_path: ./dist
209210
anaconda_nightly_upload_token: ${{secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN}}
210211

211212
publish:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ pandas/py.typed
6767
.ropeproject
6868
# wheel files
6969
*.whl
70-
**/wheelhouse/*
7170
pip-wheel-metadata
7271
# coverage
7372
.coverage

doc/source/user_guide/merging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ with optional filling of missing data with ``fill_method``.
977977

978978
:func:`merge_asof` is similar to an ordered left-join except that matches are on the
979979
nearest key rather than equal keys. For each row in the ``left`` :class:`DataFrame`,
980-
the last row in the ``right`` :class:`DataFrame` are selected where the ``on`` key is less
980+
the last row in the ``right`` :class:`DataFrame` is selected where the ``on`` key is less
981981
than the left's key. Both :class:`DataFrame` must be sorted by the key.
982982

983983
Optionally :func:`merge_asof` can perform a group-wise merge by matching the

doc/source/user_guide/reshaping.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ by supplying the ``var_name`` and ``value_name`` parameters.
342342
cheese.melt(id_vars=["first", "last"], var_name="quantity")
343343
344344
When transforming a DataFrame using :func:`~pandas.melt`, the index will be ignored.
345-
The original index values can be kept by setting the ``ignore_index=False`` parameter to ``False`` (default is ``True``).
345+
The original index values can be kept by setting the ``ignore_index`` parameter to ``False`` (default is ``True``).
346346
``ignore_index=False`` will however duplicate index values.
347347

348348
.. ipython:: python

doc/source/user_guide/timeseries.rst

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,15 +1294,6 @@ frequencies. We will refer to these aliases as *offset aliases*.
12941294
"us", "microseconds"
12951295
"ns", "nanoseconds"
12961296

1297-
.. deprecated:: 2.2.0
1298-
1299-
Aliases ``H``, ``BH``, ``CBH``, ``T``, ``S``, ``L``, ``U``, and ``N``
1300-
are deprecated in favour of the aliases ``h``, ``bh``, ``cbh``,
1301-
``min``, ``s``, ``ms``, ``us``, and ``ns``.
1302-
1303-
Aliases ``Y``, ``M``, and ``Q`` are deprecated in favour of the aliases
1304-
``YE``, ``ME``, ``QE``.
1305-
13061297

13071298
.. note::
13081299

@@ -1358,11 +1349,6 @@ frequencies. We will refer to these aliases as *period aliases*.
13581349
"us", "microseconds"
13591350
"ns", "nanoseconds"
13601351

1361-
.. deprecated:: 2.2.0
1362-
1363-
Aliases ``H``, ``T``, ``S``, ``L``, ``U``, and ``N`` are deprecated in favour of the aliases
1364-
``h``, ``min``, ``s``, ``ms``, ``us``, and ``ns``.
1365-
13661352

13671353
Combining aliases
13681354
~~~~~~~~~~~~~~~~~

pandas/core/algorithms.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,14 +1140,8 @@ def take(
11401140
11411141
Parameters
11421142
----------
1143-
arr : array-like or scalar value
1144-
Non array-likes (sequences/scalars without a dtype) are coerced
1145-
to an ndarray.
1146-
1147-
.. deprecated:: 2.1.0
1148-
Passing an argument other than a numpy.ndarray, ExtensionArray,
1149-
Index, or Series is deprecated.
1150-
1143+
arr : numpy.ndarray, ExtensionArray, Index, or Series
1144+
Input array.
11511145
indices : sequence of int or one-dimensional np.ndarray of int
11521146
Indices to be taken.
11531147
axis : int, default 0

pandas/core/col.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
"__lt__": "<",
3838
"__eq__": "==",
3939
"__ne__": "!=",
40+
"__and__": "&",
41+
"__rand__": "&",
42+
"__or__": "|",
43+
"__ror__": "|",
44+
"__xor__": "^",
45+
"__rxor__": "^",
4046
}
4147

4248

@@ -157,6 +163,28 @@ def __mod__(self, other: Any) -> Expression:
157163
def __rmod__(self, other: Any) -> Expression:
158164
return self._with_binary_op("__rmod__", other)
159165

166+
# Logical ops
167+
def __and__(self, other: Any) -> Expression:
168+
return self._with_binary_op("__and__", other)
169+
170+
def __rand__(self, other: Any) -> Expression:
171+
return self._with_binary_op("__rand__", other)
172+
173+
def __or__(self, other: Any) -> Expression:
174+
return self._with_binary_op("__or__", other)
175+
176+
def __ror__(self, other: Any) -> Expression:
177+
return self._with_binary_op("__ror__", other)
178+
179+
def __xor__(self, other: Any) -> Expression:
180+
return self._with_binary_op("__xor__", other)
181+
182+
def __rxor__(self, other: Any) -> Expression:
183+
return self._with_binary_op("__rxor__", other)
184+
185+
def __invert__(self) -> Expression:
186+
return Expression(lambda df: ~self(df), f"(~{self._repr_str})")
187+
160188
def __array_ufunc__(
161189
self, ufunc: Callable[..., Any], method: str, *inputs: Any, **kwargs: Any
162190
) -> Expression:

pandas/core/config_init.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def is_terminal() -> bool:
423423
# to False. This environment variable can be set for testing.
424424
"warn"
425425
if os.environ.get("PANDAS_COPY_ON_WRITE", "0") == "warn"
426-
else os.environ.get("PANDAS_COPY_ON_WRITE", "0") == "1",
426+
else os.environ.get("PANDAS_COPY_ON_WRITE", "1") == "1",
427427
copy_on_write_doc,
428428
validator=is_one_of_factory([True, False, "warn"]),
429429
)
@@ -908,7 +908,8 @@ def register_converter_cb(key: str) -> None:
908908
"mode.copy_on_write",
909909
Pandas4Warning,
910910
msg=(
911-
"Copy-on-Write can no longer be disabled, setting to False has no impact. "
912-
"This option will be removed in pandas 4.0."
911+
"The 'mode.copy_on_write' option is deprecated. Copy-on-Write can no longer "
912+
"be disabled (it is always enabled with pandas >= 3.0), and setting the option "
913+
"has no impact. This option will be removed in pandas 4.0."
913914
),
914915
)

pandas/core/frame.py

Lines changed: 45 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -379,21 +379,18 @@
379379
`right` should be left as-is, with no suffix. At least one of the
380380
values must not be None.
381381
copy : bool, default False
382-
If False, avoid copy if possible.
382+
This keyword is now ignored; changing its value will have no
383+
impact on the method.
383384
384-
.. note::
385-
The `copy` keyword will change behavior in pandas 3.0.
386-
`Copy-on-Write
387-
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
388-
will be enabled by default, which means that all methods with a
389-
`copy` keyword will use a lazy copy mechanism to defer the copy and
390-
ignore the `copy` keyword. The `copy` keyword will be removed in a
391-
future version of pandas.
385+
.. deprecated:: 3.0.0
392386
393-
You can already get the future behavior and improvements through
394-
enabling copy on write ``pd.options.mode.copy_on_write = True``
387+
This keyword is ignored and will be removed in pandas 4.0. Since
388+
pandas 3.0, this method always returns a new object using a lazy
389+
copy mechanism that defers copies until necessary
390+
(Copy-on-Write). See the `user guide on Copy-on-Write
391+
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
392+
for more details.
395393
396-
.. deprecated:: 3.0.0
397394
indicator : bool or str, default False
398395
If True, adds a column to the output DataFrame called "_merge" with
399396
information on the source of each row. The column can be given a different
@@ -3900,26 +3897,21 @@ def transpose(
39003897
*args : tuple, optional
39013898
Accepted for compatibility with NumPy.
39023899
copy : bool, default False
3903-
Whether to copy the data after transposing, even for DataFrames
3904-
with a single dtype.
3900+
This keyword is now ignored; changing its value will have no
3901+
impact on the method.
39053902
39063903
Note that a copy is always required for mixed dtype DataFrames,
39073904
or for DataFrames with any extension types.
39083905
3909-
.. note::
3910-
The `copy` keyword will change behavior in pandas 3.0.
3911-
`Copy-on-Write
3912-
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
3913-
will be enabled by default, which means that all methods with a
3914-
`copy` keyword will use a lazy copy mechanism to defer the copy and
3915-
ignore the `copy` keyword. The `copy` keyword will be removed in a
3916-
future version of pandas.
3917-
3918-
You can already get the future behavior and improvements through
3919-
enabling copy on write ``pd.options.mode.copy_on_write = True``
3920-
39213906
.. deprecated:: 3.0.0
39223907
3908+
This keyword is ignored and will be removed in pandas 4.0. Since
3909+
pandas 3.0, this method always returns a new object using a lazy
3910+
copy mechanism that defers copies until necessary
3911+
(Copy-on-Write). See the `user guide on Copy-on-Write
3912+
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
3913+
for more details.
3914+
39233915
Returns
39243916
-------
39253917
DataFrame
@@ -5949,21 +5941,18 @@ def rename(
59495941
Axis to target with ``mapper``. Can be either the axis name
59505942
('index', 'columns') or number (0, 1). The default is 'index'.
59515943
copy : bool, default False
5952-
Also copy underlying data.
5944+
This keyword is now ignored; changing its value will have no
5945+
impact on the method.
59535946
5954-
.. note::
5955-
The `copy` keyword will change behavior in pandas 3.0.
5956-
`Copy-on-Write
5957-
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
5958-
will be enabled by default, which means that all methods with a
5959-
`copy` keyword will use a lazy copy mechanism to defer the copy and
5960-
ignore the `copy` keyword. The `copy` keyword will be removed in a
5961-
future version of pandas.
5947+
.. deprecated:: 3.0.0
59625948
5963-
You can already get the future behavior and improvements through
5964-
enabling copy on write ``pd.options.mode.copy_on_write = True``
5949+
This keyword is ignored and will be removed in pandas 4.0. Since
5950+
pandas 3.0, this method always returns a new object using a lazy
5951+
copy mechanism that defers copies until necessary
5952+
(Copy-on-Write). See the `user guide on Copy-on-Write
5953+
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
5954+
for more details.
59655955
5966-
.. deprecated:: 3.0.0
59675956
inplace : bool, default False
59685957
Whether to modify the DataFrame rather than creating a new one.
59695958
If True then value of copy is ignored.
@@ -13988,22 +13977,18 @@ def to_timestamp(
1398813977
axis : {0 or 'index', 1 or 'columns'}, default 0
1398913978
The axis to convert (the index by default).
1399013979
copy : bool, default False
13991-
If False then underlying input data is not copied.
13992-
13993-
.. note::
13994-
The `copy` keyword will change behavior in pandas 3.0.
13995-
`Copy-on-Write
13996-
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
13997-
will be enabled by default, which means that all methods with a
13998-
`copy` keyword will use a lazy copy mechanism to defer the copy and
13999-
ignore the `copy` keyword. The `copy` keyword will be removed in a
14000-
future version of pandas.
14001-
14002-
You can already get the future behavior and improvements through
14003-
enabling copy on write ``pd.options.mode.copy_on_write = True``
13980+
This keyword is now ignored; changing its value will have no
13981+
impact on the method.
1400413982
1400513983
.. deprecated:: 3.0.0
1400613984
13985+
This keyword is ignored and will be removed in pandas 4.0. Since
13986+
pandas 3.0, this method always returns a new object using a lazy
13987+
copy mechanism that defers copies until necessary
13988+
(Copy-on-Write). See the `user guide on Copy-on-Write
13989+
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
13990+
for more details.
13991+
1400713992
Returns
1400813993
-------
1400913994
DataFrame with DatetimeIndex
@@ -14078,22 +14063,18 @@ def to_period(
1407814063
axis : {0 or 'index', 1 or 'columns'}, default 0
1407914064
The axis to convert (the index by default).
1408014065
copy : bool, default False
14081-
If False then underlying input data is not copied.
14082-
14083-
.. note::
14084-
The `copy` keyword will change behavior in pandas 3.0.
14085-
`Copy-on-Write
14086-
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
14087-
will be enabled by default, which means that all methods with a
14088-
`copy` keyword will use a lazy copy mechanism to defer the copy and
14089-
ignore the `copy` keyword. The `copy` keyword will be removed in a
14090-
future version of pandas.
14091-
14092-
You can already get the future behavior and improvements through
14093-
enabling copy on write ``pd.options.mode.copy_on_write = True``
14066+
This keyword is now ignored; changing its value will have no
14067+
impact on the method.
1409414068
1409514069
.. deprecated:: 3.0.0
1409614070
14071+
This keyword is ignored and will be removed in pandas 4.0. Since
14072+
pandas 3.0, this method always returns a new object using a lazy
14073+
copy mechanism that defers copies until necessary
14074+
(Copy-on-Write). See the `user guide on Copy-on-Write
14075+
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
14076+
for more details.
14077+
1409714078
Returns
1409814079
-------
1409914080
DataFrame

0 commit comments

Comments
 (0)