Is there a way to put a subscript / latex with sklearn's set_output API ? #1204
VincentRouvreau
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The original discussion
Originally posted by @DavidLapous in #1202 (comment)
Otherwise I think we should do this, even though it's a bit ugly
Is there a way to put a subscript / latex with sklearn's set_output API ? Otherwise I think we should do this, even though it's a bit ugly
Answer from @mglisse
)
https://stackoverflow.com/a/24392215/1918193 shows a way to turn 421 into ₄₂₁. This may be fine for printing, but if the user needs to recreate such a string to ask for "H₁₂", that's going to be way less convenient than "H12".
(since we technically compute cohomology, should it be "H^{i}"?
_Answer from @DavidLapous
If the user wants to change the default option, that's his problem, non ? + a little bit of llm, and he'll find the solution soon enough. I think "H₁" looks better for the default option.
Answer from @mglisse
I think the question is what those names are used for. From your comments, they seem to be there for pretty printing. My comment is because I thought they were mostly used as indexes, so you would write
result["H2"]to extract that part of the result (orresult["H"+str(i)]if this is in a loop). In that case, using obscure unicode characters makes the user's life harder.I don't have any experience with pandas, so let me ask @martinroyer what he thinks.
Answer from @martinroyer

@mglisse I think you are spot on, this allows to compute things like this:
where one potentially wants to access columns by key
f"H{i}", and I'd say it is good as it is for now.IRL
All reactions