Objectiv Documentation LogoObjectiv Documentation Logo
TrackingModelingTaxonomy
GitHubSlackTwitterObjectiv.io
  • Introduction
  • Get started in your notebook
  • Open model hub
  • Bach
    • Core Concepts
    • Usage
    • Supported Data Stores
    • API reference
      • DataFrame
        • agg
        • aggregate
        • all_series
        • append
        • astype
        • bfill
        • columns
        • copy
        • count
        • create_variable
        • cube
        • data
        • data_columns
        • database_create_table
        • describe
        • drop
        • drop_duplicates
        • dropna
        • dtypes
        • expanding
        • ffill
        • fillna
        • from_model
        • from_pandas
        • from_table
        • get_all_variable_usage
        • get_dummies
        • get_sample
        • get_unsampled
        • group_by
        • groupby
        • head
        • index
        • index_columns
        • index_dtypes
        • is_materialized
        • loc
        • materialize
        • max
        • DataFrame
        • mean
        • median
        • merge
        • min
        • minmax_scale
        • mode
        • nunique
        • order_by
        • plot
        • quantile
        • rename
        • reset_index
        • rolling
        • rollup
        • round
        • savepoints
        • scale
        • sem
        • set_index
        • set_savepoint
        • set_variable
        • sort_index
        • sort_values
        • stack
        • std
        • std_pop
        • sum
        • to_numpy
        • to_pandas
        • unstack
        • value_counts
        • var
        • variables
        • view_sql
        • window
      • Series
  • Example notebooks
  • 🏠
  • Modeling
  • Bach
  • API reference
  • DataFrame
  • set_variable

bach.DataFrame.set_variable

set_variable​

(name, value, *, dtype=None)

​[source]

Return a copy of this DataFrame with the variable value updated.

Parameters​

  • name (str) – name of variable to update
  • value (Any) – new value of variable
  • dtype (Optional[str]) – optional. If not set it will be derived from the value, if set we check that it matches the value. If dtype doesn’t match the value’s dtype, then an Exception is raised.

Returns​

copy of this DataFrame, with the value updated.

Return type​

bach.dataframe.DataFrame

  • Suggest an edit
  • Get help on Slack
  • Request feature or report issue
Previous
set_savepoint
Next
sort_index
  • set_variable
    • Parameters
    • Returns
    • Return type
  • Privacy Policy
  • Cookies
Copyright © 2022 Objectiv