text_plain_output_1.png image_output_1.png
import pandas as pd

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

main_df = pd.read_csv('/kaggle/input/creditcardfraud/creditcard.csv')
df = main_df.copy()

df.isnull().sum()

legit = df[df.Class == 0]
fraud = df[df.Class == 1]

df.groupby('Class').mean()

df.shape

X1 = df.drop(columns='Class', axis=1)
y1 = df['Class']

(X1.shape, y1.shape)