我试图用read_excel()
读取excel文件.xls,我需要跳过前16行,跳过页脚38行,只使用2,3,4,5列,将第二列设置为索引列,将第16行设置为标题行,并重命名标题行。但是朱庇特回来了
excel_file = 'Filename.xls'
df = pd.read_excel(excel_file, header = 0, skiprows = 16, skip_footer = 38, usecols = [2,3,4,5], names = ['Name1', 'Name2', 'Name3', 'Name4'], index_col = 0)
df
我尝试了without index_col=0
它可以工作,但是设置了默认索引列,我不需要默认索引列,我需要我的带有“Name1”的列作为索引列
目前没有回答
相关问题 更多 >
编程相关推荐