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

data = pd.read_csv('../input/paysim1/PS_20174392719_1491204439457_log.csv')

fraud_data = data[data['isFraud'] == 1]

safe_data = data[data['isFraud'] == 0]
sampled_data = safe_data.sample(n=len(fraud_data))

df = pd.concat([fraud_data, sampled_data])
100 * df.isFraud.value_counts() / len(df)

df.head()