Skip to content

CLN: Incorrect name in docstrings for generic #4717

Closed
@jtratner

Description

@jtratner

E.g. for reindex on panel

elp on method reindex in module pandas.core.generic:

reindex(self, *args, **kwargs) method of pandas.core.panel.Panel instance
    Conform DataFrame to new index with optional filling logic, placing
    NA/NaN in locations having no value in the previous index. A new object
    is produced unless the new index is equivalent to the current one and
    copy=False

    Parameters
    ----------
    axes : array-like, optional (can be specified in order, or as keywords)
        New labels / index to conform to. Preferably an Index object to
        avoid duplicating data
    method : {'backfill', 'bfill', 'pad', 'ffill', None}, default None
        Method to use for filling holes in reindexed DataFrame
        pad / ffill: propagate last valid observation forward to next valid
        backfill / bfill: use NEXT valid observation to fill gap
    copy : boolean, default True
        Return a new object, even if the passed indexes are the same
    level : int or name
        Broadcast across a level, matching Index values on the
        passed MultiIndex level
    fill_value : scalar, default np.NaN
        Value to use for missing values. Defaults to NaN, but can be any
        "compatible" value
    limit : int, default None
        Maximum size gap to forward or backward fill
    takeable : boolean, default False
        treat the passed as positional values

    Examples
    --------

Functions that need parameters list/explanation:

  • swapaxes
  • pop [what does 'items' mean?]

Functions that only need list of axes:

  • filter [need to check if it should be defined for Series at all]
  • fillna [Series, Frame]
  • reindex_axis [needs class name + axes]
  • rename [might need a bit more logic to do docstring + note that args interpreted like axes??]
  • transpose

Functions needing a little work:

  • reindex
    • needs to have panel check that both major and major_axis aren't passed, same with minor and minor_axis (like SparsePanel does)
    • would be better if there were individual functions for Series Frame and Panel that explicitly enumerate axes in type signature.

Functions that may not need to be changed:

  • align

Functions that could use slight wording tweaks:

  • truncate
  • where
  • mask

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions