Return the last two characters of each value in the country column.
country
Input
country 0 USA 1 GBR 2 KEN 3 JPN
Output
0 SA 1 BR 2 EN 3 PN Name: country, dtype: object
This one's part of Premium. Unlock the full Pandas track plus every other premium problem on the site.
solve(...)