Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Using dropdown input in an if statement to select correct dataframe

$
0
0

Hello all,

I have a dropdown item and two data files stored in csv format. I want to take the current dropdown selection and say something like

if selection == 'A':
  df = pd.read_csv('dataFileA')
else:
  df = pd.read_csv('dataFileB')

How can I do this? Is this the right approach? Any other opinions are appreciated.

thanks,
Kaan

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles