Datasets:

File size: 1,597 Bytes
6f9ef3b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
license: apache-2.0
tags:
- tsfile
- timeseries
- format:tsfile
- time-series
configs:
- config_name: default
  data_files:
  - split: train
    path: data/upload_test.tsfile
---

# upload_test

Converted from the Hugging Face dataset [`Dongkkka/upload_test`](https://huggingface.co/datasets/Dongkkka/upload_test) to Apache TsFile format.

## Source Dataset

- **Original dataset:** [`Dongkkka/upload_test`](https://huggingface.co/datasets/Dongkkka/upload_test)
- **Authors:** Dongkkka
- **License:** apache-2.0

## Conversion Notes

- Conversion mode: `script`
- Time precision: `ms`
- TsFile data files: `['data/upload_test.tsfile']`
- Converter: `scripts/converters/lerobot_listfix.py`

## Usage


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

```python
from pathlib import Path
from tsfile import TsFileReader

path = Path("data/upload_test.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())
```