San*_*ado 8 python anaconda plotly jupyter-notebook exploratory-data-analysis
尝试在 Jupyter 笔记本中使用 Plotly 时出现以下错误。我正在使用 Anaconda Navigator 启动我的 Jupyter Notebook。
AttributeError:模块“dask.array”没有属性“lib”
我尝试通过以下命令安装 dask 但没有解决问题。
!pip install dask[complete]
!pip install "dask[delayed]"
我想使用 Plotly 绘制一些图形。这是我想要执行的代码片段。
import plotly.express as px
# Get histogram of a variable against the target variable
def get_histogram(dataset, variable, target_variable):
fig = px.histogram(data_frame = dataset,
x = variable,
color = target_variable,
marginal = "box",
barmode = "overlay",
histnorm = 'density'
)
fig.update_layout(title_font_color="black",
legend_title_font_color="green",
title={
'text': variable + " Histogram per " + target_variable,
'x':0.5,
'xanchor': 'center',
'yanchor': 'top'},
)
fig.show()
Run Code Online (Sandbox Code Playgroud)
如果有人能帮助我解决这个问题那就太好了!