我想删除组合框中显示为值的列索引。 下面是我的组合框现在的样子:
(内部显示的所有数字均为列索引)
从组合框图像中可以看到,它非常混乱
输出应如下所示:
数据样本:
df = pd.read_excel ('N:/TEST/TEST UTILIZATION/IA 2020/Dev/SCS-FT-IE-Report.xlsm', sheet_name= 'FT')
df.sort_values("Customer Name", inplace = True)
df.drop_duplicates(subset ="Customer Name", inplace = True)
df3 = pd.DataFrame(df, columns = ["Customer Name"])
df3.style.hide_index()
comboExample = ttk.Combobox(window, width=40, values=df3, state="readonly")
comboExample.current(0)
comboExample.grid(column=2, row=2)
我试过使用df.reset_index
和df.style.hide_index
,但它不起作用。有没有办法解决这个问题
谢谢大家的帮助!:-)
目前没有回答
相关问题 更多 >
编程相关推荐