<jupyter_start><jupyter_text><jupyter_code>url = 'https://raw.githubusercontent.com/arivle/credit-card-dataset/main/credit-card-default-1000.csv'
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import scipy.stats as stats
df = pd.read_csv(url)
df.head()
df["SEX"].replace({"M":"1", "F":"2"}, inplace=True)
print(df)
df.isnull().values.any()
df.isnull().sum()
df = df.dropna()
df
df.describe()
df.info()
df2 = df[['CUSTID', 'LIMIT_BAL', 'SEX', 'EDUCATION', 'MARRIAGE', 'AGE', 'DEFAULTED']].copy()
df2
output = 'DEFAULTED'
cols = [ f for f in df.columns ]
cols.remove( "CUSTID")
cols.remove( output )

f = pd.melt( df, id_vars=output, value_vars=cols)
g = sns.FacetGrid( f, hue=output, col="variable", col_wrap=5, sharex=False, sharey=False )
g = g.map( sns.distplot, "value", kde=True).add_legend()<jupyter_output>/usr/local/lib/python3.7/dist-packages/seaborn/distributions.py:2557: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
  warnings.warn(msg, FutureWarning)
/usr/local/lib/python3.7/dist-packages/seaborn/distributions.py:2557: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
  warnings.warn(msg, FutureWarning)
/usr/local/lib/python3.7/dist-packages/seaborn/distributions.py:2557: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function [...]
{'fraction_non_alphanumeric': 0.13633923778851315, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 5.540350877192982, 'pattern_counts': {'":': 2, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, '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': '447117', 'license': 'MIT', 'n_tokens_mistral': 645, 'n_tokens_neox': 620, 'n_words': 184, 'path': 'credit_card.ipynb', 'repo_name': 'arivle/credit-card-prediction', 'size': '1863'}