Skip to content
Advertisement

Dropdownmenu in Streamlit without brackets and quotes

I am using streamlit for displaying a dropdown menu based on a csv list (symbols.csv).

This is how the csv list looks:

enter image description here

This is the code I am writing:

JavaScript

And this is how streamlit is displaying the dropdownmenu:

enter image description here

I would like to remove those brackets and quotes from the dropdownmenu, I would like to show only in the format “Bitcoin, BTC-USD” like in the csv file.

Thanks in advance

Advertisement

Answer

You have nested list like this

JavaScript

and you have to convert sublists to strings using ie. join

JavaScript

Or you should read it as normal text file

JavaScript

or

JavaScript

BTW:

And if you want to skip first row with Company_name,Company_ticker

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement