Open Zeroto521 opened 2 years ago
@Zeroto521 this feels like a great way to enable arbitrary dataframe extensions, perhaps even to other up-and-coming dataframe libraries. How would you like to move forward here?
@ericmjl @Zeroto521 also, note that this is exactly the place where pyjviz dev require to insert some additional logic (wip on pyjviz-callbacks branch) -> https://github.com/pyjanitor-devs/pandas_flavor/blob/69d45e1defdf6e2fd86b756e238517b4609ac929/pandas_flavor/register.py#L38
This feature already finished in https://github.com/Zeroto521/my-data-toolkit/blob/main/dtoolkit/accessor/register.py And an example of geopandas, use this wrapper to decorate geopandas.GeoDataFrame (https://github.com/Zeroto521/my-data-toolkit/blob/main/dtoolkit/geoaccessor/register.py)
PS: I need to focus on my work recently so that any open-source activities will get late.
I saw there have a lot of duplicate codes. And they both have the same structure. Maybe we could extract the same codes via the factory design pattern?
Duplicate codes:
The prototype of this idea. It could work for pandas-like object, such as
pandas.DataFrame
,pandas.Series
,pandas.Index
,geopandas.GeoDataFrame
, andgeopandas.GeoSeries
.