<jupyter_start><jupyter_text>Import Libraries<jupyter_code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns<jupyter_output><empty_output><jupyter_text>Load Data<jupyter_code>train_data=pd.read_csv("/content/drive/MyDrive/fairface_resampling/train_keep_age_final.csv")
test_data=pd.read_csv("/content/drive/MyDrive/fairface_resampling/test_keep_age_final.csv")<jupyter_output><empty_output><jupyter_text>Load ignore csv<jupyter_code>ignore_train=pd.read_csv("/content/drive/MyDrive/fairface_resampling/fairface_ignore_train.csv")
ignore_test=pd.read_csv("/content/drive/MyDrive/fairface_resampling/fairface_ignore_test.csv")<jupyter_output><empty_output><jupyter_text>Train data  Convert dataframe to list<jupyter_code>ignore_train=ignore_train['file'].tolist()
ignore_test=ignore_test['file'].tolist()<jupyter_output><empty_output><jupyter_text>Remove images not on list<jupyter_code>train_final = train_data[~train_data.file.isin(ignore_train)]
train_final.head()<jupyter_output><empty_output><jupyter_text>Export to csv file<jupyter_code>train_final.to_csv('/content/drive/MyDrive/fairface_resampling/train_for_fitz.csv')<jupyter_output><empty_output><jupyter_text>(Repeat the same process for the test data.)  Test Data<jupyter_code>test_final = test_data[~test_data.file.isin(ignore_test)]
test_final.head()
test_final.to_csv('/content/drive/MyDrive/fairface_resampling/test_for_fitz.csv')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11588275391956374, 'fraction_numerical': 0.0, 'mean_word_length': 12.980952380952381, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '597413', 'license': 'Unlicense', 'n_tokens_mistral': 565, 'n_tokens_neox': 545, 'n_words': 49, 'path': 'sourcecode/data_pre_processing/ignore_list_removed.ipynb', 'repo_name': 'VinitaSilaparasetty/msc-data-science-dissertation', 'size': '1467'}