featurebyte.TimeSeriesTable.get_view¶
get_view( 
view_mode: Literal[ViewMode.AUTO, ViewMode.MANUAL]="auto", 
drop_column_names: Optional[List[str]]=None, 
column_cleaning_operations: Optional[List[ColumnCleaningOperation]]=None
) -> TimeSeriesViewDescription¶
Gets an TimeSeriesView object from an TimeSeriesTable object.
Parameters¶
- view_mode: Literal[ViewMode.AUTO, ViewMode.MANUAL]
 default: "auto"
 View mode to use. When auto, the view will be constructed with cleaning operations from the table, the record creation timestamp column will be dropped.
- drop_column_names: Optional[List[str]]
 List of column names to drop (manual mode only).
- column_cleaning_operations: Optional[List[ColumnCleaningOperation]]
 List of cleaning operations to apply per column in manual mode only. Each element in the list indicates the cleaning operations for a specific column. The association between this column and the cleaning operations is established via the ColumnCleaningOperation constructor.
Returns¶
- TimeSeriesView
 TimeSeriesView object constructed from the source table.
Examples¶
Get an TimeSeriesView in automated mode.
>>> time_series_table = catalog.get_table("GROCERYSALES")
>>> time_series_view = time_series_table.get_view()
>>> time_series_table = catalog.get_table("GROCERYSALES")
>>> time_series_view = time_series_table.get_view(
...     view_mode="manual",
...     drop_column_names=["record_available_at"],
...     column_cleaning_operations=[
...         fb.ColumnCleaningOperation(
...             column_name="Amount",
...             cleaning_operations=[
...                 fb.MissingValueImputation(imputed_value=0),
...                 fb.ValueBeyondEndpointImputation(
...                     type="less_than", end_point=0, imputed_value=None
...                 ),
...             ],
...         )
...     ],
... )  # doctest: +SKIP