Skip to content

featurebyte.Table.preview

preview(
limit: int=10,
after_cleaning: bool=False
) -> DataFrame

Description

Returns a DataFrame that contains a selection of rows of the table. By default, the materialization process occurs before any cleaning operations that were defined at the table level.

Parameters

  • limit: int
    default: 10
    Maximum number of return rows.

  • after_cleaning: bool
    default: False
    Whether to apply cleaning operations.

Returns

  • DataFrame
    Preview rows of the table.

Examples

Preview a table without cleaning operations.

>>> event_table = catalog.get_table("GROCERYINVOICE")
>>> description = event_table.preview(limit=5)
Preview a table after cleaning operations have been applied.

>>> event_table = catalog.get_table("GROCERYINVOICE")
>>> event_table["Amount"].update_critical_data_info(
...     cleaning_operations=[
...         fb.MissingValueImputation(imputed_value=0),
...     ]
... )
>>> description = event_table.preview(limit=5, after_cleaning=True)