shuffle_multiple_columns#

shuffle_multiple_columns(graph_df, col_numbers=None, col_names=None, inplace=False)[source]#

Returns an edgelist with given columns shuffled. Exactly one of col_numbers or col_names should be specified.

Parameters:
  • graph_df (DataFrame) – The input DataFrame representing the graph.

  • col_numbers (list, optional) – The list of column numbers to shuffle. Default is None.

  • col_names (list, optional) – The list of column names to shuffle. Default is None.

  • inplace (bool, optional) – If True, shuffles the columns in-place. Otherwise, creates a copy of the DataFrame. Default is False.

Returns:

The shuffled DataFrame with the specified columns.

Return type:

DataFrame

Raises: