Python script for tracking changes in fees through time (Python - Pandas)

import pandas as pd
df = pd.read_csv('transcations_data.csv')
df['change'] = df['fee'].diff()
df_filtered = df[df['change'] != 0].to_csv('change_in_fees.csv', index=False)

the python script and the csv are also available here:

Fee-tracking-script/fee_calc.py at main ยท epirnat/Fee-tracking-script

The output is then saved to a .csv file named 'changes_in_fees'


date,datetime,fee,change 2019-01-01,2019-01-01 23:42:03,15, 2019-08-14,2019-08-14 23:54:30,300,285.0 2019-09-02,2019-09-02 23:36:55,1200,900.0 2019-09-07,2019-09-07 23:22:40,300,-900.0 2019-09-10,2019-09-10 23:40:26,600,300.0 2019-09-14,2019-09-14 23:57:06,900,300.0 2019-09-17,2019-09-17 23:58:55,1350,450.0 2019-10-02,2019-10-02 23:46:17,600,-750.0 2019-10-12,2019-10-12 23:51:23,450,-150.0 2019-11-05,2019-11-05 23:59:53,150,-300.0 2019-11-13,2019-11-13 23:32:07,300,150.0 2019-11-25,2019-11-25 23:51:20,600,300.0 2019-12-15,2019-12-15 23:34:49,300,-300.0 2020-01-03,2020-01-03 23:58:56,600,300.0 2020-01-04,2020-01-04 23:57:20,1050,450.0 2020-01-05,2020-01-05 23:50:51,750,-300.0 2020-01-18,2020-01-18 23:57:18,600,-150.0 2020-02-04,2020-02-04 23:40:19,900,300.0 2020-03-02,2020-03-02 23:47:44,450,-450.0 2020-05-04,2020-05-04 23:56:43,150,-300.0 2020-05-12,2020-05-12 23:58:25,300,150.0 2020-06-08,2020-06-08 23:42:11,150,-150.0 2020-06-30,2020-06-30 23:47:45,75,-75.0 2020-07-14,2020-07-14 23:59:44,53,-22.0

or more neatly presented with excel, it looks like this:

Fees historical data