Method: Polars::Config.set_tbl_column_data_type_inline

Defined in:
lib/polars/config.rb

.set_tbl_column_data_type_inline(active = true) ⇒ Config

Moves the data type inline with the column name (to the right, in parentheses).

Examples:

df = Polars::DataFrame.new({"abc" => [1.0, 2.5, 5.0], "xyz" => [true, false, true]})
Polars::Config.new(tbl_column_data_type_inline: true) do
  p df
end
# =>
# shape: (3, 2)
# ┌───────────┬────────────┐
# │ abc (f64) ┆ xyz (bool) │
# ╞═══════════╪════════════╡
# │ 1.0       ┆ true       │
# │ 2.5       ┆ false      │
# │ 5.0       ┆ true       │
# └───────────┴────────────┘


306
307
308
309
# File 'lib/polars/config.rb', line 306

def self.set_tbl_column_data_type_inline(active = true)
  ENV["POLARS_FMT_TABLE_INLINE_COLUMN_DATA_TYPE"] = active ? "1" : "0"
  self
end