awkward-array

Process jagged data in Python using Awkward Array 2.0.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/gordonwatts/skill-test --skill awkward-array
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: awkward-array
Source: https://github.com/gordonwatts/skill-test/tree/main/.codex/skills/awkward-array
Command: npx skills add https://github.com/gordonwatts/skill-test --skill awkward-array

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Awkward Array 2.0 presents powerful tools for jagged data; this skill consolidates best practices and quick patterns to construct, manipulate, and reason about nested data structures in Python.

Core Features & Use Cases

  • Build and combine records with ak.zip to create structured event-like data.
  • Extend arrays with new fields using ak.with_field and perform common transforms like filtering, sorting, and flattening.
  • Handle combinatorics with ak.cartesian and ak.combinations to explore pairings and n-way combinations across nested lists.
  • Safely navigate argmin/argmax slicing and NumPy interoperability within Awkward arrays.
  • Real-world use: transform variable-length event data into flat tables for analysis and plotting.

Quick Start

Build a tiny jagged dataset, combine fields with ak.zip, and add a derived field with ak.with_field.

Frequently Asked Questions about awkward-array

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build nested records from jagged arrays in Python?

Build nested records from jagged arrays in Python by using ak.zip to combine multiple variable-length arrays into structured event-like data. This creates a single array of records where each field is accessible by name, enabling structured queries on complex datasets.

What is the best way to add a derived field to jagged data?

Add a derived field to jagged data by applying ak.with_field to an existing Awkward Array. This function returns a new array with the calculated field appended, allowing you to extend records without manually restructuring the nested lists.

How do I compute pairings and combinations across nested lists?

Compute pairings and combinations across nested lists using ak.cartesian for cross-list pairings and ak.combinations for n-way combinations within the same list. These functions handle jagged boundaries automatically, returning nested arrays of valid index pairs.

Can I use NumPy interoperability when filtering and sorting Awkward arrays?

You can use NumPy interoperability when filtering and sorting Awkward arrays by passing Awkward structures directly into compatible NumPy functions. This allows argmin and argmax slicing operations to execute safely while preserving the underlying jagged data structure.

How do I transform variable-length event data into flat tables for analysis?

Transform variable-length event data into flat tables for analysis by flattening nested Awkward Array structures. This process unwraps jagged lists into standard tabular rows, making the dataset immediately compatible with standard plotting and analysis libraries.