Time Shuffling#

raphtory.nullmodels.permuted_timestamps_model(graph_df: DataFrame, time_col: int | None = None, time_name: str | None = None, inplace=False, sorted=False)[source]#

Returns a DataFrame with the time column shuffled.

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

  • time_col (int, optional) – The column number of the time column to shuffle. Default is None.

  • time_name (str, optional) – The column name of the time column to shuffle. Default is None.

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

  • sorted (bool, optional) – If True, sorts the DataFrame by the shuffled time column. Default is False.

Returns:

The shuffled DataFrame with the time column, or None if inplace=True.

Return type:

pd.DataFrame or None