Skip to content

em-oaken/ofwhich

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofwhich

Easy drill-down into dataset for high-level summary.

In this README 👇

Usage

Installation

Make sure you are in the right environment and install the package

pip install ofwhich

Getting started

  1. Have a dataframe to run insights from. Example:
import pandas as pd
import numpy as np

num_rows = 100

df = pd.DataFrame({
    'Category': np.random.choice(['X', 'Y', 'Z'], size=num_rows),
    'Bool': np.random.choice([True, False], size=num_rows)
})

df.head()
  Category  Bool
0        Z  True
1        X  False
2        Y  False
...
  1. Use ofwhich:
from ofwhich import OfWhich
_ = OfWhich(df, 'Category1', 'Bool1')
  1. Enjoy the output :)
Total 100 records
    Of which X 37 records
        Of which True 19 records
        Of which False 18 records
    Of which Y 35 records
        Of which True 19 records
        Of which False 16 records
    Of which Z 28 records
        Of which True 16 records
        Of which False 12 records

Contributing

If you find a bug, please open an issue. Ideas for new features and improvement are welcome! Feel free to open an issue or PR.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages