-3

I need to add several df to one excel and I want that they looks like enter image description here. Is any function in pandas. that can make it?

DeepSpace
  • 78,697
  • 11
  • 109
  • 154
NineWasps
  • 2,081
  • 8
  • 28
  • 45
  • Take a look at [this](http://stackoverflow.com/questions/34945456/is-it-possible-to-insert-a-worksheet-into-an-existing-workbook-using-python) and also [this](http://stackoverflow.com/questions/35604888/how-to-persist-excel-references-in-formulas-across-worksheets-where-the-workshee) – ctrl-alt-delete Jul 27 '16 at 14:11
  • and [this](http://stackoverflow.com/questions/37320355/using-named-ranges-in-excel-with-a-selection-of-cells) I had to create a template sheet with named ranges, then append sheets of data to display. – ctrl-alt-delete Jul 27 '16 at 14:13

1 Answers1

1

For the layout, see to_excel docs. Note that you will have to pass it a pd.ExcelWriter object instead of a path string and then call its save method to be able to save multiple dataframes to the same excel file (same or different sheet).

For the design itself, that would require some fiddling around with openpyxl.

You can try a library that I wrote, called StyleFrame (documented on github and readthedocs), and see if it answers your needs.

DeepSpace
  • 78,697
  • 11
  • 109
  • 154