| Name | dataframe-to-online-spreadsheet JSON |
| Version |
0.1.8
JSON |
| download |
| home_page | None |
| Summary | Export a pandas dataframe to a online spreadsheet. |
| upload_time | 2024-08-01 08:45:16 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.8 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# Export a pandas dataframe to an online spreadsheet
The online spreadsheet such as Google Sheets, Feishu Docs, is a good way to share data with others and is a powerful tool for data analysis and visualization. This package provides a simple way to export a pandas dataframe to a online spreadsheet.
## Installation
You can install this package from PyPI using pip:
```bash
pip install dataframe-to-online-spreadsheet
```
## Usage
### Feishu Docs
1. You need to register a Feishu team and get the manager_ids from [Feishu Admin](https://www.feishu.cn/). Fortunately, it is free for a small team.
2. You need to create an app and get the app_id and app_secret from [Feishu Open Platform](https://open.feishu.cn/).
```python
import pandas as pd
import dataframe_to_online_spreadsheet.feishu
import os
def test_feishu():
app_id = os.getenv("APP_ID")
app_secret = os.getenv("APP_SECRET")
sheet1_data = pd.read_csv("./tests/test_data1.csv")
token = sheet1_data.feishu.to_spreadsheet(app_id, app_secret, title="Daily Report", data={'title': 'sheet_name1', 'data': sheet1_data}, manager_ids=['xxx'])
sheet2_data = pd.read_csv("./tests/test_data2.csv")
token = sheet2_data.feishu.to_spreadsheet(app_id, app_secret, title="Daily Report", data={'title': 'sheet_name2', 'data': sheet2_data}, manager_ids=['xxx'], spreadsheet_token=token)
sheet3_data = pd.read_csv("./tests/test_data3.csv")
token = sheet3_data.feishu.to_spreadsheet(app_id, app_secret, title="Daily Report", data={'title': 'sheet_name3', 'data': sheet3_data}, manager_ids=['xxx'], spreadsheet_token=token)
logging.info(f"spreadsheet token: {token}")
assert token
Raw data
{
"_id": null,
"home_page": null,
"name": "dataframe-to-online-spreadsheet",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Kafka Liu <kafka.liu@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/27/2f/799f5b86a0b5f7f8574a27a21873fab5efc4935ad7acc60f5a63ca6810ca/dataframe_to_online_spreadsheet-0.1.8.tar.gz",
"platform": null,
"description": "# Export a pandas dataframe to an online spreadsheet\n\nThe online spreadsheet such as Google Sheets, Feishu Docs, is a good way to share data with others and is a powerful tool for data analysis and visualization. This package provides a simple way to export a pandas dataframe to a online spreadsheet.\n\n## Installation\nYou can install this package from PyPI using pip:\n```bash\npip install dataframe-to-online-spreadsheet\n```\n\n## Usage\n\n### Feishu Docs\n\n1. You need to register a Feishu team and get the manager_ids from [Feishu Admin](https://www.feishu.cn/). Fortunately, it is free for a small team.\n2. You need to create an app and get the app_id and app_secret from [Feishu Open Platform](https://open.feishu.cn/).\n\n```python\nimport pandas as pd\nimport dataframe_to_online_spreadsheet.feishu\nimport os\n\ndef test_feishu():\n\n app_id = os.getenv(\"APP_ID\")\n app_secret = os.getenv(\"APP_SECRET\")\n\n sheet1_data = pd.read_csv(\"./tests/test_data1.csv\")\n token = sheet1_data.feishu.to_spreadsheet(app_id, app_secret, title=\"Daily Report\", data={'title': 'sheet_name1', 'data': sheet1_data}, manager_ids=['xxx'])\n\n sheet2_data = pd.read_csv(\"./tests/test_data2.csv\")\n token = sheet2_data.feishu.to_spreadsheet(app_id, app_secret, title=\"Daily Report\", data={'title': 'sheet_name2', 'data': sheet2_data}, manager_ids=['xxx'], spreadsheet_token=token)\n\n sheet3_data = pd.read_csv(\"./tests/test_data3.csv\")\n token = sheet3_data.feishu.to_spreadsheet(app_id, app_secret, title=\"Daily Report\", data={'title': 'sheet_name3', 'data': sheet3_data}, manager_ids=['xxx'], spreadsheet_token=token)\n logging.info(f\"spreadsheet token: {token}\")\n assert token",
"bugtrack_url": null,
"license": null,
"summary": "Export a pandas dataframe to a online spreadsheet.",
"version": "0.1.8",
"project_urls": {
"Homepage": "https://github.com/kafkaliu/dataframe_to_online_spreadsheet",
"Issues": "https://github.com/kafkaliu/dataframe_to_online_spreadsheet/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "66b17f389bb5774fc50bab62c0982394b98f20f851e35e7879c19c9474dc3590",
"md5": "ee86fe75636bc7a2f754eceb2969f3b3",
"sha256": "601df444b3254baa349e9c0f6acfcd5468da525345977f1a0cd18ebdd3dc73e6"
},
"downloads": -1,
"filename": "dataframe_to_online_spreadsheet-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ee86fe75636bc7a2f754eceb2969f3b3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8913,
"upload_time": "2024-08-01T08:45:15",
"upload_time_iso_8601": "2024-08-01T08:45:15.456694Z",
"url": "https://files.pythonhosted.org/packages/66/b1/7f389bb5774fc50bab62c0982394b98f20f851e35e7879c19c9474dc3590/dataframe_to_online_spreadsheet-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "272f799f5b86a0b5f7f8574a27a21873fab5efc4935ad7acc60f5a63ca6810ca",
"md5": "7c43381a57fc19bb63ab52ee0b56f1ec",
"sha256": "3e3ab88f138015a17c26f6875f8e70c82d039aefd6fa21a9421f632ccff53b07"
},
"downloads": -1,
"filename": "dataframe_to_online_spreadsheet-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "7c43381a57fc19bb63ab52ee0b56f1ec",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7870,
"upload_time": "2024-08-01T08:45:16",
"upload_time_iso_8601": "2024-08-01T08:45:16.966063Z",
"url": "https://files.pythonhosted.org/packages/27/2f/799f5b86a0b5f7f8574a27a21873fab5efc4935ad7acc60f5a63ca6810ca/dataframe_to_online_spreadsheet-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-01 08:45:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kafkaliu",
"github_project": "dataframe_to_online_spreadsheet",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dataframe-to-online-spreadsheet"
}