Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 我不确定到底有什么不同,但它现在正在处理这些文件。再次感谢!当然,很乐意帮忙! import pandas as pd import os writer = pd.ExcelWriter('all_files.xlsx', engine='xlsxwri_Python_Pandas_Xlsxwriter - Fatal编程技术网

Python 我不确定到底有什么不同,但它现在正在处理这些文件。再次感谢!当然,很乐意帮忙! import pandas as pd import os writer = pd.ExcelWriter('all_files.xlsx', engine='xlsxwri

Python 我不确定到底有什么不同,但它现在正在处理这些文件。再次感谢!当然,很乐意帮忙! import pandas as pd import os writer = pd.ExcelWriter('all_files.xlsx', engine='xlsxwri,python,pandas,xlsxwriter,Python,Pandas,Xlsxwriter,我不确定到底有什么不同,但它现在正在处理这些文件。再次感谢!当然,很乐意帮忙! import pandas as pd import os writer = pd.ExcelWriter('all_files.xlsx', engine='xlsxwriter') for f in os.listdir('test'): header_info = pd.read_csv(os.path.join('test', f), sep=r'\t', engine='python', he


我不确定到底有什么不同,但它现在正在处理这些文件。再次感谢!当然,很乐意帮忙!
import pandas as pd
import os

writer = pd.ExcelWriter('all_files.xlsx', engine='xlsxwriter')

for f in os.listdir('test'):

    header_info = pd.read_csv(os.path.join('test', f), sep=r'\t', engine='python', header=None, nrows=4)
    header_info.to_excel(writer, f, index=False, header=False)

    df = pd.read_csv(os.path.join('test', f), sep=r'\t', engine='python', header=4)
    df.to_excel(writer, f, startrow=5, index=False)

writer.save()