Issue while fetching data from an API

I am trying to clean up a json response from an api return. Now when I get that data and I convert it as a dataframe and transpose it the column headers always are list("var1") , list("var2") , list("var3") .

Is there a way to avoid it. If not can I just rename it using dplyr. I tried that as well but doesn't seem to be working. Any ideas??

I am unable to put a reprex for this as of now.

I don't follow the workflow, but you can rename the columns

colnames(df) <- c("name1", "name2", "name3")
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.