Skip to content

Namespace removal #17401

@jbrockmendel

Description

@jbrockmendel

There are a few places where methods/attributes have crept into class namespaces that probably don't belong there. Will there be any objections to cleaning up any of the following?

tslib.Timedelta._validate_ops_compat does not use self, can be a cdef function at the module level.

tslib.Timedelta._binary_op_method_timedeltalike doesn't even have self in its args, can be a func at the module level (though it cant be cdef)

tslib.Timedelta._op_unary_method ditto

tslib.Timedelta._round and tslib.Timestamp._round are backend methods that round, floor, ceil call. They could be cdef and not exposed.

_Timestamp._get_field is cpdef, could be cdef and not exposed.
_Timestamp._get_start_end_field ditto

All of these technically break backward compat if there is someone out there using them, but I have a hard time imagining that use case, so think its worth considering.


Outside of tslib, the items in my notes are:

core.groupby.SeriesGroupBy._agg_doc
core.groupby.DataFrameGroupBy._agg_doc
DataFrame._agg_doc

Metadata

Metadata

Assignees

No one assigned

    Labels

    CleanInternalsRelated to non-user accessible pandas implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions