File size: 433 Bytes
0d5a7ab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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