API Reference

frame_to_hyper(df: pd.DataFrame, database: Union[str, pathlib.Path], *, table: Union[str, tableauhyperapi.Name, tableauhyperapi.TableName], hyper_process: Optional[HyperProcess]) → None:

Convert a DataFrame to a .hyper extract.

Parameters:
  • df – Data to be written out.
  • database – Name / location of the Hyper file to write to.
  • table – Table to write to. Must be supplied as a keyword argument.
  • hyper_process – A HyperProcess in case you want to spawn it by yourself. Optional. Must be supplied as a keyword argument.
frame_from_hyper(source: Union[str, pathlib.Path, tab_api.Connection], *, table: Union[str, tableauhyperapi.Name, tableauhyperapi.TableName], hyper_process: Optional[HyperProcess], use_float_na: bool = False) → pd.DataFrame:

Extracts a DataFrame from a .hyper extract.

Parameters:
  • source – Name / location of the Hyper file to be read or Hyper-API connection.
  • table – Table to read. Must be supplied as a keyword argument.
  • hyper_process – A HyperProcess in case you want to spawn it by yourself. Optional. Must be supplied as a keyword argument.
  • use_float_na – Flag indicating whether to use the pandas Float32/Float64 dtypes which support the new pandas missing value pd.NA, default False
Return type:

pd.DataFrame

frames_to_hyper(dict_of_frames: Dict[Union[str, tableauhyperapi.Name, tableauhyperapi.TableName], pd.DataFrame], database: Union[str, pathlib.Path], *, hyper_process: Optional[HyperProcess]) → None:

Writes multiple DataFrames to a .hyper extract.

Parameters:
  • dict_of_frames – A dictionary whose keys are valid table identifiers and values are dataframes
  • database – Name / location of the Hyper file to write to.
  • hyper_process – A HyperProcess in case you want to spawn it by yourself. Optional. Must be supplied as a keyword argument.
frames_from_hyper(source: Union[str, pathlib.Path, tab_api.Connection], *, hyper_process: Optional[HyperProcess]) → Dict[tableauhyperapi.TableName, pd.DataFrame, use_float_na: bool = False]:

Extracts tables from a .hyper extract.

Parameters:
  • source – Name / location of the Hyper file to be read or Hyper-API connection.
  • hyper_process – A HyperProcess in case you want to spawn it by yourself. Optional. Must be supplied as a keyword argument.
  • use_float_na – Flag indicating whether to use the pandas Float32/Float64 dtypes which support the new pandas missing value pd.NA, default False
Return type:

Dict[tableauhyperapi.TableName, pd.DataFrame]

frame_from_hyper_query(source: Union[str, pathlib.Path, tab_api.Connection], query: str, *, hyper_process: Optional[HyperProcess], use_float_na: bool = False) → pd.DataFrame:

New in version 2.0: Executes a SQL query and returns the result as a pandas dataframe

param source:Name / location of the Hyper file to be read or Hyper-API connection.
param query:SQL query to execute.
param hyper_process:
 A HyperProcess in case you want to spawn it by yourself. Optional. Must be supplied as a keyword argument.
param use_float_na:
 Flag indicating whether to use the pandas Float32/Float64 dtypes which support the new pandas missing value pd.NA, default False
rtype:Dict[tableauhyperapi.TableName, pd.DataFrame]