Hi all,
I have dataframes as follow:
Row │ year sector roa
│ Int64 String Float64
─────┼─────────────────────────────────────────
1 │ 2017 Construction 1.15
2 │ 2017 Services 1.78
3 │ 2017 Agriculture 1.82
4 │ 2018 Construction 1.05
5 │ 2018 Services 1.56
6 │ 2018 Agriculture 1.55
7 │ 2019 Construction 1.32
8 │ 2019 Services 1.53
9 │ 2019 Agriculture 1.38
10 │ 2020 Construction 1.11
11 │ 2020 Services 1.93
12 │ 2020 Agriculture 1.21
13 │ 2021 Construction 0.03
14 │ 2021 Services 0.06
15 │ 2021 Agriculture 0.36
I would like to calculate the rate of change starting from 2017 to 2021 for each sector. I appreciate any suggestions. Thanks all!