Excel-style conditional aggregation with AND/OR logic for pandas
Project description
fashiondata00
fashiondata00 is a lightweight Python package that provides a single versatile function all()
for Excel-style conditional aggregation in pandas, supporting AND / OR logic.
📦 Installation
pip install fashiondata00
🧠 Function: all()
all(df, target_col=None, agg='sum', logic='and', **conditions)
Parameters:
df: pandas DataFrametarget_col: column to aggregate (optional if usingcount)agg: aggregation type -'sum','mean','count','min','max'logic:'and'(default) or'or'for combining conditions**conditions: keyword arguments specifying conditions
(e.g.,Gender='F', City='Seoul')
✅ Examples
from fashiondata00 import all
import pandas as pd
df = pd.DataFrame({
'Gender': ['F', 'M', 'F', 'F'],
'City': ['Seoul', 'Busan', 'Seoul', 'Busan'],
'Score': [90, 70, 85, 95]
})
# AND condition: Female AND lives in Seoul → sum of scores
all(df, target_col='Score', agg='sum', logic='and', Gender='F', City='Seoul')
# Output: 175
# OR condition: Female OR lives in Seoul → average score
all(df, target_col='Score', agg='mean', logic='or', Gender='F', City='Seoul')
👤 Author
Made by [Kwon Ki Yong]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fashiondata00-0.1.3.tar.gz
(2.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fashiondata00-0.1.3.tar.gz.
File metadata
- Download URL: fashiondata00-0.1.3.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52468d39f08840ff6a71c8271cb366f73971b1d0ec850796fc6c56ea7e18f13f
|
|
| MD5 |
557e198f71b6b5db9c4278d398d2ac76
|
|
| BLAKE2b-256 |
3071008143429e456ac77c146c7975580fea2dc30c2123dc4053976b2d534c03
|
File details
Details for the file fashiondata00-0.1.3-py3-none-any.whl.
File metadata
- Download URL: fashiondata00-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
162baae7555edec3e1b772a12a6d3377d3ed9f520ed35894e87c6f9b4b68dece
|
|
| MD5 |
bbcc3758ae6d7365512bcf1796f9d4bf
|
|
| BLAKE2b-256 |
c4548604a3e3467870b1fde69a6c7f30bd1455eac8b6ee236ae08582453c6019
|