{"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,"search_vec":"'/3.5':26 '2022':34 '3.4':25 '3.6':22 '4.0.0':28 '4.2':19 'allow':10 'current':17 'datafram':14 'drop':23 'easi':11 'excel':16,36 'januari':33 'last':31 'librari':3 'openpyxl':8,38 'panda':6,35 'python':21,24 'regular':29 'releas':30 'spreadsheet':39 'style':12,37 'stylefram':1 'support':20 'updat':32 'version':18 'wrap':5","created_at":"2026-04-27T17:05:04.229737+00:00","updated_at":"2026-04-27T17:05:04.229737+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"4.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/DeepSpace2/StyleFrame","docs":null,"changelog":null,"pypi":"https://pypi.org/project/styleframe/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}