def load_networkfile_path Load network from file param file_path Full pathname of the network file return net class pandasDataFrame Edges in the network nodes class pandasDataFrame Th
该函数用于从文件中加载网络数据,并返回该网络的节点和边信息。
参数file_path是网络文件的完整路径。
函数返回两个Pandas数据框,net和nodes。其中,net表示网络的边信息,包含两列:源节点和目标节点。nodes表示网络的节点信息,只有一列:节点名称。在构建节点信息时,先将源节点和目标节点合并为一个数据框,然后去除重复的节点信息,并按顺序为节点重新编号。最后,函数返回两个数据框。
原文地址: http://www.cveoy.top/t/topic/fdZ8 著作权归作者所有。请勿转载和采集!