Loading...

vastorbit.VastFrame.current_relation

VastFrame.current_relation(reindent: bool = True, split: bool = False) str

Returns the current VastFrame relation.

Parameters:
  • reindent (bool, optional) – Reindent the text to be more readable.

  • split (bool, optional) – Adds a split column __vastorbit_split__ in the relation, which can be used to downsample the data.

Returns:

The formatted current VastFrame relation.

Return type:

str

Examples

Let’s begin by importing vastorbit.

import vastorbit as vo

Hint

By assigning an alias to vastorbit, we mitigate the risk of code collisions with other libraries. This precaution is necessary because vastorbit uses commonly known function names like “average” and “median”, which can potentially lead to naming conflicts. The use of an alias ensures that the functions from vastorbit are used as intended without interfering with functions from other libraries.

Let us create a dummy dataset;

vdf = vo.VastFrame({"val": [0, 10, 20]})
123
val
Integer
10
210
320
Rows: 1-3 | Column: val | Type: integer

Now we can check its current relation conveniently by:

print(vdf.current_relation())

If we make any changes to the VastFrame, those will also be reflected in the current_relation. For example, we normalize the data:

vdf.normalize()

Let us observe the current relation now:

print(vdf.current_relation())

See also

VastFrame.explain() : Information on how VAST is computing the current VastFrame relation.
VastFrame.info() : Displays information about the different VastFrame transformations