In [1]:
import pandas as pd
In [2]:
s_sep = pd.Series(['1,000,000', '1,000', '1'])
print(s_sep)
In [3]:
# print(s_sep.astype(int))
# ValueError: invalid literal for int() with base 10: '1,000,000'
In [4]:
print(s_sep.str.replace(',', '').astype(int))
In [5]:
print(s_sep.str.replace(',', '').astype(float))