parameters: (ls, id_column_name)
return_statement: return df
docstring: Convert a list of vertices into dataframe.
docstring_summary: Convert a list of vertices into dataframe.
docstring_tokens: Convert a list of vertices into dataframe .
function: def _vertex_list_to_dataframe(ls, id_column_name):
      """
      Convert a list of vertices into dataframe.
      """
      assert (
          HAS_PANDAS
      ), "Cannot use dataframe because Pandas is not available or version is too low."
      cols = reduce(set.union, (set(v.attr.keys()) for v in ls))
      df = pd.DataFrame({id_column_name: [v.vid for v in ls]})
      for c in cols:
          df[c] = [v.attr.get(c) for v in ls]
      return df
function_tokens: def _vertex_list_to_dataframe ( ls , id_column_name ) : assert ( HAS_PANDAS ) , "Cannot use dataframe because Pandas is not available or version is too low." cols = reduce ( set . union , ( set ( v . attr . keys ( ) ) for v in ls ) ) df = pd . DataFrame ( { id_column_name : [ v . vid for v in ls ] } ) for c in cols : df [ c ] = [ v . attr . get ( c ) for v in ls ] return df