code: def pandas2igraph(self, edges, directed=True):
          
  
  
          import igraph
          self._check_mandatory_bindings(False)
          self._check_bound_attribs(edges, ['source', 'destination'], 'Edge')
          
          self._node = self._node or Plotter._defaultNodeId
          eattribs = edges.columns.values.tolist()
          eattribs.remove(self._source)
          eattribs.remove(self._destination)
          cols = [self._source, self._destination] + eattribs
          etuples = [tuple(x) for x in edges[cols].values]
          return igraph.Graph.TupleList(etuples, directed=directed, edge_attrs=eattribs,
                                        vertex_name_attr=self._node)
docs: Convert a pandas edge dataframe to an IGraph graph.
  
          Uses current bindings. Defaults to treating edges as directed.
  
          **Example**
              ::
  
                  import graphistry
                  g = graphistry.bind()
  
                  es = pandas.DataFrame({'src': [0,1,2], 'dst': [1,2,0]})
                  g = g.bind(source='src', destination='dst')
  
                  ig = g.pandas2igraph(es)
                  ig.vs['community'] = ig.community_infomap().membership
                  g.bind(point_color='community').plot(ig)