| 492 | |
| 493 | |
| 494 | def test_pass_df_columns(backend): |
| 495 | tips = nw.from_native(px.data.tips(return_type=backend)) |
| 496 | fig = px.histogram( |
| 497 | tips.to_native(), |
| 498 | x="total_bill", |
| 499 | y="tip", |
| 500 | color="sex", |
| 501 | marginal="rug", |
| 502 | hover_data=tips.columns, |
| 503 | ) |
| 504 | # the "- 2" is because we re-use x and y in the hovertemplate where possible |
| 505 | assert fig.data[1].hovertemplate.count("customdata") == len(tips.columns) - 2 |
| 506 | tips_copy = nw.from_native(px.data.tips(return_type=backend)) |
| 507 | assert tips_copy.columns == tips.columns |
| 508 | |
| 509 | |
| 510 | def test_size_column(request, backend): |