set_config#
- skrub.set_config(use_tablereport=None, use_tablereport_expr=None, max_plot_columns=None, max_association_columns=None, subsampling_seed=None, enable_subsampling=None)[source]#
Set global skrub configuration.
- Parameters:
- use_tablereport
bool
, default=None The type of display used for dataframes. Default is
True
.If
True
, replace the default DataFrame HTML displays withTableReport
.If
False
, the original Pandas or Polars dataframe HTML representation will be used.
This configuration can also be set with the
SKB_USE_TABLEREPORT
environment variable.- use_tablereport_expr
bool
, default=None The type of HTML representation used for the dataframes preview in skrub expressions. Default is
False
.If
True
,TableReport
will be used.If
False
, the original Pandas or Polars dataframe display will be used.
This configuration can also be set with the
SKB_USE_TABLEREPORT_EXPR
environment variable.- max_plot_columns
int
, default=None Set the
max_plot_columns
argument ofTableReport
. Default is 30.This configuration can also be set with the
SKB_MAX_PLOT_COLUMNS
environment variable.- max_association_columns
int
, default=None Set the
max_association_columns
argument ofTableReport
. Default is 30.This configuration can also be set with the
SKB_MAX_ASSOCIATION_COLUMNS
environment variable.- subsampling_seed
int
, default=None Set the random seed of subsampling in skrub expressions
skrub.Expr.skb.subsample()
, whenhow="random"
is passed.This configuration can also be set with the
SKB_SUBSAMPLING_SEED
environment variable.- enable_subsampling{‘default’, ‘disable’, ‘force’}, default=None
Control the activation of subsampling in skrub expressions
skrub.Expr.skb.subsample()
. Default is"default"
.If
"default"
, the behavior ofskrub.Expr.skb.subsample()
is used.If
"disable"
, subsampling is never used, soskb.subsample
becomes a no-op.If
"force"
, subsampling is used in all expression evaluation modes (eval()
, fit_transform, etc.).
This configuration can also be set with the
SKB_ENABLE_SUBSAMPLING
environment variable.
- use_tablereport
See also
get_config
Retrieve current values for global configuration.
config_context
Context manager for global skrub configuration.
Examples
>>> from skrub import set_config >>> set_config(use_tablereport=True)