Optimised way to write in Excel files.
Project description
Excel Write
Optimised way to write in excel files.
Developed by Dipan Nanda (c) 2023
Example of Usage
write_in_excel
from excel_write import write_in_excel
write_in_excel(df, location, sheet)
"""
:param DataFrame df: The DataFrame used to export to Excel
:param str sheet: The name that is to be assigned to the file
:param str location: Location where the file is to be created
:param bool index: including index or not
"""
auto_adjust_excel_width
from excel_write import auto_adjust_excel_width
auto_adjust_column_width_index(df, writer, sheet_name="MySheet", margin=3)
"""
:param DataFrame df: The DataFrame used to export the Excel
:param pd.ExcelWriter writer: The pandas exporter with engine="xlsxwriter"
:param str sheet_name: The name of the sheet
:param int margin: How many extra space (beyond the maximum size of the string)
:param int length_factor: The factor to apply to the character length to obtain the
column width
:param int decimals: The number of decimal places to assume for floats: Should be the
same as the number of decimals displayed in the Excel
:param bool index: Whether the DataFrame's index is inserted as a separate column (if
index=False in df.to_xlsx() set index=False here!)
"""
Changelog
Go here to checkout the complete changelog.
License
This is under MIT License
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
excel-write-1.0.9.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for excel_write-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 920add9202faed39f5e94346e8148a9d535027f151e6491761b47baa71213e13 |
|
MD5 | c3ed5571c01f13d30ae2d8d41e6d26c2 |
|
BLAKE2b-256 | 64a27d74adba0851d5b9a501f5cd3615ae4c17a24273449fccecfaece64a03b1 |