annotate_prev_word_idx# pymovements.measure.reading.annotate_prev_word_idx(fixations: DataFrame, group_columns: list[str]) → DataFrame[source]# Annotate fixations with the word index of the previous fixation. Parameters: fixations (pl.DataFrame) – Fixation-level DataFrame. Must contain a word_idx column. group_columns (list[str]) – Column names used to partition the data into independent reading sequences. Returns: Input DataFrame with an additional prev_word_idx column. Return type: pl.DataFrame