After running an SQL query I get a data frame with one column that looks like this:
d = {'values': ['2,3,2,2', '2,3,5', '2', '3,4,2,2,2']}
df = pd.DataFrame(data=d)
What I need to do is turn each of this strings into a list of numbers:
d = {'values': [[2, 3, 2, 2], [2, 3, 5], [2], [3, 4, 2, 2, 2]]}
Is there a pythonic way to do that?