Hi @praveenbushipaka, I have two questions for you: Are you familiar with dplyr or tidyverse packages? And could you add your data by using ``` (triple backticks) in a post like this?
Since you are new here I'm going to use a little trick to read your sample data even if it is not copy/paste friendly but next time please post a REPRoducible EXample (reprex) like the one below.
As dromano says, you can use tidyverse functions, see this example.