Trying to add conditional formatting to an excel file written from pandas using pd.ExcelWriter and...

This doesn't work:

# results is a dictionary of DataFrames
data = pd.Panel(results)
writer = pd.ExcelWriter(file_name+".xlsx", engine='xlsxwriter')
data.to_excel(writer)
for worksheet in writer.sheets.values():
    worksheet.conditional_format('E2:E38', {'type': '2_color_scale'})
writer.save()
writer.close()

And this does:

# results is a dictionary of DataFrames
writer = pd.ExcelWriter(file_name+".xlsx", engine='xlsxwriter')
for k,v in results.iteritems():
    v.to_excel(writer, sheet_name=k)
for worksheet in writer.sheets.values():
    worksheet.conditional_format('E2:E38', {'type': '2_color_scale'})
writer.save()
writer.close()

Is something not implemented in Panel structure? or is this a design decision along the lines of what causes issue #8553?

INSTALLED VERSIONS

commit: None python: 2.7.10.final.0 python-bits: 64 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 69 Stepping 1, GenuineIntel byteorder: little LC_ALL: None LANG: None

pandas: 0.17.0 nose: 1.3.7 pip: 7.1.2 setuptools: 18.4 Cython: 0.23.4 numpy: 1.9.3 scipy: 0.16.1 statsmodels: 0.6.1 IPython: 4.0.0 sphinx: 1.3.1 patsy: 0.4.0 dateutil: 2.4.2 pytz: 2015.7 blosc: 1.2.8 bottleneck: 1.0.0 tables: 3.2.2 numexpr: 2.4.4 matplotlib: 1.5.0rc3 openpyxl: None xlrd: 0.9.4 xlwt: None xlsxwriter: 0.7.7 lxml: None bs4: 4.4.1 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.0.9 pymysql: None psycopg2: None

Comment From: jreback

closing as Panel deprecated