<jupyter_start><jupyter_text>Renaming Columns<jupyter_code># remove "_mean" from column names
new_labels = []

for col in df.columns:
    if "_mean" in col:
        new_labels.append(col[:-5])
    else:
        new_labels.append(col)
    
# new labels for our columns
new_labels

# assign new labels to columns in dataframe
df.columns = new_labels

# display first few rows of dataframe to confirm changes
df.head()
# save this for later
df.to_csv("../00.Data/Cleaned_Data/cleaned_cancer_data_means.csv")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09925093632958802, 'fraction_numerical': 0.0056179775280898875, 'mean_word_length': 4.245098039215686, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '565896', 'license': 'MIT', 'n_tokens_mistral': 187, 'n_tokens_neox': 182, 'n_words': 49, 'path': 'Data Analysis/01.Data Analysis Process/03.Cleaning Data.ipynb', 'repo_name': 'ptyadana/probability-and-statistics-for-business-and-data-science', 'size': '534'}