compute_flextable_keys

In [ ]:
compute_flextable_keys(flex_name: str, 
                       usecols: list = [],)

Computes the flex table keys and returns the predicted data types.

Parameters

Name Type Optional Description
flex_name
str
Flex table name.
usecols
list
List of columns to consider.

Returns

List of tuples : List of virtual column names and their respective data types.

Example

In [1]:
from verticapy.utilities import read_json, compute_flextable_keys

read_json("laliga/*.json", table_name = "laliga", materialize = False)
compute_flextable_keys(flex_name = "v_temp_schema.laliga",)
Out[1]:
[['referee.country.id', 'Integer'],
 ['referee.country.name', 'Varchar(20)'],
 ['stadium.id', 'Integer'],
 ['stadium.name', 'Varchar(64)'],
 ['stadium.country.name', 'Varchar(26)'],
 ['stadium.country.id', 'Integer'],
 ['referee.id', 'Integer'],
 ['referee.name', 'Varchar(46)'],
 ['away_team.managers', 'long varbinary(384)'],
 ['home_team.managers', 'long varbinary(378)'],
 ['metadata.xy_fidelity_version', 'Integer'],
 ['season.season_name', 'Varchar(20)'],
 ['metadata.data_version', 'Date'],
 ['match_date', 'Date'],
 ['home_team.home_team_name', 'Varchar(40)'],
 ['home_team.home_team_id', 'Integer'],
 ['home_team.home_team_group', 'Varchar(20)'],
 ['home_score', 'Integer'],
 ['competition_stage.name', 'Varchar(28)'],
 ['competition.competition_id', 'Integer'],
 ['away_team.country.name', 'Varchar(20)'],
 ['season.season_id', 'Integer'],
 ['match_week', 'Integer'],
 ['match_status', 'Varchar(20)'],
 ['last_updated', 'Timestamp'],
 ['home_team.country.name', 'Varchar(20)'],
 ['competition_stage.id', 'Integer'],
 ['away_team.country.id', 'Integer'],
 ['away_team.away_team_group', 'Varchar(20)'],
 ['away_score', 'Integer'],
 ['kick_off', 'Time'],
 ['home_team.home_team_gender', 'Varchar(20)'],
 ['home_team.country.id', 'Integer'],
 ['competition.competition_name', 'Varchar(20)'],
 ['away_team.away_team_name', 'Varchar(38)'],
 ['away_team.away_team_gender', 'Varchar(20)'],
 ['metadata.shot_fidelity_version', 'Integer'],
 ['match_id', 'Integer'],
 ['competition.country_name', 'Varchar(20)'],
 ['away_team.away_team_id', 'Integer']]