|
opynsim
Unofficial C++ Documentation
|
Represents a single column of a DataFrame.
More...
#include <series.h>
Public Types | |
| using | value_type = double |
| using | size_type = size_t |
| using | const_reference = const value_type & |
| using | const_iterator = const value_type * |
Public Member Functions | |
| Series () | |
Constructs an unnamed empty Series. | |
| Series (std::string name, std::vector< double > values) | |
Constructs a Series with name and associated values. | |
| osc::CStringView | name () const |
Returns the name of this Series. | |
| std::tuple< size_t > | shape () const |
Returns the shape (rows) of this Series. | |
| bool | empty () const |
Returns true if this Series contains no rows. | |
| size_type | size () const |
Returns the number of rows in this Series. | |
| const_reference | operator[] (size_type pos) const |
Returns a reference to the element at the specified position pos. | |
| const_iterator | begin () const |
Returns an iterator to the first value in *this. | |
| const_iterator | end () const |
Returns an iterator past the last value in *this. | |
| const double * | data () const |
| std::vector< double > | to_list () const |
Converts this Series into a std::vector of its values. | |
| Series | map_elements (const std::function< double(double)> &f) const |
Friends | |
| bool | operator== (const Series &, const Series &) |
| Series | operator* (double, const Series &) |
| Series | operator* (const Series &, double) |
Represents a single column of a DataFrame.
| using opyn::Series::const_iterator = const value_type* |
| using opyn::Series::const_reference = const value_type& |
| using opyn::Series::size_type = size_t |
| using opyn::Series::value_type = double |
| opyn::Series::Series | ( | ) |
Constructs an unnamed empty Series.
| opyn::Series::Series | ( | std::string | name, |
| std::vector< double > | values | ||
| ) |
Constructs a Series with name and associated values.
| const_iterator opyn::Series::begin | ( | ) | const |
Returns an iterator to the first value in *this.
| const double * opyn::Series::data | ( | ) | const |
Returns a pointer to the underlying contiguous array that backs *this (care: this API is unstable and might evolve over time to support chunking, etc.).
| bool opyn::Series::empty | ( | ) | const |
Returns true if this Series contains no rows.
| const_iterator opyn::Series::end | ( | ) | const |
Returns an iterator past the last value in *this.
| Series opyn::Series::map_elements | ( | const std::function< double(double)> & | f | ) | const |
Returns a new Series with the same name as *this, but with each data value replaced by f(value).
| osc::CStringView opyn::Series::name | ( | ) | const |
Returns the name of this Series.
| const_reference opyn::Series::operator[] | ( | size_type | pos | ) | const |
Returns a reference to the element at the specified position pos.
| std::tuple< size_t > opyn::Series::shape | ( | ) | const |
Returns the shape (rows) of this Series.
| std::vector< double > opyn::Series::to_list | ( | ) | const |
Converts this Series into a std::vector of its values.
Returns a new Series with the same name as lhs, but with each of its data values multiplied by rhs.
Returns a new Series with the same name as rhs, but with each of its data values multiplied by lhs.
Returns true all members of lhs compare equivalent to rhs.
Note: This operator confirms to IEEE 754 and C++'s regular type invariants, which means identity checks are non-reflexive for special values. Therefore, if either lhs or rhs contains NaN, this operator will return false.