# pandas-parallel-apply
`df.apply(fn)`, `df[col].apply(fn)` and `series.apply(fn)` wrappers with tqdm included
## Installation
`pip install pandas-parallel-apply`
## Examples
See `examples/` for usage on some dummy dataframe and series.
## Usage
## 1. Procedural
### Apply on each row of a dataframe
`df.apply(fn)` -> `apply_on_df_parallel(df: pd.DataFrame, fn: Callable, n_cores: int, pbar: bool = True)`
### Apply on a column of a dataframe and return the Series
`df[col].apply(fn, axis=1)` -> `apply_on_df_col_parallel(df: pd.DataFrame, col_name: str, fn: Callable, n_cores: int, pbar: bool = True)`
### Apply on a series and return the modified Series
`series.apply(fn)` -> `apply_on_seris_parallel(series: pd.Series, fn: Callable, n_cores: int, pbar: bool = True)
### Switches for boolean parallel/non-parallel
`apply_on_df/df_col/series_maybe_parallel(*, parallel: bool, n_cores: int, pbar: bool = True)`
## 2. Object Oriented Programming
### Apply on each row of a dataframe
`df.apply(fn)` -> `DataFrameParallel(df, n_cores: int, pbar: bool = True).apply(fn)`
### Apply on a column of a dataframe and return the Series
`df[col].apply(fn, axis=1)` -> `DataFrameParallel(df, n_cores: int, pbar: bool=True)[col].apply(fn, axis=1)`
### Apply on a series
`series.apply(fn)` -> `SeriesParallel(series, n_cores: int, pbar: bool=True).apply(fn)`
That's all.
没有合适的资源?快使用搜索试试~ 我知道了~
pandas-parallel-apply-1.2.0.tar.gz
需积分: 1 0 下载量 86 浏览量
2024-03-07
12:45:35
上传
评论
收藏 4KB GZ 举报
温馨提示
共13个文件
py:5个
txt:4个
pkg-info:2个
Python库是一组预先编写的代码模块,旨在帮助开发者实现特定的编程任务,无需从零开始编写代码。这些库可以包括各种功能,如数学运算、文件操作、数据分析和网络编程等。Python社区提供了大量的第三方库,如NumPy、Pandas和Requests,极大地丰富了Python的应用领域,从数据科学到Web开发。Python库的丰富性是Python成为最受欢迎的编程语言之一的关键原因之一。这些库不仅为初学者提供了快速入门的途径,而且为经验丰富的开发者提供了强大的工具,以高效率、高质量地完成复杂任务。例如,Matplotlib和Seaborn库在数据可视化领域内非常受欢迎,它们提供了广泛的工具和技术,可以创建高度定制化的图表和图形,帮助数据科学家和分析师在数据探索和结果展示中更有效地传达信息。
资源推荐
资源详情
资源评论
收起资源包目录
pandas-parallel-apply-1.2.0.tar.gz (13个子文件)
pandas-parallel-apply-1.2.0
pandas_parallel_apply
__init__.py 350B
pandas_parallel_apply.py 5KB
data_frame_parallel.py 856B
series_parallel.py 432B
setup.py 2KB
pandas_parallel_apply.egg-info
SOURCES.txt 409B
top_level.txt 22B
PKG-INFO 2KB
requires.txt 18B
dependency_links.txt 1B
PKG-INFO 2KB
setup.cfg 38B
README.md 1KB
共 13 条
- 1
资源评论
程序员Chino的日记
- 粉丝: 2913
- 资源: 4万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功