Skip to content

ENH: read_parquet as a class method #58303

@davetapley

Description

@davetapley

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I wish I could use read_parquet on a DataFrame subclass and it would Just Work.

Currently I have to:

class Foo(pd.DataFrame):
    # stuff from
    # https://pandas.pydata.org/pandas-docs/stable/development/extending.html#override-constructor-properties
    ....

df = read_parquet(file)
foo = Foo(df)
foo.attrs = df.attrs
# maybe I missed something else?

Feature Description

A Foo.read_parquet(file) which would return a Foo with attrs and everything else.

Alternative Solutions

As shown in description I can manually copy attrs, but it's not idea.

Additional Context

Related to:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closing CandidateMay be closeable, needs more eyeballsEnhancementNeeds TriageIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy