{"id":22417,"library":"styleframe","title":"StyleFrame","description":"A library that wraps pandas and openpyxl to allow easy styling of DataFrames in Excel. Current version: 4.2. Supports Python 3.6+ (dropped Python 3.4/3.5 in 4.0.0). Regular releases; last update January 2022.","status":"active","version":"4.2","language":"python","source_language":"en","source_url":"https://github.com/DeepSpace2/StyleFrame","tags":["pandas","excel","styling","openpyxl","spreadsheet"],"install":[{"cmd":"pip install styleframe","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for DataFrame operations.","package":"pandas","optional":false},{"reason":"Required for Excel styling and writing.","package":"openpyxl","optional":false}],"imports":[{"note":"Package name is lowercase 'styleframe' since v3.0.1.","wrong":"from StyleFrame import StyleFrame","symbol":"StyleFrame","correct":"from styleframe import StyleFrame"},{"note":"","wrong":"","symbol":"Styler","correct":"from styleframe import Styler"},{"note":"Submodule for colors, borders, etc.","wrong":"","symbol":"utils","correct":"from styleframe import utils"}],"quickstart":{"code":"from styleframe import StyleFrame, Styler, utils\nimport pandas as pd\n\ndf = pd.DataFrame({'A': [1, 2], 'B': ['x', 'y']})\nsf = StyleFrame(df)\nstyler = Styler(bg_color=utils.colors.yellow, bold=True)\nsf.apply_style_by_indexes(sf.index, styler)\nsf.to_excel('styled.xlsx').save()\nprint('Excel file created.')","lang":"python","description":"Create a styled Excel file with StyleFrame."},"warnings":[{"fix":"Use `from styleframe import StyleFrame` instead of `from StyleFrame import StyleFrame`.","message":"Package name changed from 'StyleFrame' to 'styleframe' (all lowercase) in v3.0.1. Old imports will fail.","severity":"breaking","affected_versions":"<3.0.1"},{"fix":"Upgrade to Python 3.6+.","message":"Python 3.4 and 3.5 support removed in v4.0.0.","severity":"breaking","affected_versions":"<4.0.0"},{"fix":"Ensure you are using openpyxl engine. Default is openpyxl.","message":"Using non-openpyxl engine in `to_excel` raises TypeError since v4.1.","severity":"deprecated","affected_versions":">=4.1"},{"fix":"Upgrade to v4.0.0+.","message":"When using `to_excel` with `header=False`, rows may be misaligned before v4.0.0.","severity":"gotcha","affected_versions":"<4.0.0"},{"fix":"Upgrade to v4.2 or avoid using best_fit on empty DataFrames.","message":"`best_fit` argument in `to_excel` caused an error on empty DataFrames before v4.2.","severity":"gotcha","affected_versions":"<4.2"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `from styleframe import StyleFrame`.","cause":"Package was renamed to lowercase 'styleframe' in v3.0.1. Old import path no longer works.","error":"ImportError: cannot import name 'StyleFrame' from 'StyleFrame'"},{"fix":"Use `from styleframe import StyleFrame` and access `StyleFrame.ExcelWriter`.","cause":"Before v4.1, ExcelWriter was not exposed at module level.","error":"AttributeError: module 'styleframe' has no attribute 'ExcelWriter'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}