I have a df like this"
col1
['525', '2830', '43', '567']
['432', '324', '3993', '5675']
['234', '2830', '342312', '4410']
df.applymap(type) shows all rows in this column are <class 'str'>:
I'm trying to convert the elements in this df.col to integers and sum them in a new column. I've tried like a billion things but have been unsuccessful.
#attempts
#converted to list
map(int, list())
map(int, list().split())
#geeks for geeks suggestions:
for i in range(0, len(list)):
list[i] = int(list[i])
test_list = [int(i) for i in test_list]
I just get this error constantly:
ValueError: invalid literal for int() with base 10: '[525 2830 3993 4410]'
Any ideas?