Hello Dash community!
I wanted to share a new Python package I released to make working with Pandas and Dash easier.
It leverages pandas’ API extension similarly to geopandas or pandas-ta.
Currently, it has two functionalities:
data, columns = df.dash.to_dash_table(): This can be used to obtain the data and columns necessary for
dash_table. It works with flat pandas df but it becomes most useful when working with multi index pandas df. Indeed, many difficulties pop up when working with such DFs. A column id needs to be created from the list of each column name, the last name of each column name has to be moved to the bottom to allow filtering and sorting, and int column names need to be transformed to string. You can additionally add properties such as markdown for urls to be applied to all columns or individual columns
Here are some examples:
options = df.dash.to_options("my_column")for creating the options of a
dcc.Dropdownfrom the values of a column. You can also add a hover title and disabled value based on another column. Example:
All the examples above can be found here:
More functionalities to make gaphing and dashboarding simpler are in the pipeline!
Please let me know what you think and if you have any issues!