My dataframe has thousands of rows of data. Reprex-
rownum adgroup
1 list(abc=123,efg=456)
2 Null
3 list(abc=457, efg= 666)
I want my final output to drop 'adgroup', split the column elements and add 2 columns. the df should look like
rownum abc efg
1 123 456
2 Null Null
3 457 666
I tried
Reprex$ad_group[c(1)]
[[1]]
NULL
But that just gave 1 value. Why doesnt it show all thousands of rows of data
I also tried
reprex$ad_group[sapply(string, function(x) any(x == "abc"))]
Error in lapply(X = X, FUN = FUN, ...) : object 'string' not found