Skip to content

Method to get underlying object #108

@MarcoGorelli

Description

@MarcoGorelli

Does there need to be a way to get back the underlying object?

I'm thinking about the pyjanitor clean_names example

Some user starts with a DataFrame (say, a pandas one) df, and calls clean_names(df). They would probably expect to get back what they started with, without caring that PyJanitor internally used the standard.

For example, PyJanitor could do

def clean_names(df, ...):
    df = dataframe_standard(df)  # or whatever the way to enable the standard will be
    df = ...  # clean names
    return df.dataframe  # return same type of DataFrame as was passed

So, should some .dataframe property be added, so that the library can "opt-out" of the standard once it has done all its work?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions