Skip to content

Commit 24c0e64

Browse files
committed
Fixes #408
1 parent b0896cc commit 24c0e64

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
2+
# 7.030
3+
* [issue-408](https://github.com/techascent/tech.ml.dataset/issues/408) - xlsx files with numberic column names now load.
4+
* dtype-next upgrade fixing a few issues, most notably [issue-99](https://github.com/cnuernber/dtype-next/issues/99).
5+
26
# 7.029
37
* large parquet files now load - slowly as loading can't be parallelized - without holding onto more memory than they should.
48

src/tech/v3/dataset/io/context.clj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,12 @@
9090
colparser-compute-fn (reify Function
9191
(apply [this col-idx]
9292
(let [colname (col-idx->colname col-idx)
93-
colname (if (empty? colname)
93+
colname (cond
94+
(number? colname)
95+
colname
96+
(empty? colname)
9497
(make-colname col-idx)
98+
:else
9599
(utils/remove-zero-width-spaces colname))
96100
colname (if (and ensure-unique-column-names?
97101
(get colname->idx colname))

test/tech/v3/libs/fastexcel_test.clj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,8 @@
9292
(is (some? (ds/column ds "column::2")))
9393
(is (some? (ds/column ds "column::4")))
9494
(is (some? (ds/column ds "column-1::6"))))))
95+
96+
97+
(deftest number-colname
98+
(let [ds (ds/->dataset "test/data/number_column.xlsx")]
99+
(is (= (first (ds/column-names ds)) 0.0))))

0 commit comments

Comments
 (0)