Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate panel.widgets.DataFrame proposal #7473

Open
thuydotm opened this issue Nov 7, 2024 · 9 comments
Open

Deprecate panel.widgets.DataFrame proposal #7473

thuydotm opened this issue Nov 7, 2024 · 9 comments
Labels
deprecation A proposal to deprecate a feature

Comments

@thuydotm
Copy link
Collaborator

thuydotm commented Nov 7, 2024

https://panel.holoviz.org/reference/widgets/DataFrame.html

Feature Overview
The DataFrame widget allows displaying and editing a pandas DataFrame.

Deprecation Proposal
I propose deprecating this feature in Panel. DataFrame docs also stated that the widget will be replaced with the Tabulator widget. So this may be a good time to actually do it.

Impact Assessment

This means people still look for and use DataFrame but they are getting more used to Tabulator. DataFrame is a very common name/term though.

Effort Involved
Tabulator is to replace DataFrame so it supports all features that DataFrame supports, and also new features have been written to Tabulator. We even specified in the docs this deprecation so I'd say this is ready to go.

The primary remaining tasks include:

  • Adding a deprecation warning in the Panel code.
  • Official deprecated.
@ahuang11
Copy link
Contributor

ahuang11 commented Nov 7, 2024

I think this is a good idea; I wonder if there's a way to include a lightweight version of tabulator, ref #5131

Also, I think the title might be misleading unless I understand incorrectly; it should be Deprecate panel.pane.DataFrame proposal I presume?

@thuydotm thuydotm changed the title Deprecate panel.widgets.Tabulator proposal Deprecate panel.widgets.DataFrame proposal Nov 8, 2024
@hoxbro
Copy link
Member

hoxbro commented Nov 8, 2024

I may be missing something, but will pn.widgets.DataFrame be changed to use the Tabulator widget? Or are we "just" removing the DataFrame widget itself?

Couldn't the goatcounter numbers also mean that Tabulator is not as intuitive as DataFrame or more complex, which means people need to look up the reference of Tabulator more?

@thuydotm
Copy link
Collaborator Author

@hoxbro Deprecation to me is to entirely remove a feature so there will no longer have DataFrame widget in Panel. I don't think it makes sense to make change to pn.widgets.DataFrame to use the Tabulator widget, there'll be 2 widgets with different names that do exactly the same thing.
DataFrame is an intuitive name but Tabulator is not just a data frame. We do more than showing and editing a data frame with it. And the widget is built on the Tabulator library so it'll be more consistent to respect the original name.

@philippjfr
Copy link
Member

philippjfr commented Nov 11, 2024

Also, I think the title might be misleading unless I understand incorrectly; it should be Deprecate panel.pane.DataFrame proposal I presume?

No, pn.widgets.DataFrame is correct.

Couldn't the goatcounter numbers also mean that Tabulator is not as intuitive as DataFrame or more complex, which means people need to look up the reference of Tabulator more?

I don't buy this, I think it's 99% down to popularity not complexity.

Overall I'm fine with sunsetting pn.widgets.DataFrame entirely, especially as we work towards supporting more datatypes. If we want to find a more generic name for Tabulator I'd suggest aliasing it to Table or DataTable, update all the docs and eventually remove the Tabulator naming, but that's a different topic for a different day.

@philippjfr
Copy link
Member

The real benefit of dropping DataFrame would be to stop loading the bokeh-tables.js bundle, which adds 300 KB to all our apps. That would require some re-architecting though because Tabulator reuses some of the formatters defined in that bundle.

@hoxbro
Copy link
Member

hoxbro commented Nov 11, 2024

I don't buy this, I think it's 99% down to popularity not complexity.

I also think it is mostly do to popularity. Though, I do think the many features of the Tabulator makes it more likely candidate to look up and revisit the site. I know from my self that I use that page the most.

No, pn.widgets.DataFrame is correct.

Earlier the title was Tabulator and not DataFrame, which was what Andrew refenced to.

@philippjfr
Copy link
Member

Though, I do think the many features of the Tabulator makes it more likely candidate to look up and revisit the site. I know from my self that I use that page the most.

Definitely true! The SlickGrid based DataFrame is just so ugly and worse in every respect that I can't imagine anyone wanting to use it.

Earlier the title was Tabulator and not DataFrame, which was what Andrew refenced to.

Ah, thanks, just wanted to be clear that we're talking about the widget not the pane, as was referenced by @ahuang11's comment.

@ahuang11
Copy link
Contributor

Oh wow, I totally forgot there was pn.widgets.DataFrame. Totally in favor of deprecating it completely.

@maximlt
Copy link
Member

maximlt commented Nov 12, 2024

@thuydotm does pn.widgets.DataFrame have features that pn.widgets.Tabulator doesn't have?


I like that we look at some stats! :) Two other places interesting to look into would be Github and HoloViz Discourse.


Overall I'm fine with sunsetting pn.widgets.DataFrame entirely, especially as we work towards supporting more datatypes.

Does that include objects that are not called or cannot be called DataFrame? If not, I'm wondering if it wouldn't be possible to keep pn.widgets.DataFrame as a name, because it's a pretty good name after all! Since pn.widgets.DataFrame has an API that is mostly a subset of pn.widgets.Tabulator, my guess is that most user code would work fine if we'd just instantiate a Tabulator widget instead of a DataFrame with the kwargs they pass. Deprecating DataFrame would start with a warning and would offer users to opt-in the Tabulator implementation with something like pn.widgets.DataFrame(..., impl='tabulator').

If we want to find a more generic name for Tabulator I'd suggest aliasing it to Table or DataTable, update all the docs and eventually remove the Tabulator naming, but that's a different topic for a different day.

I'm not entirely sure about my little plan above but I am 100% sure renaming things is a pain so we have to think through all that carefully, specially if as Philipp hinted there's a later phase where we migrate users towards a more generic name (we try indeed to avoid naming things after their implementation).

The current scheme is DataFrame -> Tabulator -> Table/DataTable but maybe it could "just" be Tabulator -> DataFrame?

@philippjfr philippjfr added the deprecation A proposal to deprecate a feature label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation A proposal to deprecate a feature
Projects
None yet
Development

No branches or pull requests

5 participants