def test_serialize_dataframe():
    """Test if dataframe is serialized correctly."""
    simple_dataframe = pd.DataFrame(
        [["foo", "bar"], ["foo1", "bar1"]],
        columns=["column1", "column2"],  # pyright: ignore [reportArgumentType]
    )
    value = serialize(simple_dataframe)
    assert value == serialize_dataframe(simple_dataframe)
    assert isinstance(value, dict)
    assert tuple(value) == ("columns", "data")
Test if dataframe is serialized correctly.
tests/units/components/datadisplay/test_datatable.py