class_docstr: Class which stores vertex and edge properties that can be used to construct
  Graphs from individual property selections and used later to annotate graph
  algorithm results with corresponding properties.
class_docstr_tok: ["Class","which","stores","vertex","and","edge","properties","that","can","be","used","to","construct","Graphs","from","individual","property","selections","and","used","later","to","annotate","graph","algorithm","results","with","corresponding","properties","."]
docstr: Return the number of all vertices or vertices of a given type.
  
  Parameters
  ----------
  type : string, optional
      If type is None (the default), return the total number of vertices,
      otherwise return the number of vertices of the specified type.
  include_edge_data : bool (default True)
      If True, include vertices that were added in vertex and edge data.
      If False, only include vertices that were added in vertex data.
      Note that vertices that only exist in edge data are assumed to have
      the default type.
  
  Returns
  -------
  int
      The number of vertices in the graph constrained by the type parameter.
  
  See Also
  --------
  PropertyGraph.get_num_edges
  
  Examples
  --------
  >>> import cugraph
  >>> import cudf
  >>> from cugraph.experimental import PropertyGraph
  >>> df = cudf.DataFrame(columns=["src", "dst", "some_property"],
  ...                     data=[(99, 22, "a"),
  ...                           (98, 34, "b"),
  ...                           (97, 56, "c"),
  ...                           (96, 88, "d"),
  ...                          ])
  >>> pG = PropertyGraph()
  >>> pG.add_edge_data(df, vertex_col_names=("src", "dst"))
  >>> pG.get_num_vertices()
  8
code: def get_num_vertices(self, type=None, *, include_edge_data=True):
      """
      Return the number of all vertices or vertices of a given type.
  
      Parameters
      ----------
      type : string, optional
          If type is None (the default), return the total number of vertices,
          otherwise return the number of vertices of the specified type.
      include_edge_data : bool (default True)
          If True, include vertices that were added in vertex and edge data.
          If False, only include vertices that were added in vertex data.
          Note that vertices that only exist in edge data are assumed to have
          the default type.
  
      Returns
      -------
      int
          The number of vertices in the graph constrained by the type parameter.
  
      See Also
      --------
      PropertyGraph.get_num_edges
  
      Examples
      --------
      >>> import cugraph
      >>> import cudf
      >>> from cugraph.experimental import PropertyGraph
      >>> df = cudf.DataFrame(columns=["src", "dst", "some_property"],
      ...                     data=[(99, 22, "a"),
      ...                           (98, 34, "b"),
      ...                           (97, 56, "c"),
      ...                           (96, 88, "d"),
      ...                          ])
      >>> pG = PropertyGraph()
      >>> pG.add_edge_data(df, vertex_col_names=("src", "dst"))
      >>> pG.get_num_vertices()
      8
      """
      if type is None:
          if not include_edge_data:
              if self.__vertex_prop_dataframe is None:
                  return 0
              return len(self.__vertex_prop_dataframe)
          if self.__num_vertices is not None:
              return self.__num_vertices
          self.__num_vertices = 0
          vert_sers = self.__get_all_vertices_series()
          if vert_sers:
              if self.__series_type is cudf.Series:
                  self.__num_vertices = cudf.concat(
                      vert_sers, ignore_index=True
                  ).nunique()
              else:
                  self.__num_vertices = pd.concat(
                      vert_sers, ignore_index=True
                  ).nunique()
          return self.__num_vertices
  
      value_counts = self._vertex_type_value_counts
      if type == self._default_type_name and include_edge_data:
          # The default type, "", can refer to both vertex and edge data
          if self.__vertex_prop_dataframe is None:
              return self.get_num_vertices()
          return (
              self.get_num_vertices()
              - len(self.__vertex_prop_dataframe)
              + (value_counts[type] if type in value_counts else 0)
          )
      if self.__vertex_prop_dataframe is None:
          return 0
      return value_counts[type] if type in value_counts else 0
  
imports: import cudf
  import numpy
  import cugraph
  from cugraph.utilities.utils import import_optional, MissingModule, create_list_series_from_2d_ar
  from typing import Union
label_desc: Use image node_id 12 for calling the EXPERIMENTAL__PropertyGraph obj's underlying member method code with example usage: obj.get_num_vertices(type) and returns: unknown, self, unknown, int, len, self, self, int