Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
12.5k stars 935 forks source link

Accept Pandas Series in lov property #1444

Closed FlorianJacta closed 2 months ago

FlorianJacta commented 3 months ago

Description

A user had an issue putting a Pandas Series as a Lov property, as it is not allowed. A better warning has been issued since the 3.1 release. Accepting a Pandas series as a potential value for the Lov property would be great.

from taipy.gui import Gui
import pandas as pd

data = pd.DataFrame({"Countries":["France", "Germany", "Italy", "Spain"],
                     "Population": [65, 83, 59, 47]})
selected = data["Countries"][0]
selection = data["Countries"]

page = "<|{selected}|selector|lov={selection}|dropdown|>"

Gui(page).run(port="auto")

Acceptance Criteria

Code of Conduct

Satoshi-Sh commented 3 months ago

Can I take this issue?

FlorianJacta commented 3 months ago

It has not been approved by R&D. @FredLL-Avaiga @FabienLelaquais what do you think?

FredLL-Avaiga commented 3 months ago

I guess it makes sense

FlorianJacta commented 3 months ago

Waiting for an answer from @FabienLelaquais