【发布时间】:2020-02-17 04:25:45
【问题描述】:
我将一个列表放入一个excel单元格,当我用pandas读取它时,它没有返回一个列表,它返回了一个字符串,有没有我可以得到一个列表作为回报?
例如。 在单元格中:['a', 'b', 'c'] 熊猫的输出:'['a', 'b', 'c']'
这是我的代码:
df = pd.read_excel('example.xlsx', index_col=None, header=None)
print(df.iloc[5, 3])
print(type(df.iloc[5, 3]))
## and the code would return the type of df.iloc[5, 3] is equal to a list
【问题讨论】:
标签: python excel string pandas list