import_table#

Hfss.import_table(input_file: str | Path, name: str, is_real_imag: bool = True, is_field: bool = False, column_names: List[str] | None = None, independent_columns: List[bool] | None = None) bool#

Import a data table.

The table can have multiple independent real-valued columns of data, and multiple dependent real- or complex-valued columns of data. The data supported is comma-delimited format (.csv). The first row may contain column names. Complex data columns are inferred from the column data format. In comma-delimited format, “(double, double)” denotes a complex number.

Parameters:
input_filestr or pathlib.Path

Full path to the file. Supported formats is ".csv".

namestr

Table name.

is_real_imagbool, optional

Whether to use real and imaginary to interpret data for any complex column. If False, then use magnitude and phase in degrees. The default is True.

is_fieldbool, optional

Whether to matrix data. If True, then use field data. The default is False.

column_nameslist, optional

Column names. The default is None, in which case column names obtained from data file are assigned.

independent_columnslist, optional

Indicates which columns are independent. If None, only the first column is independent.

Returns:
bool

True when successful, False when failed.

References

>>> oModule.ImportTable

Examples

>>> from ansys.aedt.core import Hfss
>>> hfss = Hfss()
>>> hfss.import_table(input_file="my_file.csv")