Extension to provide the way to rename a column.
More...
#include <iolink/view/ColumnRenamingExtension.h>
|
| virtual void | setColumnName (const std::string &columnName, const std::string &newName)=0 |
| | Set the name of a column identified with its name.
|
| |
| virtual void | setColumnName (size_t index, const std::string &newName)=0 |
| | Set the name of a column identified with its index.
|
| |
|
|
static constexpr size_t | EXTENSION_ID = 0x5 |
| | Identifier used to load the extension using the View::extension method.
|
| |
Extension to provide the way to rename a column.
This extension allows to set the name of a column in a dataframe.
◆ cast()
Upcast a generic extension to this specific type.
- Parameters
-
| extension | The extension to cast. |
- Returns
- The upcasted extension. This will be null if no upcasting is possible.
◆ setColumnName() [1/2]
| virtual void iolink::ColumnRenamingExtension::setColumnName |
( |
const std::string & |
columnName, |
|
|
const std::string & |
newName |
|
) |
| |
|
pure virtual |
Set the name of a column identified with its name.
- Parameters
-
| columnName | The name of the column to rename. |
| newName | The name to assign to the column. |
- Exceptions
-
| Error | if the given column name does not exist in the DataFrame. |
| InvalidArgument | if the given new name already exists in the DataFrame. |
| Error | if DataFrameView does not have the WRITE capability. |
◆ setColumnName() [2/2]
| virtual void iolink::ColumnRenamingExtension::setColumnName |
( |
size_t |
index, |
|
|
const std::string & |
newName |
|
) |
| |
|
pure virtual |
Set the name of a column identified with its index.
- Parameters
-
| columnIndex | The index of the column to rename. |
| newName | The name to assign to the column. |
- Exceptions
-
The documentation for this class was generated from the following file: