utils4text.py
def differentiate_clean_toxic_convs_df(df_convs, njobs = mp.cpu_count()):
    """
    Applying the profanity checking functions, differentiate clean conversations and toxic ones from a raw conversation dataframe.
    
    Arg:
        df_convs: A given conversation dataframe from a certain subreddit.
    Return:
        df_clean: A cleaner conversation dataframe without profanity.
        df_toxic: A toxic conversation dataframe with only profanity.
    """
    df_clean = apply_parallel(df_convs.groupby(df_convs['conversation id']), remove_toxicity)
    df_toxic = apply_parallel(df_convs.groupby(df_convs['conversation id']), extract_toxicity)
    df_clean = df_clean.reset_index().drop('index', axis = 1)
    df_toxic = df_toxic.reset_index().drop('index', axis = 1)

    return (df_clean, df_toxic)

    Applying the profanity checking functions, differentiate clean conversations and toxic ones from a raw conversation dataframe.
    
    Arg:
        df_convs: A given conversation dataframe from a certain subreddit.
    Return:
        df_clean: A cleaner conversation dataframe without profanity.
        df_toxic: A toxic conversation dataframe with only profanity.
    
Applying the profanity checking functions, differentiate clean conversations and toxic ones from a raw conversation dataframe.
Arg:
df_convs: A given conversation dataframe from a certain subreddit.
Return:
df_clean: A cleaner conversation dataframe without profanity.
df_toxic: A toxic conversation dataframe with only profanity.
Applying the profanity checking functions differentiate clean conversations and toxic ones from a raw conversation dataframe . Arg : df_convs : A given conversation dataframe from a certain subreddit . Return : df_clean : A cleaner conversation dataframe without profanity . df_toxic : A toxic conversation dataframe with only profanity .
def differentiate_clean_toxic_convs_df(df_convs, njobs = mp.cpu_count()):
    df_clean = apply_parallel(df_convs.groupby(df_convs['conversation id']), remove_toxicity)
    df_toxic = apply_parallel(df_convs.groupby(df_convs['conversation id']), extract_toxicity)
    df_clean = df_clean.reset_index().drop('index', axis = 1)
    df_toxic = df_toxic.reset_index().drop('index', axis = 1)
    return (df_clean, df_toxic)
def differentiate_clean_toxic_convs_df ( df_convs , njobs = mp . cpu_count ( ) ) : df_clean = apply_parallel ( df_convs . groupby ( df_convs [ 'conversation id' ] ) , remove_toxicity ) df_toxic = apply_parallel ( df_convs . groupby ( df_convs [ 'conversation id' ] ) , extract_toxicity ) df_clean = df_clean . reset_index ( ) . drop ( 'index' , axis = 1 ) df_toxic = df_toxic . reset_index ( ) . drop ( 'index' , axis = 1 ) return ( df_clean , df_toxic )
Applying the profanity checking functions, differentiate clean conversations and toxic ones from a raw conversation dataframe.
Applying the profanity checking functions differentiate clean conversations and toxic ones from a raw conversation dataframe .
"""
    Applying the profanity checking functions, differentiate clean conversations and toxic ones from a raw conversation dataframe.
    
    Arg:
        df_convs: A given conversation dataframe from a certain subreddit.
    Return:
        df_clean: A cleaner conversation dataframe without profanity.
        df_toxic: A toxic conversation dataframe with only profanity.
    """
df_convs
njobs