# pandas-xlsx-tables
Even though you might not like it, Excel isn't going anywhere. And Excel with tables is [a lot better than without](https://www.ecosia.org/search?q=advantages+of+excel+tables). Some highlights are: better performance, reference columns by name (vs defining named ranges), sticky headers (vs freeze panes), stricter typing (vs random types) and sort/filter dropdowns.
Out of the box Pandas provides to and from excel functionality, but it cannot write native excel tables (the result is only formatted like one). This is where pandas-xlsx-tables comes in: convert excel tables to dataframes and vice versa, whilest mostly preserving data types. The api has been kept deliberatly simple as to provide useful functionality out of the box.
!["Excel screenshot](https://raw.githubusercontent.com/VanOord/pandas-xlsx-tables/master/docs/_static/xlsx_table.png)
```python
>>> from pandas_xlsx_tables import xlsx_table_to_df
>>> df = xlsx_table_to_df("my_file.xlsx", "Table1")
>>> df
col1 col2
Row
0 1 a
1 2 b
```
And the reverse process:
```python
>>> from pandas_xlsx_tables import df_to_xlsx_table
>>> df_to_xlsx_table(df, "my_table", header_orientation="diagonal", index=False)
```
!["Excel screenshot](https://raw.githubusercontent.com/VanOord/pandas-xlsx-tables/master/docs/_static/xlsx_table_2.png)
## Why not integretate this in Pandas directly?
Due to the complexity of Pandas and the large number of users it is very difficult to significantly change the current excel implementeation. Also the abstractions available to plug different engines are not that helpful. Basically I tried and [gave up](https://github.com/pandas-dev/pandas/issues/24862) (but of course I would prefer having this built into Pandas).
没有合适的资源?快使用搜索试试~ 我知道了~
pandas-xlsx-tables-1.0.0.tar.gz
需积分: 1 0 下载量 56 浏览量
2024-03-08
15:38:57
上传
评论
收藏 32KB GZ 举报
温馨提示
共41个文件
py:9个
txt:7个
md:7个
Python库是一组预先编写的代码模块,旨在帮助开发者实现特定的编程任务,无需从零开始编写代码。这些库可以包括各种功能,如数学运算、文件操作、数据分析和网络编程等。Python社区提供了大量的第三方库,如NumPy、Pandas和Requests,极大地丰富了Python的应用领域,从数据科学到Web开发。Python库的丰富性是Python成为最受欢迎的编程语言之一的关键原因之一。这些库不仅为初学者提供了快速入门的途径,而且为经验丰富的开发者提供了强大的工具,以高效率、高质量地完成复杂任务。例如,Matplotlib和Seaborn库在数据可视化领域内非常受欢迎,它们提供了广泛的工具和技术,可以创建高度定制化的图表和图形,帮助数据科学家和分析师在数据探索和结果展示中更有效地传达信息。
资源推荐
资源详情
资源评论
收起资源包目录
pandas-xlsx-tables-1.0.0.tar.gz (41个子文件)
pandas-xlsx-tables-1.0.0
setup.py 713B
.coveragerc 601B
.github
workflows
test-and-publish.yaml 2KB
LICENSE.txt 1KB
src
pandas_xlsx_tables.egg-info
SOURCES.txt 956B
top_level.txt 19B
PKG-INFO 3KB
requires.txt 191B
not-zip-safe 1B
dependency_links.txt 1B
pandas_xlsx_tables
utils.py 4KB
__init__.py 608B
to_xlsx_table.py 5KB
from_xlsx_tables.py 3KB
PKG-INFO 3KB
tests
import pandas as pd.py 231B
test_convert_xlsx.py 5KB
conftest.py 286B
CONTRIBUTING.rst 13KB
.readthedocs.yml 461B
CHANGELOG.md 156B
.pre-commit-config.yaml 1KB
tox.ini 2KB
docs
license.rst 67B
Makefile 1KB
changelog.md 156B
readme.md 2KB
conf.py 10KB
authors.md 96B
contributing.rst 33B
requirements.txt 246B
_static
xlsx_table.png 3KB
xlsx_table_2.png 3KB
.gitignore 18B
index.md 1KB
pyproject.toml 311B
requirements.txt 2KB
.gitignore 566B
setup.cfg 2KB
README.md 2KB
AUTHORS.md 96B
共 41 条
- 1
资源评论
程序员Chino的日记
- 粉丝: 2861
- 资源: 4万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功