Skip to content

Conversation

jbrockmendel
Copy link
Member

cc @jorisvandenbossche want to make sure this doesn't catch you by surprise. To avoid API bikeshedding, this just renames filter->select without futzing with the signature etc. AFAICT the real benefit is going to be in freeing up "filter" to be eventually re-implemented to be actually filter-y.

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference here would be to remove the axis argument and have select only operate on columns, which would agree with PySpark and Polars. We could point users to using .loc for operating on rows (regex and like can be done via boolean masks as well). But I won't block on this.

Comment on lines 266 to 272
:meth:`Series.select` and :meth:`DataFrame.select`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``filter`` method is used to select a subset of rows that match certain criteria.
:meth:`Series.filter` and :meth:`DataFrame.filter` do not support user defined functions,
The ``select`` method is used to select a subset of rows that match certain criteria.
:meth:`Series.select` and :meth:`DataFrame.select` do not support user defined functions,
but :meth:`SeriesGroupBy.filter` and :meth:`DataFrameGroupBy.filter` do. You can read more
about ``filter`` in groupby operations in :ref:`groupby.filter`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section was really about groupby's filter (which is already filter-y). We only gave a head nod to other filters just because they had the same name so as not to cause confusion. Can we either just add that Series.filter and DataFrame.filter are deprecated or remove the lines about Series.filter and DataFrame.filter entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants