Hello!
I have a newbie question related to file_selector/callbacks 🙂
I want to use the file_selector
to load a CSV file.
Here is what I am currently doing:
`
contents = “””
<|file_selector|label=Upload dataset|on_action=load_csv_file|extensions=.csv|>
“””
def load_csv_file(selection):
dataset = pd.read_csv(selection)
`
However, the selection
is not the selected file, but an (empty) _State_ object…
Am I missing something?
How should I get the selected path so that I can do something with it?
Thanks for your help!
Greg