<jupyter_start><jupyter_text>Fucntionality for reproducible Auditing in Wiggum<jupyter_code>import pandas as pd
import os
import wiggum as wg
import numpy as np
labeled_df = wg.LabeledDataFrame('../data/ldf_state_hit_rate_min_cols_COCTFLILMDMAMOMTNENCOHRISCTXVTWAWI')
labeled_df.meta_df
rankobj = wg.Mean_Rank_Trend()
linreg_obj = wg.All_Linear_Trend()

labeled_df.get_subgroup_trends_1lev([rankobj,linreg_obj])
labeled_df.result_df.sample(10)
labeled_df.result_df.iloc[128]
labeled_df.annotate(128,'flagged',1)<jupyter_output><empty_output><jupyter_text>We can confirm it works by checking with iloc<jupyter_code>labeled_df.result_df.iloc[128]
labeled_df.filter_annotate(feat1='year',subgroup=['Black','Hispanic'],annotate_col='target', comment = 1)
labeled_df.result_df.iloc[[272,273,300,301]]
labeled_df.result_df.iloc[[272,273,300,301]].to_csv()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11831626848691695, 'fraction_numerical': 0.04436860068259386, 'mean_word_length': 11.571428571428571, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '325395', 'license': 'MIT', 'n_tokens_mistral': 391, 'n_tokens_neox': 350, 'n_words': 43, 'path': 'research_notebooks/07_reproducible_audits.ipynb', 'repo_name': 'carolinesadlerr/wiggum', 'size': '879'}