I have read in a dataframe with an encoding of 'latin1' ... I applied this to the dataframe column in question:
output = []
for item in enumerate(capacity):
filter(str.isdigit, item)
output.append(item)
The dtype of my pandas object is 'dtype('O')'
This is what the pandas dataframe looks like:
0 1
0 0 3850
1 1 3800
2 2 3700
3 3 3400
4 4 2600
... ... ...
6473 6473 1000
6474 6474 1000000
6475 6475 40000
6476 6476 40000
6477 6477 NaN
And when I use 'output[1].unique()', I get values like: '10000 sulf', '1222(gold','79000 Pyr:'
My question is, how can I remove the characters from the number string in the dataframe and convert the number string to int.
Im using Python v3.8.5