Datasets:

record_blue_only / README.md
THUgewu's picture
Add TsFile (converted from dahoon88/record-blue-only)
a8236a3 verified
|
Raw History Blame Contribute Delete
1.63 kB
metadata
license: apache-2.0
tags:
  - tsfile
  - timeseries
  - format:tsfile
  - time-series
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/record_blue_only.tsfile

record_blue_only

Converted from the Hugging Face dataset dahoon88/record-blue-only to Apache TsFile format.

Source Dataset

Conversion Notes

  • Conversion mode: script
  • Time precision: ms
  • TsFile data files: ['data/record_blue_only.tsfile']
  • Converter: scripts/converters/lerobot.py

Usage

Install the Apache TsFile Python SDK (pip install tsfile) and read a converted file:

from pathlib import Path
from tsfile import TsFileReader

path = Path("data/record_blue_only.tsfile")
with TsFileReader(str(path)) as reader:
    schemas = reader.get_all_table_schemas()
    print("tables:", list(schemas))
    table_name = next(iter(schemas))
    table = schemas[table_name]
    columns = [column.get_column_name() for column in table.get_columns()]
    print("columns:", columns)
    field_names = [
        column.get_column_name()
        for column in table.get_columns()
        if column.get_column_name() not in {"Time", "time"}
    ]
    if field_names:
        with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
            batch = result.read_arrow_batch()
            if batch is not None:
                print(batch.to_pandas().head())