IsFirstDistinctMask / Boolean Layer

Create boolean mask columns marking the first occurrence of each distinct value. Similar to pandas duplicated(keep='first') negated. Returns True only for the first occurrence of each value based on row order.

Common applications:

  • Keeping first instance of duplicated records
  • Initial event detection
  • First occurrence analysis
  • Time series first appearance
  • Data deduplication

Example:

IndexValueIs First Distinct
0appletrue
1bananatrue
2applefalse
3orangetrue
4bananafalse
Table
0
0
Table

Mask

[, ...]

List of first distinct checking operations to perform. Each mask creates a new boolean column. Common scenarios:

  • Identifying first customer interactions
  • Finding initial system events
  • Marking first occurrences in logs
  • Tracking first entries in time series

At least one mask must be specified.

Select

column

The column to check for first distinct values. Works with any data type. The mask will be a boolean column where:

  • True indicates the first occurrence of each value
  • False indicates subsequent occurrences

Useful for identifying initial appearances and deduplication while preserving first instances.

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.