Good afternoon,
I have a rather embarrassingly basic need, that I do not seem to find a good and efficient solution for.
I have a large data frame where I periodically will need to change specific values, corrections as errors are found through human observation (i.e. "for the security with ISIN DK0030170444, please change the Coupon Rate to 6.5").
Currently, I have been doing this by progressively adding mutate commands each addressing one correction. I am quickly realizing this is not smart, as everything is piecemeal and I do not have a database with all the observations that have been needing corrections, which variables were corrected and what values have been changed to.
So, I started looking for a systematic solution where I could build maintain data about the changes to make and simply add to it. For example, if my data looks like this:
ISIN Issuer_Name Ticker Issue_Year Maturity
1 DK0 Danske Bank DANBNK 2009 5
2 LL4 LLoyds LLOY 2009 10
3 XS0 UniCredit UCGIM 2010 NA
I would like to be able to maintain some data structure with the ISIN of the security that needs a change, the variable that needs changing, and the value to be substituted....
('DK0' , 'Issue_Year', 2010)
.... and then have code that simply reads this data and makes the changes in the data frame, so that each time a new correction is necessary I can just add one extra row to the data and re-execute the code to fix the newly found issue.
I realize there are probably 100 ways to achieve this, but I am a noob and I would like to choose the right path from the start instead of figuring out later that my approach was fundamentally flawed. Which is what I did with my previous solution: it was supposed to be just a few observations that needed a fix, and it is turning out it is hundreds...
I hope my question is understandable, and I thank you advance for any precious help.