turicreate.SGraph.get_vertex_fields

SGraph.get_vertex_fields()

Return a list of vertex attribute fields in the SGraph.

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()
['__id', 'name']