Convert pandas DataFrames to Excel-style A1 layouts.
Project description
df-to-excel-a1
Convert pandas DataFrames to Excel-style A1 layouts.
Features
- Convert zero-based column indexes to Excel labels (
A,B, ...,AA,AB). - Transform a DataFrame to look like an Excel sheet (headers as first row, Excel-style column labels, 1-based index).
Usage
Install from PyPI:
pip install df-to-excel-a1
Convert a DataFrame with ordinary pandas columns and zero-based row indexes:
import pandas as pd
from df_to_excel_a1 import excelify
df = pd.DataFrame({"Name": ["Alice", "Bob"], "Score": [90, 85]})
print("Before:")
print(df)
print("\nAfter:")
print(excelify(df))
Output:
Before:
Name Score
0 Alice 90
1 Bob 85
After:
A B
1 Name Score
2 Alice 90
3 Bob 85
Column labels can also be generated directly:
from df_to_excel_a1 import str_excel_label
print(str_excel_label(27)) # AB
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
df_to_excel_a1-0.1.1.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file df_to_excel_a1-0.1.1.tar.gz.
File metadata
- Download URL: df_to_excel_a1-0.1.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
993f2754afe0512a480853ed0e15c648e8903035d3a05cab591af7e94b1c0a12
|
|
| MD5 |
49b19d46a21a138602eded5f703fc917
|
|
| BLAKE2b-256 |
4358fa5c26a15b672415a0e9ef8a725188ba97eb315d6b363d141af57db3267c
|
File details
Details for the file df_to_excel_a1-0.1.1-py3-none-any.whl.
File metadata
- Download URL: df_to_excel_a1-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b273ae36311ac3e79dacdc05175791c7f0b99d60493b219281126ba00b27c7b1
|
|
| MD5 |
4cef456560f7dc9051a4c0a07e05fcdc
|
|
| BLAKE2b-256 |
8a87079dd95667651f35794ae02b78780328f6c1e2b248a393d8053a566a7e76
|