# 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-0.2.0.tar.gz
需积分: 1 132 浏览量
2024-03-07
12:45:05
上传
评论
收藏 3KB GZ 举报
程序员Chino的日记
- 粉丝: 2913
- 资源: 4万+
最新资源
- 基于Javascript和Python的微商城项目设计源码 - MicroMall
- 基于Java的网上订餐系统设计源码 - online ordering system
- 基于Javascript的超级美眉网络资源管理应用模块设计源码
- 基于Typescript和PHP的编程知识储备库设计源码 - study-php
- Screenshot_2024-05-28-11-40-58-177_com.tencent.mm.jpg
- 基于Dart的Flutter小提琴调音器APP设计源码 - violinhelper
- 基于JavaScript和CSS的随寻订购网页设计源码 - web-order
- 基于MATLAB的声纹识别系统设计源码 - VoiceprintRecognition
- 基于Java的微服务插件集合设计源码 - wsy-plugins
- 基于Vue和微信小程序的监理日志系统设计源码 - supervisionLog
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈