RowsRange ========= .. cpp:class:: pandas::RowsRange Iterator class for traversing pandas data structures. Example ------- .. code-block:: cpp #include using namespace pandas; // Use RowsRange RowsRange obj; // ... operations ... Iteration --------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``RowIterator begin() const`` - RowIterator - pd_dataframe.h:2237 - :ref:`View ` * - ``RowIterator end() const`` - RowIterator - pd_dataframe.h:2241 - :ref:`View ` Other Methods ------------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``explicit RowsRange(const DataFrame\* df) : df_(df)`` - explicit RowsRange(const DataFrame\* df) : - pd_dataframe.h:2235 - Code Examples ------------- The following examples are extracted from the test suite. .. _example-rowsrange-begin-0: .. dropdown:: begin (pd_test_1_all.cpp:457) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 447 :emphasize-lines: 11 }; pandas::CategoricalArray arr(values); const std::vector& cats = arr.categories(); if (cats.size() != 3) { std::cout << " [FAIL] : in pd_test_categorical_array_categories_property() : categories size != 3" << std::endl; throw std::runtime_error("pd_test_categorical_array_categories_property failed: categories size != 3"); } // Categories should be unique std::set unique_cats(cats.begin(), cats.end()); if (unique_cats.size() != cats.size()) { std::cout << " [FAIL] : in pd_test_categorical_array_categories_property() : categories not unique" << std::endl; throw std::runtime_error("pd_test_categorical_array_categories_property failed: categories not unique"); } std::cout << " -> tests passed" << std::endl; } void pd_test_categorical_array_codes_property() { std::cout << "========= CategoricalArray: codes property ======================= "; .. _example-rowsrange-end-1: .. dropdown:: end (pd_test_1_all.cpp:457) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 447 :emphasize-lines: 11 }; pandas::CategoricalArray arr(values); const std::vector& cats = arr.categories(); if (cats.size() != 3) { std::cout << " [FAIL] : in pd_test_categorical_array_categories_property() : categories size != 3" << std::endl; throw std::runtime_error("pd_test_categorical_array_categories_property failed: categories size != 3"); } // Categories should be unique std::set unique_cats(cats.begin(), cats.end()); if (unique_cats.size() != cats.size()) { std::cout << " [FAIL] : in pd_test_categorical_array_categories_property() : categories not unique" << std::endl; throw std::runtime_error("pd_test_categorical_array_categories_property failed: categories not unique"); } std::cout << " -> tests passed" << std::endl; } void pd_test_categorical_array_codes_property() { std::cout << "========= CategoricalArray: codes property ======================= ";