A utility for appending DataFrames to Excel/CSV files.
Project description
Project : df2file:
A Python utility designed for efficiently appending Pandas DataFrames to a single Excel file, each in a separate sheet.
Features:
-
Convenient Dataframe Appending: Easily append Pandas DataFrames to an existing Excel file, with each DataFrame creating a new sheet within the workbook.
-
Sheet Customization: Specify sheet names, starting row positions, and other options to customize the placement of each DataFrame within the Excel file.
-
Excel File Management: If the specified Excel file does not exist, the utility will create it. If it does exist, the utility will append DataFrames to existing sheets or create new sheets as needed.
Installation:
url = https://pypi.org/project/df-to-excel-appender/
Install the package using pip:
1.pip install df2file
2.from df2file.df_to_file import append_df_to_excel
3.from df2file.df_to_file import append_df_to_csv
Use the function to append a DataFrame to an Excel file:
Example usage:
output_file = 'output.xlsx' your_dataframe = pd.DataFrame({'Column1': [1, 2, 3], 'Column2': ['A', 'B', 'C']}) append_df_to_excel(output_file, your_dataframe, sheet_name='Sheet1', index=False)
Run the script from the command line:
df_to_excel_appender input.csv -o output.xlsx
Options:
-i, --input: Input CSV file.
-o, --output: Output Excel file.
Dependencies:
pandas
openpyxl
Contributing:
If you find any issues or have suggestions for improvements, please open an issue or create a pull request.
License:
This project is licensed under the MIT License - see the LICENSE file for details.
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
Built Distribution
File details
Details for the file df2file-2.0.0.tar.gz
.
File metadata
- Download URL: df2file-2.0.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd2055452fc2cc95012d08737404241c7af6f53657c7a9877c61c50f6e57bf7f |
|
MD5 | a357a42246b2d7e895bf1148648d4236 |
|
BLAKE2b-256 | b9fedbfaecf262695543e358457ee45c2b545c23568229a600011924e13e8d84 |
File details
Details for the file df2file-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: df2file-2.0.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bcfced8f1bb3bda365f95d84d8e84f25c87a092cfe80e57fa2d6b8538224982 |
|
MD5 | b18e370b26c1f39e4543e4c1befbe643 |
|
BLAKE2b-256 | c8d26dff26d645b3ff37946df62ca48e09cbf0a96ff130573c4010dcf00e67af |