Copyright (c) 2023-Present EncoreSky Technologies Pvt. Ltd. All rights reserved.
Excel Writer
excel_writer is a package containing the methods for creating excel file from python dictionary or pandas dataframe.
Prerequisites
You'll also need the following:
- Python, excel_writer is compatible with version >=3.8.11.
Installation
To install the package (in either a system-wide or a virtual environment), navigate to the excel_writer root folder in a Terminal, and type:
pip install excel-writer
excel_writer will be installed as a package in your Python distribution, along with it's dependencies if necessary.
N.B. - installing in a virtual environment is recommended.
Usage
Input Format
Supported input format for dictionary is as follows:
{
<column_name>: [<row_value>, <row_value>, . . . .],
<column_name>: [<row_value>, <row_value>, . . . .],
.
.
.
.
}
Write a file using dictionary
from excel_writer import ExcelWriter
input_data = {
"Name": ["Aarav", "Jayesh", "Vineet", "Rahul", "Mayank", "Deepak"],
"Age": [24, 28, 27, 25, 28, 35],
"Emp Id": ["A-001", "A-002", "A-003", "A-004", "A-005", "A-006"],
"City": ["Indore", "Bhopal", "Gwalior", "Pune", "Kolkata", "Udaipur"],
"Has Bike": ["Y", "Y", "Y", "Y", "Y", "Y"]
}
excel_writer = ExcelWriter(file_name="test.xlsx",
sheet_name="sheet_1")
excel_writer.write_data(data_dict = input_data)
Write a file using pandas dataframe
import pandas as pd
from excel_writer import ExcelWriter
input_data = {
"Name": ["Aarav", "Jayesh", "Vineet", "Rahul", "Mayank", "Deepak"],
"Age": [24, 28, 27, 25, 28, 35],
"Emp Id": ["A-001", "A-002", "A-003", "A-004", "A-005", "A-006"],
"City": ["Indore", "Bhopal", "Gwalior", "Pune", "Kolkata", "Udaipur"],
"Has Bike": ["Y", "Y", "Y", "Y", "Y", "Y"]
}
data_df = pd.DataFrame(input_data)
excel_writer = ExcelWriter(file_name="test.xlsx",
sheet_name="sheet_1")
excel_writer.write_data(data_df = data_df)
Metadata
Release files for excel-writer 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| excel_writer-1.0.6.tar.gz | 4.5 kB | Without provenance | Details for excel_writer-1.0.6.tar.gz |
Release files / excel_writer-1.0.6.tar.gz
| Download URL | excel_writer-1.0.6.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28259adf74cfeabf905c03dc2328f3e82dc1329548030d450e8c58377a261448
|
|
BLAKE2b-256 checksum How to use checksums |
4687374d2d3d4b3b28a3b6edcbf07ec5d572752982580834edefb789606689cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.11
|
Security for excel-writer 1.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.