dataframeXconverter-0.0.2
توضیحات
This package converts dataframe to csv,Html,Xml
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | dataframeXconverter-0.0.2 |
| نام | dataframeXconverter |
| نسخه کتابخانه | 0.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Haridas |
| ایمیل نویسنده | vrharidas141@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/dataframeXconverter/ |
| مجوز | - |
# Dataframe to CSV,HTML and XML converter
[](https://www.python.org/)
## Description
This is a package that converts your dataframe to csv,xml and html.This package has three funtions to
- Convert dataframe to csv
- Convert dataframe to xml
- Convert dataframe to html
## Usage
- Run Following command to install.
```
pip install dataframeXconverter
```
## Example of How to use.
Make sure the dataframe you are passing is not an empty one.
```
import dataframeXconverter
# to convert dataframe to csv
df_to_csv(dataframe, "filename.csv")
# to convert dataframe to xml
df_to_csv(dataframe, "filename.xml")
# to convert dataframe to html
df_to_csv(dataframe, "filename.html")
```
## Error and Exception Handling
I have included some error and exception handling in the code,if you want then you can log them. Im just throwing(raise) it ,you have to catch it in your script.
```
# in csv function
if not isinstance(dataframe, pd.DataFrame):
raise AttributeError('dataframe arg in df_to_csv() is not a dataframe')
if not isinstance(filename, str) or not filename.endswith('.csv'):
raise NameError('Please Provide Valid CSV File Name')
# in xml funtion
if not isinstance(dataframe, pd.DataFrame):
raise AttributeError('dataframe arg in df_to_xml() is not a dataframe')
if not isinstance(filename, str) or not filename.endswith('.xml'):
raise NameError('Please Provide Valid XML File Name')
# in html function
if not isinstance(dataframe, pd.DataFrame):
raise AttributeError('dataframe arg in df_to_html() is not a dataframe')
if not isinstance(filename, str) or not filename.endswith('.html'):
raise NameError('Please Provide Valid HTML File Name')
```
نیازمندی
| مقدار | نام |
|---|---|
| - | pandas |
نحوه نصب
نصب پکیج whl dataframeXconverter-0.0.2:
pip install dataframeXconverter-0.0.2.whl
نصب پکیج tar.gz dataframeXconverter-0.0.2:
pip install dataframeXconverter-0.0.2.tar.gz