neuralib.deeplabcut.core.DeepLabCutDataFrame

class neuralib.deeplabcut.core.DeepLabCutDataFrame[source]

Bases: DataFrameWrapper

DeepLabCut DataFrame

┌───────────┬───────────┬───────────┬───────────┬───┬───────────┬───────────┬───────────┬──────────┐
│ Nose_x    ┆ Nose_y    ┆ Nose_like ┆ EarL_x    ┆ … ┆ TailMid_l ┆ TailEnd_x ┆ TailEnd_y ┆ TailEnd_ │
│ ---       ┆ ---       ┆ lihood    ┆ ---       ┆   ┆ ikelihood ┆ ---       ┆ ---       ┆ likeliho │
│ f64       ┆ f64       ┆ ---       ┆ f64       ┆   ┆ ---       ┆ f64       ┆ f64       ┆ od       │
│           ┆           ┆ f64       ┆           ┆   ┆ f64       ┆           ┆           ┆ ---      │
│           ┆           ┆           ┆           ┆   ┆           ┆           ┆           ┆ f64      │
╞═══════════╪═══════════╪═══════════╪═══════════╪═══╪═══════════╪═══════════╪═══════════╪══════════╡
│ 57.907318 ┆ 512.54742 ┆ 0.999679  ┆ 77.701355 ┆ … ┆ 0.999904  ┆ 257.71426 ┆ 561.89660 ┆ 0.999961 │
│           ┆ 4         ┆           ┆           ┆   ┆           ┆ 4         ┆ 6         ┆          │
│ 57.907318 ┆ 516.79528 ┆ 0.999688  ┆ 77.701355 ┆ … ┆ 0.999923  ┆ 257.71426 ┆ 562.05725 ┆ 0.999954 │
│ …         ┆ …         ┆ …         ┆ …         ┆ … ┆ …         ┆ …         ┆ …         ┆ …        │
│ 94.259621 ┆ 43.849434 ┆ 0.973851  ┆ 106.33532 ┆ … ┆ 0.998977  ┆ 87.477776 ┆ 257.11996 ┆ 0.999937 │
│ 94.294357 ┆ 44.340511 ┆ 0.965436  ┆ 106.45220 ┆ … ┆ 0.999604  ┆ 87.223534 ┆ 258.46600 ┆ 0.999912 │
└───────────┴───────────┴───────────┴───────────┴───┴───────────┴───────────┴───────────┴──────────┘
__init__(df, meta, *, filtered)[source]
Parameters:
  • df (DataFrame) – DeepLabCut result dataframe

  • meta (DeepLabCutMeta | None) – DeepLabCutMeta

  • filtered (bool) – whether the results has already been filtered

Methods

__init__(df, meta, *, filtered)

clear([n])

See polars.DataFrame.clear.

clone()

Clone the wrapper.

dataframe(-> ~polars.dataframe.frame.DataFrame)

Getter/setter for the internal Polars DataFrame.

drop(*columns[, strict])

See polars.DataFrame.drop.

drop_nulls(subset)

See polars.DataFrame.drop_nulls.

fill_nan([value])

See polars.DataFrame.fill_nan.

fill_null([value, strategy, limit])

See polars.DataFrame.fill_null.

filter(*predicates, **constraints)

See polars.DataFrame.filter.

get_joint(joint)

get specific joint

group_by(*by[, maintain_order])

See polars.DataFrame.group_by.

head([n])

See polars.DataFrame.head.

join(other, on[, how, left_on, right_on, ...])

See polars.DataFrame.join.

lazy()

Wrap dataframe in a lazy wrapper.

limit([n])

See polars.DataFrame.limit.

partition_by(by, *more_by[, as_dict])

See polars.DataFrame.partition_by.

pipe(function, *args, **kwargs)

See polars.DataFrame.pipe.

rename(mapping)

See polars.DataFrame.rename.

select(*exprs, **named_exprs)

See polars.DataFrame.select.

slice(offset[, length])

See polars.DataFrame.slice.

sort(by, *more_by[, descending, nulls_last, ...])

See polars.DataFrame.sort.

tail([n])

See polars.DataFrame.tail.

with_columns(*exprs, **named_exprs)

See polars.DataFrame.with_columns.

with_row_index([name, offset])

See polars.DataFrame.with_row_index.

Attributes

columns

See polars.DataFrame.columns.

default_filtered

whether default filtered when running the deeplabcut

fps

frame per second, meta data required

joints

list of labelled joints

meta

DeepLabCutMeta

model_config

DeepLabCutModelConfig

nframes

number of frames

schema

See polars.DataFrame.schema.

__init__(df, meta, *, filtered)[source]
Parameters:
  • df (DataFrame) – DeepLabCut result dataframe

  • meta (DeepLabCutMeta | None) – DeepLabCutMeta

  • filtered (bool) – whether the results has already been filtered

dataframe() DataFrame[source]
dataframe(dataframe: DataFrame, may_inplace: bool = True) Self

Getter/setter for the internal Polars DataFrame.

Parameters:
  • dataframe (DataFrame | None) – Optional new dataframe to set.

  • may_inplace (bool) – If True, update current instance. Otherwise, return new instance.

Returns:

The current dataframe or a modified wrapper instance.

Return type:

DataFrame | Self

property default_filtered: bool

whether default filtered when running the deeplabcut

property meta: DeepLabCutMeta

DeepLabCutMeta

property model_config: DeepLabCutModelConfig

DeepLabCutModelConfig

property fps: float

frame per second, meta data required

property nframes: int

number of frames

property joints: list[str]

list of labelled joints

get_joint(joint)[source]

get specific joint

Parameters:

joint (str)

Return type:

JointDataFrame