Hi everyone, I have a dropdown list, which is using unique values from pandas dataframe column. Currently, labels in this list are the same with the values from dataframe. Is there any way to change those labels to the custom? Values are stored in numbers, so i need to change it to text. For example if number in list is ‘1’, the label in dropdown have to show ‘Australia’ and etc.
dcc.Dropdown(
id='ddn1',
options=[{'label': i, 'value': i} for i in df['COUNTRYCODE'].unique()], style={'width':'250px'}),