Pandas-Dash: Make life with Pandas and Dash easier

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:

  1. 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:
    Flat


    Multiindex:

  2. options = df.dash.to_options("my_column") for creating the options of a dcc.Dropdown from the values of a column. You can also add a hover title and disabled value based on another column. Example:
    image

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!

5 Likes

Will definitely give it a try! Thank you @ljam!

Nice!
There is any chance to update to Dash-AGgrid?