ExtensionArrayFormatterShared ============================= .. cpp:class:: pandas::ExtensionArrayFormatterShared pandas C++ class. Example ------- .. code-block:: cpp #include using namespace pandas; // Use ExtensionArrayFormatterShared ExtensionArrayFormatterShared obj; // ... operations ... Other Methods ------------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``dispatch(const ArrayT& arr, const FormatOptions& opts, bool boxed = true)`` - static std::vector - pd_extension_array_formatter.h:88 - :ref:`View ` * - ``format_with_callable(const EAFormatterCallable& fmt, std::size_t n, const std::vector& is_na)`` - - pd_extension_array_formatter.h:61 - Code Examples ------------- The following examples are extracted from the test suite. .. _example-extensionarrayformattershared-dispatch-0: .. dropdown:: dispatch (pd_test_5_all.cpp:106843) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 106833 :emphasize-lines: 11 break; } } if (!matched) { throw std::runtime_error("mix_kind missing shape token: " + mix_kind); } d.storage_label = s; return d; } static CaseResult dispatch(const ExpectedRow& row) { DecodedKind d = decode_kind(row.mix_kind); // Block H "mixed_hetero" uses n_source=4 (not the default 3). Derive // n_source from oracle's n_rows by reversing the shape offset. if (d.storage_label == "mixed_hetero") { int delta = 0; if (d.shape_kind == "extend1") delta = 1; else if (d.shape_kind == "extend2") delta = 2; else if (d.shape_kind == "extend5") delta = 5; d.n_source = row.n_rows - delta; }