<jupyter_start><jupyter_text>Loading data<jupyter_code>data = pd.read_csv("we_fn_use_c_marketing_customer_value_analysis.csv")
data_num = data._get_numeric_data()
numericals = data.select_dtypes(np.number)


print("Dataframe of numerical columns: ")
print()

display(numericals)
data_num.info()
data_num.hist(bins=15, figsize=(15, 6), layout=(2, 4))
sns.distplot(data_num['Total Claim Amount'])
plt.show()
np.isfinite(data_num)
np.log(data_num)
def log_transfom_clean_(x):
    x = np.log(x)
    if np.isfinite(x):
        return x
    else:
        return np.NAN #  we can replace NANs with mean values in the next step   
data_num['Total Claim Amount'] = list(map(log_transfom_clean_, data_num['Total Claim Amount']))
data_num['Total Claim Amount'] = data_num['Total Claim Amount'].fillna(np.mean(data_num['Total Claim Amount']))
sns.distplot(data_num['Total Claim Amount'])
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13646288209606988, 'fraction_numerical': 0.007641921397379912, 'mean_word_length': 6.2204724409448815, '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': '388853', 'license': 'Apache-2.0', 'n_tokens_mistral': 352, 'n_tokens_neox': 336, 'n_words': 66, 'path': 'Random variable distributions.ipynb', 'repo_name': 'aggysamy/random-variable-distributions', 'size': '916'}