Dataframes.jl: ⍰ character in header output

Created on 4 Mar 2020  Β·  6Comments  Β·  Source: JuliaData/DataFrames.jl

I was wondering what the odd little character in the header output was:

Screenshot 2020-03-04 at 11 31 40

I thought at first there was an error with the font - since it's more or less the same as the .notdef character which is displayed when a font can't display a suitable glyph. (See here for more info.)

I found out that it's an APL SYMBOL QUAD QUESTION, '⍰': Unicode U+2370 (category So: Symbol, other).

So given that it's not entirely clear whether there's a "problem" with the dataframe or the font (and assuming I'm not the only person daft enough to wonder), is this the wrong choice of character and would some other symbol be more suitable?

An obvious suggestion is an ordinary question mark or exclamation mark. Unicode gives many possibilities - ⁈ (2048), β‰οΈŽ (2049). Or even the interrobang β€½ (203D). (A mixture of "where? and watch out!).

5Γ—3 DataFrame
β”‚ Row β”‚ i     β”‚ x       β”‚ y       β”‚
β”‚     β”‚ Int64 β”‚ Int64⁈  β”‚ String⁈ β”‚
β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1   β”‚ 1     β”‚ missing β”‚ missing β”‚
β”‚ 2   β”‚ 2     β”‚ 4       β”‚ missing β”‚
β”‚ 3   β”‚ 3     β”‚ missing β”‚ c       β”‚
β”‚ 4   β”‚ 4     β”‚ 2       β”‚ d       β”‚
β”‚ 5   β”‚ 5     β”‚ 1       β”‚ e       β”‚

These would presumably fall back to ? anyway... Just don't use emojis..🀣

decision non-breaking

Most helpful comment

I guess that could be part of a strategy to claim T? = Union{T, Missing}. :smiling_imp:

All 6 comments

It's not a problem, we use ⍰ to signify missingness. But I agree that it can confuse users who think there is a problem with their font, particularly in Windows where the terminal font isn't that great.

I don't like the idea of a ! because missingness shouldn't be considered a problem. But I agree we can consider another symbol. This is a non-breaking change so it can be considered after 1.0.

I would prefer to use ?. The major benefit is that some variable width fonts display ⍰ as a bit too wide.

The only reason why we did not go for it is that it was considered to use ? in a type signature in Base to signify an Union with Nothing.

However, if we consider this change as non-breaking πŸ˜„ (it seems the topic what is breaking recently became hot), then I would opt to switch to ? and just switch to something else if Base starts using ? for Union (looking at the PRs to Base it does not seem likely it will happen soon).

@nalimilan - any opinion on this?

I guess we could use ?. In the worst case it will eventually be used for Union{T, Nothing} and we'll have to change it. In the best case it will be used for Union{T, Missing} and everything will be fine.

OK. I will make a PR as it should be an easy fix :).

I’ve also been confused by this and think using a plain quotation mark would be better

I guess that could be part of a strategy to claim T? = Union{T, Missing}. :smiling_imp:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rofinn picture rofinn  Β·  3Comments

jangorecki picture jangorecki  Β·  7Comments

garborg picture garborg  Β·  8Comments

davidanthoff picture davidanthoff  Β·  4Comments

gustafsson picture gustafsson  Β·  6Comments