pyrregular.accessor
Classes
- class pyrregular.accessor.IrregularAccessor(da)[source]
Bases:
object- reset_time_index(ts_level=True, index_scale=1e-09, absolute_time=True, concatenate_time=False, normalize_time=False)[source]
- to_aeon(reset_time_index=True, ts_level=True, index_scale=1e-09, absolute_time=True, concatenate_time=False)[source]
- to_awkward(reset_time_index=True, ts_level=True, index_scale=1e-09, absolute_time=True, concatenate_time=False, dropna=True)[source]
Return
to_listas awkward arrays (needspip install awkward).
- to_dense(reset_time_index=True, ts_level=True, index_scale=1e-09, absolute_time=True, concatenate_time=False, normalize_time=False)[source]
- to_list(reset_time_index=True, ts_level=True, index_scale=1e-09, absolute_time=True, concatenate_time=False, dropna=True)[source]
Return X and T as nested lists, X[i][j] being signal j of series i.
dropna=True removes the padding. With ts_level=True each series has one timeline, T[i][0]: the timestamps where at least one signal has a value; X[i][j] keeps a NaN where signal j has no value at one of them, so X[i][j][k] is observed at T[i][0][k]. With ts_level=False each signal has its own timeline, T[i][j], and X[i][j] has no NaNs.
- to_long(reset_time_index=True, ts_level=True, index_scale=None, absolute_time=True, static=False)[source]
Return the data in long format: one row per observation.
Columns are ts_id, signal_id, time_id and value_id, as read by read_csv. Ids are categoricals with the original labels. Times are the original values unless index_scale is given (then float, scaled like to_dense). absolute_time=False makes times relative to the first one of each series (or of each series/signal pair if ts_level=False). static=True adds every other coordinate as a column, repeated on each row. reset_time_index has no effect and is kept for backward compatibility.