parameters: (self, src_ids=[], dst_ids=[], fields={}, format='sframe')
docstring: get_edges(self, src_ids=list(), dst_ids=list(), fields={}, format='sframe')
          Return a collection of edges and their attributes. This function is used
          to find edges by vertex IDs, filter on edge attributes, or list in-out
          neighbors of vertex sets.
  
          Parameters
          ----------
          src_ids, dst_ids : list or SArray, optional
              Parallel arrays of vertex IDs, with each pair corresponding to an
              edge to fetch. Only edges in this list are returned. ``None`` can be
              used to designate a wild card. For instance, ``src_ids=[1, 2,
              None]``, ``dst_ids=[3, None, 5]`` will fetch the edge 1->3, all
              outgoing edges of 2 and all incoming edges of 5. src_id and dst_id
              may be left empty, which implies an array of all wild cards.
  
          fields : dict, optional
              Dictionary specifying equality constraints on field values. For
              example, ``{'relationship': 'following'}``, returns only edges whose
              'relationship' field equals 'following'. ``None`` can be used as a
              value to designate a wild card. e.g. ``{'relationship': None}`` will
              find all edges with the field 'relationship' regardless of the
              value.
  
          format : {'sframe', 'list'}, optional
              Output format. The 'sframe' output (default) contains columns
              __src_id and __dst_id with edge vertex IDs and a column for each
              edge attribute. List output returns a list of Edge objects.
  
          Returns
          -------
          out : SFrame | list [Edge]
              An SFrame or list of edges.
  
          See Also
          --------
          edges, get_vertices
  
          Examples
          --------
          Return all edges in the graph.
  
          >>> from graphlab import SGraph, Edge
          >>> g = SGraph().add_edges([Edge(0, 1, attr={'rating': 5}),
                                      Edge(0, 2, attr={'rating': 2}),
                                      Edge(1, 2)])
          >>> g.get_edges(src_ids=[None], dst_ids=[None])
          +----------+----------+--------+
          | __src_id | __dst_id | rating |
          +----------+----------+--------+
          |    0     |    2     |   2    |
          |    0     |    1     |   5    |
          |    1     |    2     |  None  |
          +----------+----------+--------+
  
          Return edges with the attribute "rating" of 5.
  
          >>> g.get_edges(fields={'rating': 5})
          +----------+----------+--------+
          | __src_id | __dst_id | rating |
          +----------+----------+--------+
          |    0     |    1     |   5    |
          +----------+----------+--------+
  
          Return edges 0 --> 1 and 1 --> 2 (if present in the graph).
  
          >>> g.get_edges(src_ids=[0, 1], dst_ids=[1, 2])
          +----------+----------+--------+
          | __src_id | __dst_id | rating |
          +----------+----------+--------+
          |    0     |    1     |   5    |
          |    1     |    2     |  None  |
          +----------+----------+--------+
docstring_summary: get_edges(self, src_ids=list(), dst_ids=list(), fields={}, format='sframe')
          Return a collection of edges and their attributes. This function is used
          to find edges by vertex IDs, filter on edge attributes, or list in-out
          neighbors of vertex sets.
docstring_tokens: get_edges ( self src_ids = list () dst_ids = list () fields = {} format = sframe ) Return a collection of edges and their attributes . This function is used to find edges by vertex IDs filter on edge attributes or list in - out neighbors of vertex sets .
function: def get_edges(self, src_ids=[], dst_ids=[], fields={}, format='sframe'):
          """
          get_edges(self, src_ids=list(), dst_ids=list(), fields={}, format='sframe')
          Return a collection of edges and their attributes. This function is used
          to find edges by vertex IDs, filter on edge attributes, or list in-out
          neighbors of vertex sets.
  
          Parameters
          ----------
          src_ids, dst_ids : list or SArray, optional
              Parallel arrays of vertex IDs, with each pair corresponding to an
              edge to fetch. Only edges in this list are returned. ``None`` can be
              used to designate a wild card. For instance, ``src_ids=[1, 2,
              None]``, ``dst_ids=[3, None, 5]`` will fetch the edge 1->3, all
              outgoing edges of 2 and all incoming edges of 5. src_id and dst_id
              may be left empty, which implies an array of all wild cards.
  
          fields : dict, optional
              Dictionary specifying equality constraints on field values. For
              example, ``{'relationship': 'following'}``, returns only edges whose
              'relationship' field equals 'following'. ``None`` can be used as a
              value to designate a wild card. e.g. ``{'relationship': None}`` will
              find all edges with the field 'relationship' regardless of the
              value.
  
          format : {'sframe', 'list'}, optional
              Output format. The 'sframe' output (default) contains columns
              __src_id and __dst_id with edge vertex IDs and a column for each
              edge attribute. List output returns a list of Edge objects.
  
          Returns
          -------
          out : SFrame | list [Edge]
              An SFrame or list of edges.
  
          See Also
          --------
          edges, get_vertices
  
          Examples
          --------
          Return all edges in the graph.
  
          >>> from graphlab import SGraph, Edge
          >>> g = SGraph().add_edges([Edge(0, 1, attr={'rating': 5}),
                                      Edge(0, 2, attr={'rating': 2}),
                                      Edge(1, 2)])
          >>> g.get_edges(src_ids=[None], dst_ids=[None])
          +----------+----------+--------+
          | __src_id | __dst_id | rating |
          +----------+----------+--------+
          |    0     |    2     |   2    |
          |    0     |    1     |   5    |
          |    1     |    2     |  None  |
          +----------+----------+--------+
  
          Return edges with the attribute "rating" of 5.
  
          >>> g.get_edges(fields={'rating': 5})
          +----------+----------+--------+
          | __src_id | __dst_id | rating |
          +----------+----------+--------+
          |    0     |    1     |   5    |
          +----------+----------+--------+
  
          Return edges 0 --> 1 and 1 --> 2 (if present in the graph).
  
          >>> g.get_edges(src_ids=[0, 1], dst_ids=[1, 2])
          +----------+----------+--------+
          | __src_id | __dst_id | rating |
          +----------+----------+--------+
          |    0     |    1     |   5    |
          |    1     |    2     |  None  |
          +----------+----------+--------+
          """
  
          if not _is_non_string_iterable(src_ids):
              src_ids = [src_ids]
          if not _is_non_string_iterable(dst_ids):
              dst_ids = [dst_ids]
  
          if type(src_ids) not in (list, SArray):
              raise TypeError('src_ids must be list or SArray type')
          if type(dst_ids) not in (list, SArray):
              raise TypeError('dst_ids must be list or SArray type')
  
          # implicit Nones
          if len(src_ids) == 0 and len(dst_ids) > 0:
              src_ids = [None] * len(dst_ids)
          # implicit Nones
          if len(dst_ids) == 0 and len(src_ids) > 0:
              dst_ids = [None] * len(src_ids)
  
          with cython_context():
              sf = SFrame(_proxy=self.__proxy__.get_edges(src_ids, dst_ids, fields))
  
          if (format == 'sframe'):
              return sf
          if (format == 'dataframe'):
              assert HAS_PANDAS, 'Cannot use dataframe because Pandas is not available or version is too low.'
              if sf.num_rows() == 0:
                  return pd.DataFrame()
              else:
                  return sf.head(sf.num_rows()).to_dataframe()
          elif (format == 'list'):
              return _dataframe_to_edge_list(sf.to_dataframe())
          else:
              raise ValueError("Invalid format specifier")
function_tokens: def get_edges ( self , src_ids = [ ] , dst_ids = [ ] , fields = { } , format = 'sframe' ) : if not _is_non_string_iterable ( src_ids ) : src_ids = [ src_ids ] if not _is_non_string_iterable ( dst_ids ) : dst_ids = [ dst_ids ] if type ( src_ids ) not in ( list , SArray ) : raise TypeError ( 'src_ids must be list or SArray type' ) if type ( dst_ids ) not in ( list , SArray ) : raise TypeError ( 'dst_ids must be list or SArray type' ) # implicit Nones if len ( src_ids ) == 0 and len ( dst_ids ) > 0 : src_ids = [ None ] * len ( dst_ids ) # implicit Nones if len ( dst_ids ) == 0 and len ( src_ids ) > 0 : dst_ids = [ None ] * len ( src_ids ) with cython_context ( ) : sf = SFrame ( _proxy = self . __proxy__ . get_edges ( src_ids , dst_ids , fields ) ) if ( format == 'sframe' ) : return sf if ( format == 'dataframe' ) : assert HAS_PANDAS , 'Cannot use dataframe because Pandas is not available or version is too low.' if sf . num_rows ( ) == 0 : return pd . DataFrame ( ) else : return sf . head ( sf . num_rows ( ) ) . to_dataframe ( ) elif ( format == 'list' ) : return _dataframe_to_edge_list ( sf . to_dataframe ( ) ) else : raise ValueError ( "Invalid format specifier" )