text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

df_cred = pd.read_csv('/kaggle/input/creditcardfraud/creditcard.csv')

df_cred.shape

plt.style.use('ggplot') # Using ggplot2 style visuals 

f, ax = plt.subplots(figsize=(11, 15))

ax.set_facecolor('#fafafa')
ax.set(xlim=(-5, 5))
plt.ylabel('Variables')
plt.title("Overview Data Set")
ax = sns.boxplot(data = df_cred.drop(columns=['Amount', 'Class', 'Time']), 
  orient = 'h', 
  palette = 'Set2')

def plot_distribution(data_select):
    figsize = (15, 8)
    sns.set_style('ticks')
    s = sns.FacetGrid(df_cred, hue='Class', aspect=2.5, palette={0: 'lime', 1: 'black'})
    s.map(sns.kdeplot, data_select, shade=True, alpha=0.6)
    s.set(xlim=(df_cred[data_select].min(), df_cred[data_select].max()))
    s.add_legend()
    s.set_axis_labels(data_select, 'proportion')

plot_distribution('V4')
plot_distribution('V9')
plot_distribution('V11')
plot_distribution('V12')
plot_distribution('V13')