<jupyter_start><jupyter_text>**Description**:The dataset contains medical informa-tion for 858 patients fromHospital Universitario de Caracas. There are 32 numericaland binary features including age, number of pregnancies, and use of IUD. The targetvariable isBiopsy, which is a binary variable  Import data<jupyter_code># read in data and replace nans
data = pd.read_csv(raw_root('risk_factors_cervical_cancer.csv')).\
    replace('?', np.nan)<jupyter_output><empty_output><jupyter_text>Clean data<jupyter_code># impute, default is mean
my_imputer = SimpleImputer()
data_final = pd.DataFrame(my_imputer.fit_transform(data))
data_final.columns= data.columns

# all the target variables, i only use Biopsy
targets = ['Hinselmann', 'Schiller','Citology','Biopsy']
# split data
X = data_final.loc[:, ~data_final.columns.isin(targets)]
y = data_final['Biopsy']
X<jupyter_output><empty_output><jupyter_text>Save data<jupyter_code>try:
    os.mkdir(processed_root("cervical_cancer_risks"))
except FileExistsError:
    print("Folder already exists")
X.to_csv(processed_root("cervical_cancer_risks/X.csv"), index = False)
y.to_csv(processed_root("cervical_cancer_risks/y.csv"), index = False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11449752883031301, 'fraction_numerical': 0.004118616144975288, 'mean_word_length': 7.9338235294117645, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '512600', 'license': 'MIT', 'n_tokens_mistral': 433, 'n_tokens_neox': 407, 'n_words': 90, 'path': 'notebooks/00-data/01-cervical-cancer-risk.ipynb', 'repo_name': 'mixerupper/mltools-fi_cate', 'size': '1214'}