File size: 250 Bytes
9142902
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import matplotlib.pyplot as plt

def plot_trend(df, x_col, y_col, title):
    plt.figure(figsize=(8,5))
    plt.plot(df[x_col], df[y_col], marker='o')
    plt.title(title)
    plt.xlabel(x_col)
    plt.ylabel(y_col)
    plt.grid(True)
    plt.show()