Skip to content

Commit eb4877a

Browse files
committed
fix issue with html dispaly of subdataset
1 parent 742d82f commit eb4877a

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/abstractdataset/io.jl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,17 @@ function _show(io::IO, ::MIME"text/html", ds::AbstractDataset;
224224
else
225225
""
226226
end
227-
mainmsg = if !isempty(index(ds).sortedcols) && index(ds).grouped[]
228-
"<p>$(digitsep(nrow(ds))) rows × $(digitsep(ncol(ds))) columns$omitmsg</p><p><b> Grouped Dataset with $(index(ds).ngroups[]) groups </p><p> Grouped by: $(join(_names(ds)[index(ds).sortedcols],", ")) </p>"
229-
elseif !isempty(index(ds).sortedcols)
230-
"<p>$(digitsep(nrow(ds))) rows × $(digitsep(ncol(ds))) columns$omitmsg</p><p><b> Sorted Dataset </p><p> Sorted by: $(join(_names(ds)[index(ds).sortedcols],", ")) </p>"
231-
else
232-
"<p>$(digitsep(nrow(ds))) rows × $(digitsep(ncol(ds))) columns$omitmsg</p>"
233-
end
227+
if ds isa SubDataset
228+
mainmsg = "<p>$(digitsep(nrow(ds))) rows × $(digitsep(ncol(ds))) columns$omitmsg</p><p><b> SubDataset (view of Dataset)</p>"
229+
else
230+
mainmsg = if !isempty(index(ds).sortedcols) && index(ds).grouped[]
231+
"<p>$(digitsep(nrow(ds))) rows × $(digitsep(ncol(ds))) columns$omitmsg</p><p><b> Grouped Dataset with $(index(ds).ngroups[]) groups </p><p> Grouped by: $(join(_names(ds)[index(ds).sortedcols],", ")) </p>"
232+
elseif !isempty(index(ds).sortedcols)
233+
"<p>$(digitsep(nrow(ds))) rows × $(digitsep(ncol(ds))) columns$omitmsg</p><p><b> Sorted Dataset </p><p> Sorted by: $(join(_names(ds)[index(ds).sortedcols],", ")) </p>"
234+
else
235+
"<p>$(digitsep(nrow(ds))) rows × $(digitsep(ncol(ds))) columns$omitmsg</p>"
236+
end
237+
end
234238
write(io, mainmsg)
235239

236240
end

0 commit comments

Comments
 (0)