PyFunctional 项目教程

PyFunctional 项目教程

PyFunctionalPython library for creating data pipelines with chain functional programming项目地址:https://gitcode.com/gh_mirrors/py/PyFunctional

1. 项目的目录结构及介绍

PyFunctional 项目的目录结构如下:

PyFunctional/
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── README.md
├── docs/
│   ├── Makefile
│   ├── api.rst
│   ├── conf.py
│   ├── developer.rst
│   ├── index.rst
│   ├── make.bat
│   ├── streams.rst
│   ├── transformations.rst
│   └── util.rst
├── pyfunctional/
│   ├── __init__.py
│   ├── functional.py
│   ├── lineage.py
│   ├── pipeline.py
│   ├── streams.py
│   ├── transformations.py
│   └── util.py
├── requirements.txt
├── setup.cfg
├── setup.py
└── tests/
    ├── __init__.py
    ├── test_functional.py
    ├── test_lineage.py
    ├── test_pipeline.py
    ├── test_streams.py
    ├── test_transformations.py
    └── test_util.py

目录结构介绍

  • CHANGELOG.md: 记录项目版本变更历史。
  • CONTRIBUTING.md: 贡献指南,指导开发者如何为项目贡献代码。
  • LICENSE: 项目许可证文件。
  • MANIFEST.in: 用于打包时的文件列表。
  • README.md: 项目介绍和使用说明。
  • docs/: 项目文档目录,包含 Sphinx 文档配置和源文件。
  • pyfunctional/: 项目源代码目录,包含核心功能实现。
  • requirements.txt: 项目依赖列表。
  • setup.cfg: 项目构建配置文件。
  • setup.py: 项目安装脚本。
  • tests/: 项目测试代码目录,包含单元测试文件。

2. 项目的启动文件介绍

PyFunctional 项目的启动文件是 pyfunctional/__init__.py。这个文件是项目的入口点,负责初始化模块并导出主要功能。

__init__.py 文件内容

from .functional import seq
from .streams import *
from .transformations import *
from .util import *

__all__ = [
    'seq',
    'read_stream',
    'read_text',
    'read_csv',
    'read_json',
    'read_pickle',
    'read_lines',
    'read_source',
    'select',
    'map',
    'starmap',
    'flat_map',
    'filter',
    'filter_not',
    'reduce',
    'group_by',
    'group_by_key',
    'count',
    'count_by_key',
    'distinct',
    'union',
    'intersection',
    'difference',
    'symmetric_difference',
    'zip',
    'zip_with_index',
    'sorted',
    'reverse',
    'random_sample',
    'cache',
    'to_list',
    'to_dict',
    'to_file',
    'to_csv',
    'to_json',
    'to_pickle',
    'to_string',
    'sum',
    'max',
    'min',
    'mean',
    'median',
    'stdev',
    'variance',
    'join',
    'partition',
    'slice',
    'take',
    'drop',
    'take_while',
    'drop_while',
    'exists',
    'for_each',
    'make_string',
    'size',
    'is_empty',
    'non_empty',
    'get_column',
    'set_column',
    'add_column',
    'drop_column',
    'rename_column',
    'explode',
    'aggregate',
    'aggregate_by_key',
    'parallelize',
    'lineage',
    'util'
]

启动文件介绍

  • seq: 创建一个序列对象,用于链式操作。
  • read_stream, read_text, read_csv, read_json, read_pickle, read_lines, read_source: 读

PyFunctionalPython library for creating data pipelines with chain functional programming项目地址:https://gitcode.com/gh_mirrors/py/PyFunctional

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

陆宜君

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值