-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wish: MultiIndex support #129
Comments
This issue has been automatically marked as stale because it has not had activity in the last 60 days. |
The project seems dead. If not please deactivate the bot. |
Hi, I'm looking into implementing this. |
The work on this is almost done on the multi-index branch, however there is one annoying caveat that keeps me from merging and releasing this. Apparently, So, this code import pandas
from styleframe import StyleFrame, Styler
df = pandas.DataFrame(
{
'idx1': list('AABB'),
'idx2': list('zywz'),
'idx3': list('1212'),
'X': [1234, 345, 33123, 2],
'Y': [2.4133, 42.3, 3, 13.344]
}
)
df = df.set_index(['idx1', 'idx2', 'idx3'])
sf = StyleFrame(df)
sf.apply_style_by_indexes(sf[sf['Y'] == 3], Styler(bg_color='yellow'))
sf.to_excel('test.xlsx', index=True).save() creates this instead of this |
Because of #62 I am aware that
StyleFrame
currently not supportpandas.MultiIndex
.Would be great to have this in the future because multi indexes are a part of formatting a table.
Here is a small example illustrating the current behaviour:
The console output:
The Excel result:
The text was updated successfully, but these errors were encountered: