Today, I will cover a super easy code but extremely useful-
This is a question that I was asked several times by PhD students and master students who were beginning to code or did not how to code.
So how do we extract 6 digit CUSIP from a 9 digit CUSIP.
Use the substr function
This command will extract 6 characters starting from the first character.
Yes, it is simple 😀
Another common question that I got asked was how to get the 5 digit ZIP code.
Of course, you can check the length and make sure that 5 digits are extracted by
or you can just do
and it should show how many characters it has-
Very sweet and simple command that will save you time-
As always, if you are stuck always google 😀
Thank You Jesus for another blessed day. Let us always be thankful and give You all the glory Amen 😀
Rejoice at all times. Pray without ceasing. Give thanks in every circumstance, for this is God’s will for you in Christ Jesus.
1 Thessalonians 5: 16-18