File size: 2,674 Bytes
f7706c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
pretty_name: "Superstore Sales POS (TsFile)"
modality: timeseries
authors: "An-j96"
task_categories:
- time-series-forecasting
size_categories:
- 1K<n<10K
tags:
- tsfile
- timeseries
- modality:timeseries
- format:tsfile
- finance
configs:
- config_name: default
  data_files:
  - split: train
    path: "superstore_data.tsfile"
---

# Superstore Sales POS (TsFile)

This dataset is an Apache TsFile conversion of
[`An-j96/SuperstoreData`](https://huggingface.co/datasets/An-j96/SuperstoreData).

Modalities: Time-series.

## Overview

- Superstore point-of-sale transactions for sales/demographics forecasting.
- Each order records segment, category, region, ship mode, and sale metrics (`Sales`, `Quantity`, `Discount`, `Profit`).
- Order dimensions are device TAGs; sales metrics are FIELDs.

- Converted observations: 9,994 rows across 1 TsFile file(s)
- Source format: csv

## TsFile schema

- **Time** — source `Order Date` (`%m/%d/%Y`), converted to INT64 milliseconds.

| Column | Role | Type | Meaning |
|---|---|---|---|
| `Time` | TIME | INT64 (ms) | sample timestamp |
| `Row_ID` | TAG | STRING | order id |
| `Segment` | TAG | STRING | customer segment |
| `Category` | TAG | STRING | product category |
| `Region` | TAG | STRING | region |
| `Ship_Mode` | TAG | STRING | shipping mode |
| `Sales` | FIELD | FLOAT | sales amount |
| `Quantity` | FIELD | FLOAT | quantity |
| `Discount` | FIELD | FLOAT | discount |
| `Profit` | FIELD | FLOAT | profit |

## Conversion notes

- `Row_ID`, `Segment`, `Category`, `Region`, `Ship_Mode` kept as TAGs; `Sales`/`Quantity`/`Discount`/`Profit` as FLOAT/INT64 FIELDs.

## Source & license

- Original dataset: https://huggingface.co/datasets/An-j96/SuperstoreData
- Author / publisher: An-j96
- License: gpl-2.0

## 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("superstore_data.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())
```