from_hb_results() method

Imports a Results table to an HCL dataframe.

Note

Using the hcl.from_hb_results() method requires that you also create a password variable called v_hb_token in the Variables window in the HCL script editor and assign a HighBond API token as the variable value. For more information, see Use the Variables window to define an HCL variable.

Syntax

hcl.from_hb_results(table_id = Results_table_ID_number)

Parameters

Name Description
table_id = Results_table_ID_number The numeric ID of the Results table.

Returns

HCL dataframe.

Examples

Import a Results table to an HCL dataframe

You import the Results table with ID 587293 to a newly created HCL dataframe with the name customer_summary.

customer_summary = hcl.from_hb_results(table_id = "587293")

Remarks

Data type mapping

When you import a Results table to an HCL dataframe, field data types in the table are automatically mapped to column data types in the dataframe.

Inconsistencies in Results table data affect the mapping of data types, or the translation of individual values:

  • If a numeric field in the Results table contains even one character value, the corresponding column in the HCL dataframe uses the object data type, and all values in the column are defined as text strings.

  • If a logical field in the Results table contains any non-Boolean values (values other than T/F or Y/N ), those values become None in the HCL dataframe.

  • If a datatime field in the Results table contains any empty values, those values become NaT in the HCL dataframe (Not-a-Time).

Field data type in Results table Column data type in HCL dataframe
character object
character category
numeric int64
numeric float64
datetime datetime64[ns]
numeric timedelta64[ns]
logical bool
data type cannot be identified object