Pages

Topics

Tools

↑↓navigate↵openescclose

Python guides

Every published Python guide, newest first, with practical examples you can copy into your own project.

3,965 guides across 14 topics

Topics

Latest Python guides

Stylized Excel worksheet with a pandas DataFrame table and openpyxl cell formatting tools.
Python

Styling pandas DataFrames in Excel with openpyxl

Use openpyxl after calling pandas to_excel() to style cells, add formulas, handle merged cells, and control presentation in Excel exports.

openpyxlpandasExcelDataFrame
A spreadsheet grid with a bar chart and color-highlighted cells illustrating openpyxl chart and conditional formatting output.
Python

Python Openpyxl Charts and Conditional Formatting

Add charts and conditional formatting to Excel workbooks with Python openpyxl. Covers chart references, common chart types, conditional formatting rules, and performance considerations.

openpyxlExcel automationdata visualizationconditional formatting
A spreadsheet grid with a highlighted formula cell showing a formula bar and a calculated result, illustrating openpyxl formula handling.
Python

Working with Formulas and Formula Cells in openpyxl

Learn how to read, write, and manage formulas and formula cells with openpyxl, including the data_only flag and cached-value behavior.

openpyxlExcel automationformulasspreadsheet processing
Diagram showing merged cells, filter arrows, and a validation dropdown in an Excel sheet generated with openpyxl.
Python

Python openpyxl: Merge Cells, Filters, and Data Validation

Use openpyxl to merge cell ranges, apply auto filters, and add data validation in Excel. A practical guide with code examples and tips for avoiding merged-cell and validation issues.

openpyxlExcelspreadsheetdata validation
Illustration of an Excel worksheet with adjustable column widths, row heights, and frozen header panes, representing openpyxl layout control.
Python

Python openpyxl: Column Width, Row Height, and Freeze Panes

python openpyxl column width row height and freeze panes: Learn to set column widths, row heights, and freeze panes in openpyxl to produce readable Excel reports with...

openpyxlExcelPythonSpreadsheet
Stylized Excel spreadsheet cells with colorful fills, borders, and formatted numbers representing openpyxl styling features.
Python

Python openpyxl: Fonts, Fills, Borders, Alignment, and Number Formats

python openpyxl fonts fills borders alignment and number formats: Learn to apply fonts, fills, borders, alignment, and number formats to Excel cells with openpyxl, inc...

openpyxlExcel stylingcell formattingnumber formats
Illustration of an Excel workbook with multiple sheets being managed by Python openpyxl code
Python

Python openpyxl: Create, Delete, Copy Multiple Sheets

Learn how to create, delete, and copy multiple sheets in Excel with Python openpyxl, including code examples and important caveats.

openpyxlExcelspreadsheetworkbook
Illustration of a spreadsheet grid with highlighted cells and row/column references, representing openpyxl worksheet operations in Python.
Python

Python openpyxl: Cells, Rows, Columns, and Worksheets

Learn to read, write, and manipulate Excel cells, rows, columns, and worksheets with Python openpyxl.

openpyxlExcel automationspreadsheet handlingPython data processing
Illustration of a Python script interacting with an Excel spreadsheet, representing openpyxl operations.
Python

Python Openpyxl: Create, Load, Read, Write Excel Files

Use Python openpyxl to create, load, read, and write .xlsx files without Excel. This guide covers workbooks, sheets, cells, formulas, formatting, and modes for large files.

openpyxlExcelPythonspreadsheet
Side-by-side comparison of Plotly interactive charts and Matplotlib static plots illustrating their different output styles.
Python

Plotly vs Matplotlib in Python: How to Choose

Choosing between Plotly and Matplotlib for Python data visualization depends on your use case. This comparison covers API style, interactivity, output formats, performance, and Pandas integration.

PlotlyMatplotlibData VisualizationPython