如何在散点图(plotly python)上保留重复值?

如何在散点图(plotly python)上保留重复值?,python,plotly,scatter-plot,Python,Plotly,Scatter Plot,我有一个数据框,上面有针对特定请求的前10个谷歌搜索结果。 我在图表上显示这些数据。根据轴X,我有域,根据轴Y,它们的位置。 问题是同一领域的多个页面可能同时出现在前10位,这就是为什么X轴上会出现重复页面,而X轴上不会显示在图表上。 问题:是否有可能绕过此选项,仍然显示所有域,即使它们是重复的 数据帧示例: 图表是什么样子的: 图表代码: serp_csv2 = pd.read_csv('all.csv') rent_serp = serp_csv2[serp_csv2['searchTe

我有一个数据框,上面有针对特定请求的前10个谷歌搜索结果。 我在图表上显示这些数据。根据轴X,我有域,根据轴Y,它们的位置。 问题是同一领域的多个页面可能同时出现在前10位,这就是为什么X轴上会出现重复页面,而X轴上不会显示在图表上。

问题:是否有可能绕过此选项,仍然显示所有域,即使它们是重复的

数据帧示例:

图表是什么样子的:

图表代码:

serp_csv2 = pd.read_csv('all.csv')
rent_serp = serp_csv2[serp_csv2['searchTerms'].str.contains("аренда", regex=True, case=False)]
rent_serp['bubble_size'] = 35
rent_serp.set_index("queryTime", inplace=True)

fig = px.scatter(rent_serp, x="displayLink", y="rank", animation_frame=rent_serp.index, animation_group="displayLink",
            color="displayLink", hover_name="link", hover_data=["title"],
           log_y=False, 
           height=710, width=900, range_x=[-1,11], range_y=[1,11],  size="bubble_size", text="displayLink", template="plotly_dark", title="Heartbeat of SERP for 'аренда квартир киев'", labels={"rank":"Rankings","displayLink":"Domain Names"})
fig.layout.updatemenus[0].buttons[0].args[1]["frame"]["duration"] = 450
fig.layout.updatemenus[0].buttons[0].args[1]["transition"]["duration"] = 1500
fig.update_xaxes(
        title_font = {"size": 20},
        title_standoff = 45)
fig.update_yaxes(
        title_font = {"size": 20},
        title_standoff = 45)
fig.show(renderer='notebook')

例如,您可以将名称添加到列表中,然后删除重复的名称


my_list = ['a','x','a','y','a','b','b','c']

my_final_list = OrderedDict.fromkeys(my_list)

print(list(my_final_list))

#OUTPUT[['a', 'x', 'y', 'b', 'c']]

请不要提供数据样本作为截图。没有多少人会对手动输入数据以帮助您感兴趣。您可以轻松共享数据样本