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: Renumber edge IDs to be contiguous by type.
  
  Parameters
  ----------
  prev_id_column : str, optional
      Column name to save the edge ID before renumbering.
  
  Returns
  -------
  DataFrame
      with the start and stop IDs for each edge type. Stop is *inclusive*.
  
  Examples
  --------
  >>> import cugraph
  >>> import cudf
  >>> from cugraph.experimental import PropertyGraph
  >>> pG = PropertyGraph()
  >>> df = cudf.DataFrame(columns=["src", "dst", "edge_ids" ,"some_property"],
  ...                     data=[(99, 22, 3, "a"),
  ...                           (98, 34, 5, "b"),
  ...                           (97, 56, 7, "c"),
  ...                           (96, 88, 11, "d"),
  ...                          ])
  >>> df2 = cudf.DataFrame(columns=["src", "dst", "edge_ids" ,"some_property"],
  ...                      data=[(95, 24, 2, "a"),
  ...                            (94, 36, 4, "b"),
  ...                            (93, 88, 8, "d"),
  ...                           ])
  >>> pG.add_edge_data(df,
  ...                  type_name="etype1",
  ...                  vertex_col_names=("src", "dst"),
  ...                  edge_id_col_name="edge_ids")
  >>> pG.add_edge_data(df2,
  ...                  type_name="etype2",
  ...                  vertex_col_names=("src", "dst"),
  ...                  edge_id_col_name="edge_ids")
  >>> pG.renumber_edges_by_type()
          start  stop
  etype1      0     3
  etype2      4     6
code: def renumber_edges_by_type(self, prev_id_column=None):
      """
      Renumber edge IDs to be contiguous by type.
  
      Parameters
      ----------
      prev_id_column : str, optional
          Column name to save the edge ID before renumbering.
  
      Returns
      -------
      DataFrame
          with the start and stop IDs for each edge type. Stop is *inclusive*.
  
      Examples
      --------
      >>> import cugraph
      >>> import cudf
      >>> from cugraph.experimental import PropertyGraph
      >>> pG = PropertyGraph()
      >>> df = cudf.DataFrame(columns=["src", "dst", "edge_ids" ,"some_property"],
      ...                     data=[(99, 22, 3, "a"),
      ...                           (98, 34, 5, "b"),
      ...                           (97, 56, 7, "c"),
      ...                           (96, 88, 11, "d"),
      ...                          ])
      >>> df2 = cudf.DataFrame(columns=["src", "dst", "edge_ids" ,"some_property"],
      ...                      data=[(95, 24, 2, "a"),
      ...                            (94, 36, 4, "b"),
      ...                            (93, 88, 8, "d"),
      ...                           ])
      >>> pG.add_edge_data(df,
      ...                  type_name="etype1",
      ...                  vertex_col_names=("src", "dst"),
      ...                  edge_id_col_name="edge_ids")
      >>> pG.add_edge_data(df2,
      ...                  type_name="etype2",
      ...                  vertex_col_names=("src", "dst"),
      ...                  edge_id_col_name="edge_ids")
      >>> pG.renumber_edges_by_type()
              start  stop
      etype1      0     3
      etype2      4     6
      """
      TCN = self.type_col_name
  
      if self.__edge_prop_dataframe is None:
          return None
      if (
          prev_id_column is not None
          and prev_id_column in self.__edge_prop_dataframe
      ):
          raise ValueError(
              f"Can't save previous IDs to existing column {prev_id_column!r}"
          )
  
      # Use categorical dtype for the type column
      if self.__series_type is cudf.Series:
          cat_class = cudf.CategoricalDtype
      else:
          cat_class = pd.CategoricalDtype
  
      is_cat = isinstance(
          self.__edge_prop_dataframe.dtypes[TCN], cat_class
      )
      if not is_cat:
          cat_dtype = cat_class([TCN], ordered=False)
          self.__edge_prop_dataframe[TCN] = self.__edge_prop_dataframe[
              TCN
          ].astype(cat_dtype)
  
      df = self.__edge_prop_dataframe
      index_dtype = df.index.dtype
      if prev_id_column is None:
          if (
              len(df.dtypes[TCN].categories) > 1
              and len(self.edge_types) > 1
          ):
              # Avoid `sort_values` if we know there is only one type
              df = df.sort_values(by=TCN, ignore_index=True)
          else:
              df.reset_index(drop=True, inplace=True)
      else:
          if (
              len(df.dtypes[TCN].categories) > 1
              and len(self.edge_types) > 1
          ):
              # Avoid `sort_values` if we know there is only one type
              df = df.sort_values(by=TCN)
          df.index.name = prev_id_column
          df.reset_index(inplace=True)
      df.index = df.index.astype(index_dtype)
      df.index.name = self.edge_id_col_name
      self.__edge_prop_dataframe = df
      rv = (
          self._edge_type_value_counts.sort_index()
          .cumsum()
          .to_frame("stop")
      )
      rv["start"] = rv["stop"].shift(1, fill_value=0)
      rv["stop"] -= 1  # Make inclusive
      return rv[["start", "stop"]]
  
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 31 for calling the EXPERIMENTAL__PropertyGraph obj's underlying member method code with example usage: obj.renumber_edges_by_type(prev_id_column) and returns: rv, None