turicreate.SGraph.get_edge_fields

SGraph.get_edge_fields()

Return a list of edge attribute fields in the graph.

Returns:
out : list

Names of fields contained in the vertex data.

Examples

>>> from turicreate import SGraph, Vertex, Edge
>>> g = SGraph()
>>> verts = [Vertex(0, attr={'name': 'alex'}),
             Vertex(1, attr={'name': 'barbara'})]
>>> g = g.add_vertices(verts)
>>> g = g.add_edges(Edge(0, 1, attr={'frequency': 6}))
>>> fields = g.get_vertex_fields()
['__src_id', '__dst_id', 'frequency']