Spaces:
Sleeping
Sleeping
| import pandas as pd | |
| def query_dashboard_data(filepath, question): | |
| df = pd.read_csv(filepath) | |
| if "highest" in question.lower(): | |
| return df.max(numeric_only=True).to_dict() | |
| elif "average" in question.lower(): | |
| return df.mean(numeric_only=True).to_dict() | |
| return "Query not recognized" |