menu

plotly绘图 自于pandas

#plotly 绘图 数据来自于 #pandas

# imports
import plotly.express as px 
import pandas as pd 
import numpy as np 

# data
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')
fig = px.line(df, x='Date', y=df.columns[1:-6])

# Show plot 
fig.show()

https://stackoverflow.com/questions/58142058/how-to-plot-multiple-lines-on-the-same-y-axis-using-plotly-express-in-python

#筛选列名为a、b、c的列,形成新的df1

df1 = df[[‘a’,’b’,’c’]]

编辑