koladata

Home
Overview
Fundamentals
Glossary
Cheatsheet
API Reference
Quick Recipes
Deep Dive
Common Pitfalls and Gotchas
Persistent Storage

View the Project on GitHub google/koladata

kd.annotation API

Annotation operators.

kd.annotation.source_location(expr, loc)

Annotation for source location where the expr node was created.

The annotation is considered as "best effort" so any of the
arguments may be missing.

Args:
  expr: The expression to be annotated.
  loc: Source location information. Must be a literal
    namedtuple with the following fields:
    - function_name: Name of the function (TEXT)
    - file_name: Name of the file (TEXT)
    - line: Line number (INT32)
    - column: Column number (INT32)
    - line_text: Source code line (TEXT)

kd.annotation.with_name(obj: Any, name: str | Text) -> Any

Alias for kd.types.DataBag.with_name