图对象

class graphdatascience.graph.graph_object.Graph

表示图目录中图的图对象。它可以传递给算法端点以对相应的图进行计算。它包含有关图的摘要信息。

configuration() Series[Any]
返回:

图的配置

creation_time() Any
返回:

图的创建时间

database() str
返回:

存储图的数据库的名称

degree_distribution() Series[float]
返回:

图的度分布

density() float
返回:

图的密度

drop(failIfMissing: bool = False) Series[str]
参数:

failIfMissing – 如果图不存在是否失败

返回:

删除操作的结果

exists() bool
返回:

图是否存在

memory_usage() str
返回:

图的内存使用量

modification_time() Any
返回:

图的修改时间

name() str
返回:

图的名称

node_count() int
返回:

图中节点的数量

node_labels() List[str]
返回:

图中的节点标签

node_properties(label: str | None = None) 'Series[str]' | List[str]
参数:

label – 要获取属性的节点标签

返回:

给定标签的节点属性

relationship_count() int
返回:

图中关系的数量

relationship_properties(type: str | None = None) 'Series[str]' | List[str]
参数:

type – 要获取属性的关系类型

返回:

给定类型的关系属性

relationship_types() List[str]
返回:

图中的关系类型

size_in_bytes() int
返回:

图的大小(以字节为单位)