Method: Polars::SQLContext#unregister

Defined in:
lib/polars/sql_context.rb

#unregister(names) ⇒ SQLContext

Unregister one or more eager/lazy frames by name.

Examples:

Register with a SQLContext object:

df0 = Polars::DataFrame.new({"ints" => [9, 8, 7, 6, 5]})
lf1 = Polars::LazyFrame.new({"text" => ["a", "b", "c"]})
lf2 = Polars::LazyFrame.new({"misc" => ["testing1234"]})
ctx = Polars::SQLContext.new(test1: df0, test2: lf1, test3: lf2)
ctx.tables
# => ["test1", "test2", "test3"]

Unregister one or more of the tables:

ctx.unregister(["test1", "test3"]).tables
# => ["test2"]

Parameters:

  • names (Object)

    Names of the tables to unregister.

Returns:


159
160
161
162
163
164
165
166
167
# File 'lib/polars/sql_context.rb', line 159

def unregister(names)
  if names.is_a?(::String)
    names = [names]
  end
  names.each do |nm|
    _ctxt.unregister(nm)
  end
  self
end