class_docstr: Pandas dataframe class with a simplified selection function
docstr: Asserts that two selectors are equal, up to row and column permutations
  
  Note
  ----
  Use sparsely, since it is quite slow to test
docstr_tok: ["Asserts","that","two","selectors","are","equal",",","up","to","row","and","column","permutations","Note","--","--","Use","sparsely",",","since","it","is","quite","slow","to","test"]
code: def assert_equivalent(
      self, other: pd.DataFrame, err_msg: str = ""
  ) -> None:
      """Asserts that two selectors are equal, up to row and column permutations
  
      Note
      ----
      Use sparsely, since it is quite slow to test
      """
      testing.assert_set_equal(
          other.columns, self.columns, f"Different columns\n{err_msg}"
      )
      np.testing.assert_equal(
          len(other), len(self), "Different number of rows\n{err_msg}"
      )
      other_df = other.loc[:, self.columns]
      df_rows: tp.List[tp.List[tp.Tuple[tp.Any, ...]]] = [[], []]
      for k, df in enumerate([self, other_df]):
          for row in df.itertuples(index=False):
              df_rows[k].append(tuple(row))
          df_rows[k].sort()
      for row1, row2 in zip(*df_rows):
          np.testing.assert_array_equal(row1, row2, err_msg=err_msg)
  
file_path: nevergrad/nevergrad/benchmark/utils.py
imports: from collections import abc
  import numpy
  import pandas
  import nevergrad.common.typing
  from nevergrad.common import testing
label_desc: Use image node_id 7 for calling the Selector obj's underlying member method code with example usage: obj.assert_equivalent(other, err_msg) without return types