Skip to main content

A package to enhance common day to day tasks in the life of a data scientist

Project description

pytae

pytae is a lightweight Python package that makes everyday data science tasks faster and more readable — think SAS-style chaining on top of pandas.

Installation

pip install pytae

Requires Python ≥ 3.7, pandas ≥ 1.0.0, seaborn ≥ 0.10.0.

Quick start

import pytae as pt

df = pt.sample_data['penguins']

(df
 .qry({'species': ['Adelie', 'Gentoo'], 'sex': 'Female'})
 .select(['species', 'island', 'bill_length_mm', 'body_mass_g'])
 .agg_df(aggfunc=['mean', 'n'])
)

Features

Six feature sets, each with a companion reference notebook:

1) Plotting — Plotter

Lightweight plotting built on top of pandas.plot, fully compatible with matplotlib. plotter.ipynb

2) Filtering — qry()

Filter rows using a dict of conditions: equality, list, comparison operators, interval notation, and not in. qry.ipynb

3) Selection — select()

Pick columns by name, regex, slice, dtype, substring match, or callable. Pin columns up front with everything(). select.ipynb

4) Reshaping — long(), wide()

long() melts all numeric columns to rows. wide() pivots a column's values into headers. Designed to work as a pair. shape.ipynb

5) Aggregation — agg_df()

Auto-detects group columns (non-numeric) and aggregates the rest. Supports str, list, and dict aggfunc. n is a special token for group count. agg_df.ipynb

6) Utilities — clip(), handle_missing(), cols(), group_x()

  • cols() — sorted column list
  • handle_missing() — fill NaN with a visible marker before aggregating
  • group_x() — broadcast a group aggregate back to every row (like transform)
  • clip() — copy DataFrame to clipboard for pasting into Excel / Sheets

other_utilities.ipynb

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

pytae-2.6.3.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytae-2.6.3-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file pytae-2.6.3.tar.gz.

File metadata

  • Download URL: pytae-2.6.3.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytae-2.6.3.tar.gz
Algorithm Hash digest
SHA256 074c92e124d88629109e5fe8a4b2f413888bb6c8277cc5716de635a45eacada3
MD5 8a08825fbdfdaa03896ea07dc8413098
BLAKE2b-256 d349b6e4ce946b294511a9e0a2140899f6c8d324644c98000af4ad69c5916449

See more details on using hashes here.

File details

Details for the file pytae-2.6.3-py3-none-any.whl.

File metadata

  • Download URL: pytae-2.6.3-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytae-2.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6c251e35a933587e74fdacee5eafcfed399afed56392fe545051f1308409978b
MD5 32ae6d95d5774374dbf130a84b161688
BLAKE2b-256 912ffafe20389fee45b50de10380302fb6bf3493a16649e8ad8b7363ba9a54f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page