📌  相关文章
📜  python pandas 将逗号分隔的数字字符串转换为整数列表 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:25.887000             🧑  作者: Mango

代码示例1
# string with list of numbers
strOne = '656217, 656228'

# converting strOne to a list of strings 
# then iterating over it converting each string to an integer
lstOutput = [int(i) for i in strOne.split(',')]

# printing list to view values in a list without quotes
print(lstOutput)