plotly / plotly.py

The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
https://plotly.com/python/
MIT License
16.06k stars 2.54k forks source link

Feature request: Support for plotting `pint` scalars #4719

Open hdavid16 opened 1 month ago

hdavid16 commented 1 month ago

I love the figures generated with plotly. I want to use it as the backend for a Pandas dataframe that has units of measurement using (Pint). Unfortunately, these plots fail with the error:

AttributeError: 'float' object has no attribute 'tolist'

It seems that the issue is that Plotly is not recognizing Pint scalars as scalars. A MWE example is given on the following pint-pandas issue.

Thanks.