plotly.py
                                
                                 plotly.py copied to clipboard
                                
                                    plotly.py copied to clipboard
                            
                            
                            
                        Incorrect interpretation of nullable data types
Description
Using Pandas' nullable data types (Int64 and Float64) result in an incorrect plot.
Code
import pandas as pd
import plotly.express as px
df = pd.DataFrame(
    data=[1,2,3,4,5],
    columns=['a'],
    index=pd.date_range('2021-01-01', '2021-01-05'),
    dtype='Int64',
)
px.bar(df)
Result

Expected

Cannot reproduce in plotly '5.16.1', must've been fixed in or before this version.
I have plotly 5.18.0 installed right now, and the problem is still there.
I have plotly 5.18.0 installed right now, and the problem is still there.
I tried in plotly version 5.18.0, but to no avail. Maybe it depends on other packages in a tricky way.
import pandas as pd
import plotly.express as px
import plotly
df = pd.DataFrame(
    data=[1,2,3,4,5],
    columns=['a'],
    index=pd.date_range('2021-01-01', '2021-01-05'),
    dtype='Int64'
)
px.bar(df, height=300, title=plotly.__version__ + '; ' + pd.__version__)
Ah, I am still running Pandas 1.5.3 (due to bugs in 2.x related to timestamp resolution). So, I suppose some issues related to nullable types got fixed in Pandas 2.x.
Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson