I have a DataFrame containing the following data
- “Domain”
- “Type of Data”
- “Term Count”
- “Term(s)”
I want to create a DataTable with the first three columns in the table .
Domain | Type of Data | Term Count
------------------------------------
Test Domain | Address | 4
When I build the “DataTable” I wan’t the “Term(s)” column to be a “tooltip” (hover over) the “Term Count” DataTable column
List of Terms : [Current Address, Secondary Address, Work Address, Last Address]
Current Code:
dash_table.DataTable(
id=‘type-data’,
columns=[{“name”: ‘Domain’, “id”: ‘Domain’},
{“name”: ‘Type of Data’, “id”: ‘Type of Data’},
{“name”: ‘Domain-Type Count’, “id”: ‘Domain-Type Count’},
{“name”: ‘Term Count’, “id”: ‘Term Count’},
{“name”: ‘IGC Term(s)’, “id”: ‘Term(s)’}
],
data=typeFrame.to_dict(‘records’),
style_table={‘overflowX’: ‘auto’},
style_as_list_view=True,
# style_header / style_data
style_cell={
‘font-family’: ‘cursive’,
‘font-size’: ‘18px’,
‘text-align’: ‘center’
},
tooltip_data=[
{
column: {‘value’: str(value), ‘type’: ‘markdown’}
for column, value in row.items()
} for row in typeFrame.to_dict(‘rows’)
],
filter_action=‘native’,
page_size=10,
)
How to change my code to accomplish this?
Thank you…