Result#

class pandas::Result#

pandas C++ class.

Example#

#include <pandas/pandas.h>
using namespace pandas;

// Use Result
Result obj;
// ... operations ...

Constructors#

Signature

Location

Example

Result() = default

pd_result.h:128

View

Result(Result&&) noexcept = default

pd_result.h:129

View

Result(const Result&) = delete

pd_result.h:131

View

Type Checking#

Signature

Return Type

Location

Example

bool is_empty() const noexcept

bool

pd_result.h:254

View

bool is_frame() const noexcept

bool

pd_result.h:281

View

bool is_index() const noexcept

bool

pd_result.h:284

View

bool is_ndarray() const noexcept

bool

pd_result.h:287

View

bool is_scalar() const noexcept

bool

pd_result.h:257

View

bool is_series() const noexcept

bool

pd_result.h:262

View

Other Methods#

Signature

Return Type

Location

Example

static Result of_frame(std::unique_ptr<DataFrame> f)

static Result

pd_result.h:231

static Result of_index(std::unique_ptr<IndexBase> ix)

static Result

pd_result.h:236

static Result of_ndarray(std::unique_ptr<numpy::NDArray<double>> a)

static Result

pd_result.h:241

static Result of_ndarray(std::unique_ptr<numpy::NDArray<std::int64_t>> a)

static Result

pd_result.h:246

static Result of_scalar(double v)

static Result

pd_result.h:136

View

static Result of_scalar(std::int64_t v)

static Result

pd_result.h:141

View

static Result of_scalar(std::string v)

static Result

pd_result.h:146

View

static Result of_series(std::unique_ptr<Series<numpy::float64>> s)

static Result

pd_result.h:154

View

static Result of_series(std::unique_ptr<Series<std::int64_t>> s)

static Result

pd_result.h:159

View

static Result of_series(std::unique_ptr<Series<std::string>> s)

static Result

pd_result.h:164

View

static Result of_series(std::unique_ptr<Series<std::complex<double>>> s)

static Result

pd_result.h:169

View

static Result of_series(std::unique_ptr<Series<std::int32_t>> s)

static Result

pd_result.h:175

View

static Result of_series(std::unique_ptr<Series<numpy::float32>> s)

static Result

pd_result.h:180

View

static Result of_series(std::unique_ptr<Series<numpy::bool_>> s)

static Result

pd_result.h:185

View

static Result of_series(std::unique_ptr<Series<numpy::datetime64>> s)

static Result

pd_result.h:190

View

static Result of_series(std::unique_ptr<Series<numpy::timedelta64>> s)

static Result

pd_result.h:195

View

static Result of_series(std::unique_ptr<Series<numpy::object_>> s)

static Result

pd_result.h:201

View

static Result of_series(std::unique_ptr<Series<numpy::uint8>> s)

static Result

pd_result.h:208

View

static Result of_series(std::unique_ptr<Series<numpy::uint16>> s)

static Result

pd_result.h:213

View

static Result of_series(std::unique_ptr<Series<numpy::uint32>> s)

static Result

pd_result.h:218

View

static Result of_series(std::unique_ptr<Series<numpy::uint64>> s)

static Result

pd_result.h:223

View

Code Examples#

The following examples are extracted from the test suite.

Result (pd_test_5_all.cpp:141161)
141151    if (!got) return;
141152    auto& sp = std::get<std::unique_ptr<pandas::Series<numpy::float64>>>(r.value);
141153    bool ok = (sp->size() == 1) && (*sp)[0] == 5.0;
141154    pandas_tests::check(ok, "case_H4.value_max_5", local_fail);
141155}
141156
141157static void f_series_apply_dispatch_804133_case_H5_dispatcher_none_arm(int& local_fail) {
141158    std::cout << "-- case_H5_dispatcher_none_arm\n";
141159    pandas::Series<numpy::float64> s({1.0, 2.0}, "v");
141160    pandas::Result r = s.apply_dispatch(pandas::FuncArg::none());
141161    // None_ -> empty Result (monostate)
141162    bool is_mono = std::holds_alternative<std::monostate>(r.value);
141163    pandas_tests::check(is_mono, "case_H5.none_returns_monostate", local_fail);
141164}
141165
141166void f_series_apply_dispatch_804133_case_1_apply_id_Int64(int& local_fail) {
141167    std::cout << "-- case_1_apply_id_Int64\n";
141168    pandas::Series<std::int64_t> s({1, 2, 3});
141169    s.set_dtype_override("Int64");
141170    auto r = s.apply([](std::int64_t x) { return x; });
141171    pandas::DataFrame df = r.to_frame(std::optional<std::string>("v"));
Result (pd_test_5_all.cpp:141161)
141151    if (!got) return;
141152    auto& sp = std::get<std::unique_ptr<pandas::Series<numpy::float64>>>(r.value);
141153    bool ok = (sp->size() == 1) && (*sp)[0] == 5.0;
141154    pandas_tests::check(ok, "case_H4.value_max_5", local_fail);
141155}
141156
141157static void f_series_apply_dispatch_804133_case_H5_dispatcher_none_arm(int& local_fail) {
141158    std::cout << "-- case_H5_dispatcher_none_arm\n";
141159    pandas::Series<numpy::float64> s({1.0, 2.0}, "v");
141160    pandas::Result r = s.apply_dispatch(pandas::FuncArg::none());
141161    // None_ -> empty Result (monostate)
141162    bool is_mono = std::holds_alternative<std::monostate>(r.value);
141163    pandas_tests::check(is_mono, "case_H5.none_returns_monostate", local_fail);
141164}
141165
141166void f_series_apply_dispatch_804133_case_1_apply_id_Int64(int& local_fail) {
141167    std::cout << "-- case_1_apply_id_Int64\n";
141168    pandas::Series<std::int64_t> s({1, 2, 3});
141169    s.set_dtype_override("Int64");
141170    auto r = s.apply([](std::int64_t x) { return x; });
141171    pandas::DataFrame df = r.to_frame(std::optional<std::string>("v"));
Result (pd_test_5_all.cpp:141161)
141151    if (!got) return;
141152    auto& sp = std::get<std::unique_ptr<pandas::Series<numpy::float64>>>(r.value);
141153    bool ok = (sp->size() == 1) && (*sp)[0] == 5.0;
141154    pandas_tests::check(ok, "case_H4.value_max_5", local_fail);
141155}
141156
141157static void f_series_apply_dispatch_804133_case_H5_dispatcher_none_arm(int& local_fail) {
141158    std::cout << "-- case_H5_dispatcher_none_arm\n";
141159    pandas::Series<numpy::float64> s({1.0, 2.0}, "v");
141160    pandas::Result r = s.apply_dispatch(pandas::FuncArg::none());
141161    // None_ -> empty Result (monostate)
141162    bool is_mono = std::holds_alternative<std::monostate>(r.value);
141163    pandas_tests::check(is_mono, "case_H5.none_returns_monostate", local_fail);
141164}
141165
141166void f_series_apply_dispatch_804133_case_1_apply_id_Int64(int& local_fail) {
141167    std::cout << "-- case_1_apply_id_Int64\n";
141168    pandas::Series<std::int64_t> s({1, 2, 3});
141169    s.set_dtype_override("Int64");
141170    auto r = s.apply([](std::int64_t x) { return x; });
141171    pandas::DataFrame df = r.to_frame(std::optional<std::string>("v"));
is_empty (pd_test_1_all.cpp:2164)
2154    // Test with right-closed intervals (a, b]
2155    std::vector<std::pair<numpy::float64, numpy::float64>> tuples = {
2156        {0.0, 1.0},   // Not empty
2157        {1.0, 1.0},   // Empty (1, 1] has no points
2158        {2.0, 2.0},   // Empty
2159        {2.0, 3.0}    // Not empty
2160    };
2161
2162    auto arr_right = pandas::IntervalArrayFloat64::from_tuples(tuples, pandas::IntervalClosed::Right);
2163    auto empty_right = arr_right.is_empty();
2164
2165    if (empty_right[0].value_or(true) != false ||
2166        empty_right[1].value_or(false) != true ||
2167        empty_right[2].value_or(false) != true ||
2168        empty_right[3].value_or(true) != false) {
2169        std::cout << "[FAIL] : in test_is_empty() : right-closed" << std::endl;
2170        return;
2171    }
2172
2173    // Test with both-closed intervals [a, b] - [1, 1] is NOT empty
is_frame (pd_test_5_all.cpp:50614)
50604}
50605
50606void case_1_dict_axis1(int& local_fail) {
50607    std::cout << "-- case_1_dict_axis1\n";
50608    auto df = make_flat_frame();
50609    pandas::RenameSpec spec;
50610    spec.kind = pandas::RenameSpec::Kind::Dict;
50611    spec.dict_mapper["a"] = "A";
50612    spec.dict_mapper["b"] = "B";
50613    auto r = df.rename_result(spec, /*axis=*/1, /*inplace=*/false, /*errors_raise=*/false);
50614    pandas_tests::check(r.is_frame(), "case_1.is_frame", local_fail);
50615    if (!r.is_frame()) return;
50616    auto& f = *std::get<std::unique_ptr<pandas::DataFrame>>(r.value);
50617    pandas_tests::check(f.columns().get_value_str(0) == "A", "case_1.col0_A", local_fail);
50618    pandas_tests::check(f.columns().get_value_str(1) == "B", "case_1.col1_B", local_fail);
50619}
50620
50621void case_2_dict_axis0(int& local_fail) {
50622    std::cout << "-- case_2_dict_axis0\n";
50623    auto df = make_flat_frame();
50624    df.set_index(std::make_unique<pandas::Index<std::string>>(
is_index (pd_test_5_all.cpp:100525)
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
100518        "C_26m_case_2_object_is_introspection_contract()_not_empty", local_fail);
100519    pandas_tests::check(!r.is_scalar(),
100520        "C_26m_case_2_object_is_introspection_contract()_not_scalar", local_fail);
100521    pandas_tests::check(r.is_series(),
100522        "C_26m_case_2_object_is_introspection_contract()_is_series", local_fail);
100523    pandas_tests::check(!r.is_frame(),
100524        "C_26m_case_2_object_is_introspection_contract()_not_frame", local_fail);
100525    pandas_tests::check(!r.is_index(),
100526        "C_26m_case_2_object_is_introspection_contract()_not_index", local_fail);
100527    pandas_tests::check(!r.is_ndarray(),
100528        "C_26m_case_2_object_is_introspection_contract()_not_ndarray", local_fail);
100529}
100530
100531void case_3_object_fillna_nan_no_missing(int& local_fail) {
100532    std::cout << "-- case_3_object_fillna_nan_no_missing\n";
100533    pandas::Series<numpy::object_> s(
100534        std::vector<numpy::object_>{
100535            numpy::object_(std::string("a")),
is_ndarray (pd_test_5_all.cpp:100527)
100517    pandas_tests::check(!r.is_empty(),
100518        "C_26m_case_2_object_is_introspection_contract()_not_empty", local_fail);
100519    pandas_tests::check(!r.is_scalar(),
100520        "C_26m_case_2_object_is_introspection_contract()_not_scalar", local_fail);
100521    pandas_tests::check(r.is_series(),
100522        "C_26m_case_2_object_is_introspection_contract()_is_series", local_fail);
100523    pandas_tests::check(!r.is_frame(),
100524        "C_26m_case_2_object_is_introspection_contract()_not_frame", local_fail);
100525    pandas_tests::check(!r.is_index(),
100526        "C_26m_case_2_object_is_introspection_contract()_not_index", local_fail);
100527    pandas_tests::check(!r.is_ndarray(),
100528        "C_26m_case_2_object_is_introspection_contract()_not_ndarray", local_fail);
100529}
100530
100531void case_3_object_fillna_nan_no_missing(int& local_fail) {
100532    std::cout << "-- case_3_object_fillna_nan_no_missing\n";
100533    pandas::Series<numpy::object_> s(
100534        std::vector<numpy::object_>{
100535            numpy::object_(std::string("a")),
100536            numpy::object_(std::string("b")),
100537            numpy::object_(std::string("c"))},
is_scalar (pd_test_5_all.cpp:100519)
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
100518        "C_26m_case_2_object_is_introspection_contract()_not_empty", local_fail);
100519    pandas_tests::check(!r.is_scalar(),
100520        "C_26m_case_2_object_is_introspection_contract()_not_scalar", local_fail);
100521    pandas_tests::check(r.is_series(),
100522        "C_26m_case_2_object_is_introspection_contract()_is_series", local_fail);
100523    pandas_tests::check(!r.is_frame(),
100524        "C_26m_case_2_object_is_introspection_contract()_not_frame", local_fail);
100525    pandas_tests::check(!r.is_index(),
100526        "C_26m_case_2_object_is_introspection_contract()_not_index", local_fail);
100527    pandas_tests::check(!r.is_ndarray(),
100528        "C_26m_case_2_object_is_introspection_contract()_not_ndarray", local_fail);
100529}
is_series (pd_test_5_all.cpp:100508)
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
100518        "C_26m_case_2_object_is_introspection_contract()_not_empty", local_fail);
of_scalar (pd_test_func_dispatch_5.cpp:109)
 99    sum_fs.name = "sum";
100    dict_specs["a"].push_back(std::move(sum_fs));
101    auto fa5 = pandas::FuncArg::from_dict_spec(std::move(dict_specs));
102    pandas_tests::check(fa5.kind == pandas::FuncArgKind::DictSpec,
103                        "from_dict_spec -> DictSpec", fail);
104}
105
106static void test_dispatcher_arms(int& fail) {
107    pandas::FuncDispatcher disp;
108    disp.on_string([](const std::string& name) {
109        return pandas::Result::of_scalar(static_cast<std::int64_t>(name.size()));
110    });
111    disp.on_string_list([](const std::vector<std::string>& names) {
112        return pandas::Result::of_scalar(static_cast<std::int64_t>(names.size()));
113    });
114    disp.on_callable([](const pandas::CallableHandle& h) {
115        pandas::MapCellInput in;
116        in.kind = pandas::MapCellInput::Float;
117        in.f = 0.0;
118        auto cell = h->invoke_cell(in);
119        return pandas::Result::of_scalar(cell.f);
of_scalar (pd_test_func_dispatch_5.cpp:109)
 99    sum_fs.name = "sum";
100    dict_specs["a"].push_back(std::move(sum_fs));
101    auto fa5 = pandas::FuncArg::from_dict_spec(std::move(dict_specs));
102    pandas_tests::check(fa5.kind == pandas::FuncArgKind::DictSpec,
103                        "from_dict_spec -> DictSpec", fail);
104}
105
106static void test_dispatcher_arms(int& fail) {
107    pandas::FuncDispatcher disp;
108    disp.on_string([](const std::string& name) {
109        return pandas::Result::of_scalar(static_cast<std::int64_t>(name.size()));
110    });
111    disp.on_string_list([](const std::vector<std::string>& names) {
112        return pandas::Result::of_scalar(static_cast<std::int64_t>(names.size()));
113    });
114    disp.on_callable([](const pandas::CallableHandle& h) {
115        pandas::MapCellInput in;
116        in.kind = pandas::MapCellInput::Float;
117        in.f = 0.0;
118        auto cell = h->invoke_cell(in);
119        return pandas::Result::of_scalar(cell.f);
of_scalar (pd_test_func_dispatch_5.cpp:109)
 99    sum_fs.name = "sum";
100    dict_specs["a"].push_back(std::move(sum_fs));
101    auto fa5 = pandas::FuncArg::from_dict_spec(std::move(dict_specs));
102    pandas_tests::check(fa5.kind == pandas::FuncArgKind::DictSpec,
103                        "from_dict_spec -> DictSpec", fail);
104}
105
106static void test_dispatcher_arms(int& fail) {
107    pandas::FuncDispatcher disp;
108    disp.on_string([](const std::string& name) {
109        return pandas::Result::of_scalar(static_cast<std::int64_t>(name.size()));
110    });
111    disp.on_string_list([](const std::vector<std::string>& names) {
112        return pandas::Result::of_scalar(static_cast<std::int64_t>(names.size()));
113    });
114    disp.on_callable([](const pandas::CallableHandle& h) {
115        pandas::MapCellInput in;
116        in.kind = pandas::MapCellInput::Float;
117        in.f = 0.0;
118        auto cell = h->invoke_cell(in);
119        return pandas::Result::of_scalar(cell.f);
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),
of_series (pd_test_5_all.cpp:100507)
100497        return sp->dtype_name_full();
100498    }
100499    return "<not-object-series>";
100500}
100501
100502void case_1_object_of_series_compiles_and_is_series(int& local_fail) {
100503    std::cout << "-- case_1_object_of_series_compiles_and_is_series\n";
100504    auto sp = mk_obj3_strings("a", "b", "c");
100505    // The line below is the INSTANTIATION PROOF — it fails to compile
100506    // against pre-fix HEAD (no matching Result::of_series overload).
100507    pandas::Result r = pandas::Result::of_series(std::move(sp));
100508    pandas_tests::check(r.is_series(),
100509        "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series",
100510        local_fail);
100511}
100512
100513void case_2_object_is_introspection_contract(int& local_fail) {
100514    std::cout << "-- case_2_object_is_introspection_contract\n";
100515    auto sp = mk_obj3_strings("a", "b", "c");
100516    pandas::Result r = pandas::Result::of_series(std::move(sp));
100517    pandas_tests::check(!r.is_empty(),