【发布时间】:2019-06-28 06:01:32
【问题描述】:
enter image description here 我有一个名为Example.xls 的文件,其中我在标签sales 和purchase 中有数据。
我们在从 A 列到 E 列的两个选项卡中都有数据。
当我通过 pandas 模块导入这些数据时,我想要像 A 到 F 列这样的结果,其中 F 列应该显示名称表名称。如何在熊猫模块中显示工作表名称的名称?
我正在使用代码
all= pd.read_excel(Example.xlsx',sheet_name=['Sales','Purchas'])
enter image description here
然后
df= pd.concat(All[frame]for fram in All.keys())
然后我想将选项卡的名称放在我的数据框“全部”中的最后一列中,分别是 F
【问题讨论】: