Skip to content

API documentation should state return types #17114

Closed
@fulldecent

Description

@fulldecent

As an example, let's see the documentation for pandas.DataFrame.dtypes:

Documentation:

DataFrame.dtypes
Return the dtypes in this object.

https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.dtypes.html

This documentation is insufficient to describe the function. Perhaps a better documentation would state something like:

DataFrame.dtypes

Return a series of dtypes in this object.
Return type is pandas.core.series.Series with elements of numpy.dtype.

And those two types should link to related to documentation if available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions