Open davetapley opened 2 months ago
[X] Adding new functionality to pandas
[ ] Changing existing functionality in pandas
[ ] Removing existing functionality in pandas
I wish I could use read_parquet on a DataFrame subclass and it would Just Work.
read_parquet
DataFrame
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?
A Foo.read_parquet(file) which would return a Foo with attrs and everything else.
Foo.read_parquet(file)
Foo
attrs
As shown in description I can manually copy attrs, but it's not idea.
Related to:
For the most part we want either pd.function or DataFrame.method, not both.
Feature Type
[X] 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 aDataFrame
subclass and it would Just Work.Currently I have to:
Feature Description
A
Foo.read_parquet(file)
which would return aFoo
withattrs
and everything else.Alternative Solutions
As shown in description I can manually copy
attrs
, but it's not idea.Additional Context
Related to: