kg_topology_toolbox.utils.check_kg_df_structure

kg_topology_toolbox.utils.check_kg_df_structure(kg_df, h, r, t)[source]

Utility to perform sanity checks on the structure of the provided DataFrame, to ensure that it encodes a Knowledge Graph in a compatible way.

Parameters:
  • kg_df (DataFrame) – The Knowledge Graph DataFrame.

  • h (str) – The name of the column with the IDs of head entities.

  • r (str) – The name of the column with the IDs of relation types.

  • t (str) – The name of the column with the IDs of tail entities.

Return type:

None