File size: 449 Bytes
8b7042b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pandas as pd
import plotly.express as px

def plotly_plot(df, x, y, color, title, x_title, y_title):
    fig = px.line(df, x=x, y=y, color=color, title=title)
    fig.update_xaxes(title_text=x_title)
    fig.update_yaxes(title_text=y_title)
    return fig

pd_df = pd.read_csv('./tmp.csv')
pd_df['date'] = pd.to_datetime(pd_df['date'])

fig=plotly_plot(pd_df, 'date', 'loss_mean_at_1000', 'model', 'ppl with time', 'time', 'ppl')
fig.show()