Pyspread – Python 电子表格
Pyspread – Pythonic Spreadsheet

原始链接: https://pyspread.gitlab.io/

Pyspread 是一个使用 Python 开发的独特电子表格应用程序,旨在成为最“Pythonic”的选项。 Pyspread 没有使用传统的电子表格语言,而是在其单元格中使用 Python 表达式,从而返回 Python 对象而不是简单值。 其主要功能包括直接访问单元格内的 NumPy 等 Python 模块,以及 CSV 和 SVG 等各种格式的导入和导出。 此外,Pyspread 通过 Matplotlib 和 R 图表等库支持复杂的可视化,甚至还提供拼写检查器。 经常使用 Python 的开发人员和研究人员将从这种创新方法中受益匪浅,从而实现数据和 Python 脚本之间的无缝集成。 同时,不具备 Python 知识或需要大量计算能力的用户应该考虑其他选择。 如需帮助或意见,请访问 Gitter 上的 pyspread 社区论坛或 GitHub 上的开放问题。

本文讨论了名为 pyspread 的特定电子表格工具的用法和首选项,重点关注其与 macOS 的兼容性以及与 Microsoft Excel 相比的易用性。 作者认为,多功能性和迎合各种操作系统可能会导致开源项目维护人员的倦怠。 他们建议大多数专业开发人员可能会使用 macOS,因为它与 BSD 系统相似,这使得 pyspread 成为一个有利的选择。 不过,他们也承认,美国初创公司可能会提供灵活的硬件选择,从而导致 MacBook 在开发者中广受欢迎。 文中提到了 Excel 的问题,例如使用字母顺序的列名称对于较大的矩阵来说变得令人困惑、缺乏依赖性跟踪以及确定列偏移量的麻烦。 另一方面,Pyspread 提供了更简单的数字标签,尽管它缺乏真正的电子表格功能,例如依赖性跟踪。 作者对旨在通过“增值”将组织困在各自云服务中的专有软件表示担忧,并批评 Excel 和 Microsoft Office 根据 GNU 通用公共许可证版本 3 获得许可,从而阻止其包含在 FreeCAD 等其他开源工具中。 他们强调开源贡献对职业发展的重要性,并通过开源平台分享个人参与和成功的经验。 此外,他们建议针对所需领域内的特定组件,以帮助获得专业知识并提高就业能力。
相关文章

原文

pyspread is a non-traditional spreadsheet application that is based on and written in the programming language Python. The goal of pyspread is to be the most pythonic spreadsheet.

pyspread expects Python expressions in its grid cells, which makes a spreadsheet specific language obsolete. Each cell returns a Python object that can be accessed from other cells. These objects can represent anything including lists or matrices.

pyspread is free software. It is released under the GPL v3 licence.

The latest release is pyspread v2.2.3 (source code). It requires Python 3.6+.

The last (outdated) release that is compatible with Python 2.x is pyspread v1.1.3.

Pyspread example

Features

  • Cells accept Python code and return Python objects
  • Access to Python modules from within cells including e.g. NumPy
  • Imports CSV, SVG
  • Exports CSV, SVG, PDF*
  • Cells may display text, markup, images, dates** or charts**
  • Matplotlib and R charts. Plotnine and R packages graphics, lattice, ggplot2 supported via dialog.**
  • Spell checker**
  • git-able pysu save file format
  • blake2b based save file signatures that prevent foreign code execution

Notes: * PDF export via print to file, ** requires optional dependencies

Target User Group

Directly using Python code in a grid is a core feature of pyspread. The target user group has experience with or wants to learn the programming language Python:

  • Clara is a research engineer. She systematically compares results of different parameter sets. She is proficient with Python and has used it for her scientific analyses. Clara wants a quick initial overview of how changing specific parameters affects her results. With pyspread, Clara is displaying each result in one cell. This allows her to quickly figure out, which parameters she is going to focus on next.

  • Peter is using spreadsheets to prepare business decisions. He separates data from code by keeping his business data in CSV files and accessing these files from pyspread. Furthermore, Peter is worried about algorithmic errors and calculation inaccuracies is his complicated tables. He is importing the Money datatype from py-moneyed in the Macro panel. The dedicated Money class helps him avoiding floating point errors. Peter has implemented his analysis tools together with unit tests in a separate Python module, which he is importing as well. Therefore, he is worrying less about wrong results that may lead to bad business decisions.

Not part of the target user group are Donna and Jack:

  • Donna is looking for a free replacement for Ms. Excel. She does not know any programming language, and she has no time to learn Python.

  • Jack does computation intensive data analysis. He is looking for a spreadsheet that can parallelize calculations - ideally out of the box as a cluster or a cloud solution.

This does not mean that Donna or Jack cannot work with pyspread. However, Donna might find the learning curve for using Python code in cells too steep. Jack on the other hand might be disappointed because he has to ensure manually that his long running tasks are not locking up pyspread.

For user questions or user feedback please use the pyspread community board on gitter.

For contributions, patches, development discussions and ideas please create an issue using the pyspread issue tracker

联系我们 contact @ memedata.com