Table Of Contents

VertexFrame add_vertices


add_vertices(self, source_frame, id_column_name, column_names=None)

Add vertices to a graph.

Parameters:

source_frame : <bound method AtkEntityType.__name__ of <trustedanalytics.rest.jsonschema.AtkEntityType object at 0x7f9e686f3fd0>>

Frame that will be the source of the vertex data.

id_column_name : unicode

Column name for a unique id for each vertex.

column_names : list (default=None)

Column names that will be turned into properties for each vertex.

Returns:

: _Unit

Includes appending to a list of existing vertices.

Examples

>>> graph = ta.Graph()
>>> graph.define_vertex_type('users')
>>> graph.vertices['users'].add_vertices(frame, 'user_id', ['user_name', 'age'])