unreal.DataTableFunctionLibrary

class unreal.DataTableFunctionLibrary(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintFunctionLibrary

Data Table Function Library

C++ Source:

  • Module: Engine

  • File: DataTableFunctionLibrary.h

classmethod does_data_table_row_exist(table, row_name) bool

Returns whether or not Table contains a row named RowName

Parameters:
Return type:

bool

classmethod evaluate_curve_table_row(curve_table, row_name, xy, context_string) -> (out_result=EvaluateCurveTableResult, out_xy=float)

Evaluate Curve Table Row

Parameters:
Returns:

out_result (EvaluateCurveTableResult):

out_xy (float):

Return type:

tuple

classmethod export_data_table_to_csv_file(data_table, csv_file_path) bool

Export a Data Table to CSV file.

Parameters:
  • data_table (DataTable) –

  • csv_file_path (str) – The file path of the CSV file to write (output file is UTF-8).

Returns:

True if the operation succeeds, check the log for errors if it didn’t succeed.

Return type:

bool

classmethod export_data_table_to_csv_string(data_table) str or None

Export a Data Table to CSV string.

Parameters:

data_table (DataTable) –

Returns:

True if the operation succeeds, check the log for errors if it didn’t succeed.

out_csv_string (str): Output representing the contents of a CSV file.

Return type:

str or None

classmethod export_data_table_to_json_file(data_table, json_file_path) bool

Export a Data Table to JSON file.

Parameters:
  • data_table (DataTable) –

  • json_file_path (str) – The file path of the JSON file to write (output file is UTF-8).

Returns:

True if the operation succeeds, check the log for errors if it didn’t succeed.

Return type:

bool

classmethod export_data_table_to_json_string(data_table) str or None

Export a Data Table to JSON string.

Parameters:

data_table (DataTable) –

Returns:

True if the operation succeeds, check the log for errors if it didn’t succeed.

out_json_string (str): Output representing the contents of a JSON file.

Return type:

str or None

classmethod fill_data_table_from_csv_file(data_table, csv_file_path, import_row_struct=None) bool

Empty and fill a Data Table from CSV file.

Parameters:
  • data_table (DataTable) –

  • csv_file_path (str) – The file path of the CSV file.

  • import_row_struct (ScriptStruct) – Optional row struct to apply on import. If set will also force the import to run automated (no questions or dialogs).

Returns:

True if the operation succeeds, check the log for errors if it didn’t succeed.

Return type:

bool

classmethod fill_data_table_from_csv_string(data_table, csv_string, import_row_struct=None) bool

Empty and fill a Data Table from CSV string.

Parameters:
  • data_table (DataTable) –

  • csv_string (str) – The Data that representing the contents of a CSV file.

  • import_row_struct (ScriptStruct) – Optional row struct to apply on import. If set will also force the import to run automated (no questions or dialogs).

Returns:

True if the operation succeeds, check the log for errors if it didn’t succeed.

Return type:

bool

classmethod fill_data_table_from_json_file(data_table, json_file_path, import_row_struct=None) bool

Empty and fill a Data Table from JSON file.

Parameters:
  • data_table (DataTable) –

  • json_file_path (str) – The file path of the JSON file.

  • import_row_struct (ScriptStruct) – Optional row struct to apply on import. If set will also force the import to run automated (no questions or dialogs).

Returns:

True if the operation succeeds, check the log for errors if it didn’t succeed.

Return type:

bool

classmethod fill_data_table_from_json_string(data_table, json_string, import_row_struct=None) bool

Empty and fill a Data Table from JSON string.

Parameters:
  • data_table (DataTable) –

  • json_string (str) – The Data that representing the contents of a JSON file.

  • import_row_struct (ScriptStruct) – Optional row struct to apply on import. If set will also force the import to run automated (no questions or dialogs).

Returns:

True if the operation succeeds, check the log for errors if it didn’t succeed.

Return type:

bool

classmethod get_data_table_column_as_string(data_table, property_name) Array[str]

Export from the DataTable all the row for one column. Export it as string. The row name is not included. see: GetDataTableColumnNames. see: GetDataTableColumnNameFromExportName.

Parameters:
Return type:

Array[str]

classmethod get_data_table_column_export_names(table) Array[str]

Get the friendly export name of each column in this Data Table. see: GetDataTableColumnNameFromExportName.

Parameters:

table (DataTable) –

Returns:

out_export_column_names (Array[str]):

Return type:

Array[str]

classmethod get_data_table_column_name_from_export_name(table, column_export_name) Name or None

Get the raw property name of a data table column from its friendly export name.

Parameters:
Returns:

True if a column was found for the friendly name, false otherwise.

out_column_name (Name):

Return type:

Name or None

classmethod get_data_table_column_names(table) Array[Name]

Get the name of each column in this Data Table. note: These are always the raw property names ( see: GetDataTableColumnAsString) rather than the friendly export name that would be used in a CSV/JSON export ( see: GetDataTableColumnNameFromExportName).

Parameters:

table (DataTable) –

Returns:

out_column_names (Array[Name]):

Return type:

Array[Name]

classmethod get_data_table_row_names(table) Array[Name]

Get Data Table Row Names

Parameters:

table (DataTable) –

Returns:

out_row_names (Array[Name]):

Return type:

Array[Name]

classmethod get_data_table_row_struct(table) ScriptStruct

Get the row struct used by the given Data Table, if any

Parameters:

table (DataTable) –

Return type:

ScriptStruct