with_role

View.with_role(names, role, time_formats=None)[source]

Returns a new View with modified roles.

When switching from a role based on type float to a role based on type string or vice verse, an implicit type conversion will be conducted. The time_formats argument is used to interpret time format string. For more information on roles, please refer to the user guide.

Args:
names (str or List[str]):

The name or names of the column.

role (str):

The role to be assigned.

time_formats (str or List[str], optional):

Formats to be used to parse the time stamps. This is only necessary, if an implicit conversion from a StringColumn to a time stamp is taking place.