Plotly express should check if input data is tidy
See original GitHub issueCurrently, it’s easy to run into internal errors like follows:
--> 277 hover_lines = [k + "=" + v for k, v in mapping_labels.items()]
278 result["hovertemplate"] = hover_header + "<br>".join(hover_lines)
279 return result, fit_results
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Whereas it would be good to check that the input dataframe is fine before charting, and issue a pinpointed error message rather than fail internally following the dirty python tradition.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Plotly express arguments in Python
Plotly Express works with Long-, Wide-, and Mixed-Form Data Until version 4.8, Plotly Express only operated on long-form (previously called "tidy") data, but ......
Read more >Beyond “tidy”: Plotly Express now accepts wide-form and ...
This ability to map data dimensions to visual variables, no matter the form, is what allows Plotly Express to operate not only on...
Read more >Visualization with Plotly.Express: Comprehensive guide
A detailed guide on how to create many visualizations with Plotly Express with layout styling, interactivity, animations, and many chart ...
Read more >combine formula and tidy eval (plotly) - Stack Overflow
The plotly R package was created a little before rlang , and has its own non-standard evaluation (NSE) system, that as far as...
Read more >How to Create a Plotly Scatter Plot - Sharp Sight
The data_frame parameter allows you to specify the Pandas DataFrame that contains the data that you want to plot. ... Your DataFrame should...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fair enough.
In any case, we are working on more flexible input types, although the “tidy” philosophy will remain, i.e. you’ll still need to concatenate your vectors to do this sort of thing: https://stackoverflow.com/questions/57988604, you just won’t be required to stick them into a data frame first 😃
Thanks for your positive attitude! it seems that in defiance of python tradition, an input-safe library would be even more awesome than what plotly/express already is, especially given that charts need to be developed ad-hoc very typically, by people who don’t recall every caveat or limitation of the API at the moments when they come to create, iterate, and choose between visualizations.