vDataFrameSQL¶
In [ ]:
vDataFrameSQL(relation: str,
name: str = "VDF",
schema: str = "public",
history: list = [],
saving: list = [])
Creates a vDataFrame based on a customized relation.
Parameters¶
Name | Type | Optional | Description |
---|---|---|---|
relation | str | ❌ | Relation. It can be a customized relation but you need to englobe it using an alias. For example "(SELECT 1) x" is correct whereas "(SELECT 1)" or "SELECT 1" are incorrect. |
name | str | ✓ | Name of the vDataFrame. It is used only when displaying the vDataFrame. |
schema | str | ✓ | Relation schema. It can be to use to be less ambiguous and allow to create schema and relation name with dots '.' inside. |
history | list | ✓ | vDataFrame history (user modifications). To use to keep the previous vDataFrame history. |
saving | list | ✓ | List to use to reconstruct the vDataFrame from previous transformations. |
Returns¶
vDataFrame : The vDataFrame associated to the input relation.
Example¶
In [2]:
from verticapy.utilities import vDataFrameSQL
vDataFrameSQL("(SELECT pclass, embarked, AVG(survived) FROM public.titanic GROUP BY 1, 2) x")
Out[2]: