image_output_1.png
import pandas as pd

import random

toxic_comment_processed_seqlen = pd.read_csv('/kaggle/input/jigsaw-multilingual-toxic-comment-classification/jigsaw-toxic-comment-train-processed-seqlen128.csv')
toxic_comment = pd.read_csv('/kaggle/input/jigsaw-multilingual-toxic-comment-classification/jigsaw-toxic-comment-train.csv')
unintended_bias_preprocessed = pd.read_csv('/kaggle/input/jigsaw-multilingual-toxic-comment-classification/jigsaw-unintended-bias-train-processed-seqlen128.csv')
unintended_bias = pd.read_csv('/kaggle/input/jigsaw-multilingual-toxic-comment-classification/jigsaw-unintended-bias-train.csv')

char_length_threshold = 4500
outliers = toxic_comment[toxic_comment['char_length'] > char_length_threshold]
print(f'Number of outliers: {len(outliers)}')
num_random_outliers = 1
random_indices = random.sample(range(len(outliers)), num_random_outliers)
random_outliers = outliers.iloc[random_indices]
for idx, outlier in random_outliers.iterrows():
    print(f"\nIndex: {idx}\nComment: {outlier['comment_text']}")