text_plain_output_1.png image_output_1.png
import numpy as np # linear algebra

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

train_identity_data = pd.read_csv('../input/train_identity.csv')
train_transaction_data = pd.read_csv('../input/train_transaction.csv')
test_identity_data = pd.read_csv('../input/test_identity.csv')
test_transaction_data = pd.read_csv('../input/test_transaction.csv')

print('The average transaction amount for non fraudulent transactions is: ', np.mean(train_transaction_data.loc[train_transaction_data['isFraud'] == 0]['TransactionAmt']))
print('The average transaction amount for fraudulent transactions is: ', np.mean(train_transaction_data.loc[train_transaction_data['isFraud'] == 1]['TransactionAmt']))