MCPcopy Index your code
hub / github.com/plotly/plotly.py / test_empty_df_int64

Function test_empty_df_int64

tests/test_optional/test_px/test_px.py:416–428  ·  view source on GitHub ↗
(backend)

Source from the content-addressed store, hash-verified

414
415
416def test_empty_df_int64(backend):
417 # Load px data, then filter it such that the dataframe is empty
418 df = px.data.tips(return_type=backend)
419 df = nw.from_native(px.data.tips(return_type=backend))
420 df_empty = df.filter(nw.col("day") == "banana").to_native()
421
422 fig = px.scatter(
423 df_empty,
424 x="total_bill",
425 y="size", # size is an int64 column
426 )
427 # to_dict() should not raise an exception
428 fig.to_dict()
429
430
431@pytest.mark.parametrize("return_type", ["pandas", "polars", "pyarrow"])

Callers

nothing calls this directly

Calls 3

scatterMethod · 0.80
to_dictMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected