scicloj/tablecloth

:dataset-name in option is not effective in some cases

Closed this issue · 1 comments

kimim commented

:dataset-name in option is not effective:

(ns test
  (:require [tablecloth.api :as api]))

(def ds (api/dataset [[1 2 3][4 5 6]] {:dataset-name "Test"}))
ds

#+RESULTS:

: :_unnamed [3 2]:
: 
: | 0 | 1 |
: |--:|--:|
: | 1 | 4 |
: | 2 | 5 |
: | 3 | 6 |
: 

But it works for single value dataset:

(api/dataset 999 {:dataset-name "single value"})

#+RESULTS:

: single value [1 1]:
: 
: | :$value |
: |--------:|
: |     999 |
(def ds-new (api/set-dataset-name ds "Test"))
ds-new

#+RESULTS:

: Test [3 2]:
: 
: | 0 | 1 |
: |--:|--:|
: | 1 | 4 |
: | 2 | 5 |
: | 3 | 6 |

Thanks! Confirmed. It's a bug in a dataset inference on TC side.