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

df = pd.read_csv('/kaggle/input/paysim1/PS_20174392719_1491204439457_log.csv')
df.columns

fraudcount = df[df['isFraud'] == 1].count()
totalcount = df.count()
fraudcount / totalcount

frauds = df[df['isFraud'] == 1]
frauds['type'].unique()

frauds['day'] = round(frauds['step'] / 24)
frauds_by_day = frauds[['step', 'day']].groupby('day').count()
frauds_by_day = frauds_by_day.rename(columns={'step': 'count'})
frauds_by_day.plot(kind='bar', figsize=(10, 5), title='Number of frauds per day')