import pandas as pd | |
import plotly.express as px | |
def plot_time_series(file): | |
""" | |
Plots a time series graph from a CSV file. | |
This function reads the CSV file and generates a line plot | |
showing the disease mentions over time. | |
""" | |
df = pd.read_csv(file.name) | |
fig = px.line( | |
df, | |
x=df.columns[0], | |
y=df.columns[1], | |
title='Disease Mentions Over Time' | |
) | |
return fig |