[Python] Plotly displaying numerical values as counts instead of its actual values?

Discussão em 'Python' iniciado por Stack, Maio 3, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to plot my pandas df data onto a plotly bar chart, but for some reason, instead of putting the numerical values on the chart, its just putting the order onto it.

    For example, I am trying to also follow along with the docs, but it also fails on the docs' example.

    The code:

    import plotly.express as px
    fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2])
    fig.show()


    shows a chart of this:

    [​IMG]

    the bar values are the indexes of the array, rather than their actual values.

    I presume it might be with an issue with my install, but I am not entirely sure. Any help would be appreciated, as I haven't been able to find other solutions elsewhere.

    Continue reading...

Compartilhe esta Página