(self)
return df
Export vertices with attributes to pandas.DataFrame

        If you want to use vertex names as index, you can do:

        >>> from string import ascii_letters
        >>> graph = Graph.GRG(25, 0.4)
        >>> graph.vs["name"] = ascii_letters[:graph.vcount()]
        >>> df = graph.get_vertex_dataframe()
        >>> df.set_index('name', inplace=True)

        @return: a pandas.DataFrame representing vertices and their attributes.
          The index uses vertex IDs, from 0 to N - 1 where N is the number of
          vertices.
Export vertices with attributes to pandas.DataFrame
Export vertices with attributes to pandas . DataFrame
def get_vertex_dataframe(self):
        """Export vertices with attributes to pandas.DataFrame

        If you want to use vertex names as index, you can do:

        >>> from string import ascii_letters
        >>> graph = Graph.GRG(25, 0.4)
        >>> graph.vs["name"] = ascii_letters[:graph.vcount()]
        >>> df = graph.get_vertex_dataframe()
        >>> df.set_index('name', inplace=True)

        @return: a pandas.DataFrame representing vertices and their attributes.
          The index uses vertex IDs, from 0 to N - 1 where N is the number of
          vertices.
        """
        try:
            import pandas as pd
        except ImportError:
            raise ImportError("You should install pandas in order to use this function")

        df = pd.DataFrame(
            {attr: self.vs[attr] for attr in self.vertex_attributes()},
            index=list(range(self.vcount())),
        )
        df.index.name = "vertex ID"

        return df
def get_vertex_dataframe ( self ) : try : import pandas as pd except ImportError : raise ImportError ( "You should install pandas in order to use this function" ) df = pd . DataFrame ( { attr : self . vs [ attr ] for attr in self . vertex_attributes ( ) } , index = list ( range ( self . vcount ( ) ) ) , ) df . index . name = "vertex ID" return df