core/src/autogluon/core/utils/utils.py
def shuffle_df_rows(X: DataFrame, seed=0, reset_index=True):
    """Returns DataFrame with rows shuffled based on seed value."""
    row_count = X.shape[0]
    np.random.seed(seed)
    rand_shuffle = np.random.randint(0, row_count, size=row_count)
    X_shuffled = X.iloc[rand_shuffle]
    if reset_index:
        X_shuffled.reset_index(inplace=True, drop=True)
    return X_shuffled
Returns DataFrame with rows shuffled based on seed value.
Returns DataFrame with rows shuffled based on seed value.
Returns DataFrame with rows shuffled based on seed value .
def shuffle_df_rows(X: DataFrame, seed=0, reset_index=True):
    row_count = X.shape[0]
    np.random.seed(seed)
    rand_shuffle = np.random.randint(0, row_count, size=row_count)
    X_shuffled = X.iloc[rand_shuffle]
    if reset_index:
        X_shuffled.reset_index(inplace=True, drop=True)
    return X_shuffled
def shuffle_df_rows ( X : DataFrame , seed = 0 , reset_index = True ) : row_count = X . shape [ 0 ] np . random . seed ( seed ) rand_shuffle = np . random . randint ( 0 , row_count , size = row_count ) X_shuffled = X . iloc [ rand_shuffle ] if reset_index : X_shuffled . reset_index ( inplace = True , drop = True ) return X_shuffled
Returns DataFrame with rows shuffled based on seed value.
Returns DataFrame with rows shuffled based on seed value .
"""Returns DataFrame with rows shuffled based on seed value."""
X
DataFrame
seed
reset_index