Skip to content

CLN: Remove .bool(), __init__, __float__ from DataFrame/Series #57308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,6 @@ repos:
files: ^pandas/core/
exclude: ^pandas/core/api\.py$
types: [python]
- id: no-bool-in-core-generic
name: Use bool_t instead of bool in pandas/core/generic.py
entry: python scripts/no_bool_in_generic.py
language: python
files: ^pandas/core/generic\.py$
- id: no-return-exception
name: Use raise instead of return for exceptions
language: pygrep
Expand Down
2 changes: 0 additions & 2 deletions doc/redirects.csv
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ generated/pandas.DataFrame.axes,../reference/api/pandas.DataFrame.axes
generated/pandas.DataFrame.between_time,../reference/api/pandas.DataFrame.between_time
generated/pandas.DataFrame.bfill,../reference/api/pandas.DataFrame.bfill
generated/pandas.DataFrame.blocks,../reference/api/pandas.DataFrame.blocks
generated/pandas.DataFrame.bool,../reference/api/pandas.DataFrame.bool
generated/pandas.DataFrame.boxplot,../reference/api/pandas.DataFrame.boxplot
generated/pandas.DataFrame.clip,../reference/api/pandas.DataFrame.clip
generated/pandas.DataFrame.clip_lower,../reference/api/pandas.DataFrame.clip_lower
Expand Down Expand Up @@ -930,7 +929,6 @@ generated/pandas.Series.between,../reference/api/pandas.Series.between
generated/pandas.Series.between_time,../reference/api/pandas.Series.between_time
generated/pandas.Series.bfill,../reference/api/pandas.Series.bfill
generated/pandas.Series.blocks,../reference/api/pandas.Series.blocks
generated/pandas.Series.bool,../reference/api/pandas.Series.bool
generated/pandas.Series.cat.add_categories,../reference/api/pandas.Series.cat.add_categories
generated/pandas.Series.cat.as_ordered,../reference/api/pandas.Series.cat.as_ordered
generated/pandas.Series.cat.as_unordered,../reference/api/pandas.Series.cat.as_unordered
Expand Down
1 change: 0 additions & 1 deletion doc/source/reference/frame.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Conversion
DataFrame.convert_dtypes
DataFrame.infer_objects
DataFrame.copy
DataFrame.bool
DataFrame.to_numpy

Indexing, iteration
Expand Down
1 change: 0 additions & 1 deletion doc/source/reference/series.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Conversion
Series.convert_dtypes
Series.infer_objects
Series.copy
Series.bool
Series.to_numpy
Series.to_period
Series.to_timestamp
Expand Down
3 changes: 1 addition & 2 deletions doc/source/user_guide/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,7 @@ Boolean reductions
~~~~~~~~~~~~~~~~~~

You can apply the reductions: :attr:`~DataFrame.empty`, :meth:`~DataFrame.any`,
:meth:`~DataFrame.all`, and :meth:`~DataFrame.bool` to provide a
way to summarize a boolean result.
:meth:`~DataFrame.all`.

.. ipython:: python

Expand Down
2 changes: 2 additions & 0 deletions doc/source/whatsnew/v3.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ Deprecations
Removal of prior version deprecations/changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- All arguments except the first ``path``-like argument in IO writers are now keyword only (:issue:`54229`)
- Removed ``DataFrame.bool`` and ``Series.bool`` (:issue:`51756`)
- Removed ``DataFrame.first`` and ``DataFrame.last`` (:issue:`53710`)
- Removed ``DataFrameGroupBy.grouper`` and ``SeriesGroupBy.grouper`` (:issue:`56521`)
- Removed ``DataFrameGroupby.fillna`` and ``SeriesGroupBy.fillna``` (:issue:`55719`)
- Removed ``Series.__int__`` and ``Series.__float__``. Call ``int(Series.iloc[0])`` or ``float(Series.iloc[0])`` instead. (:issue:`51131`)
- Removed ``Series.ravel`` (:issue:`56053`)
- Removed ``Series.view`` (:issue:`56054`)
- Removed ``axis`` argument from :meth:`DataFrame.groupby`, :meth:`Series.groupby`, :meth:`DataFrame.rolling`, :meth:`Series.rolling`, :meth:`DataFrame.resample`, and :meth:`Series.resample` (:issue:`51203`)
Expand Down
5 changes: 0 additions & 5 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ def pytest_collection_modifyitems(items, config) -> None:
"to_pydatetime",
"The behavior of DatetimeProperties.to_pydatetime is deprecated",
),
(
"pandas.core.generic.NDFrame.bool",
"(Series|DataFrame).bool is now deprecated and will be removed "
"in future version of pandas",
),
(
"pandas.core.generic.NDFrame.first",
"first is deprecated and will be removed in a future version. "
Expand Down
Loading