Форум сайта python.su
https://plotly.com/python/candlestick-charts/
Там есть пример кода:
import plotly.graph_objects as go import pandas as pd from datetime import datetime df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv') fig = go.Figure(data=[go.Candlestick(x=df['Date'], open=df['AAPL.Open'], high=df['AAPL.High'], low=df['AAPL.Low'], close=df['AAPL.Close'])]) fig.show()
#import plotly.graph_objects as go на from plotly import graph_objs as go
fig = go.Figure(data=[go.Candlestick(x=df['Date'], AttributeError: module 'plotly.graph_objs' has no attribute 'Candlestick'
Отредактировано nick789 (Май 27, 2021 14:02:11)
Офлайн