Enhancing HeaderOptions.R(n) Behavior #64
Replies: 1 comment
-
My instinct, is that these two are related, and probably, rather complex. If there was some sort of spec, that set out how CSV headers should be dealt with and / or these issues interact, then there would seem to be an obvious direction of travel. I'm not aware of such a thing. Possibly, Pandas does something sensible and we could attempt to mimic it. But...
Again, I would agree that this is useful... But... I agree that these things are potential problems. However, I think they are future problems. I'm not sure that they deserve investigating further at the moment for these reasons;
Hence, my current proposal is to acknowledge these as problems, and move on. Question: In the context of this PR, #63 was the effort there wasted? I would reject the idea, that the effort there was wasted. Although we know we are (deliberately) leaving problems open, once merged, that PR will leave a good way, to configure and extent the treatment of headers in future, as we (hopefully) hit real world usecases. That is already a big improvement, on thhe previous status. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The current implementation of
HeaderOptions.R(n)
consolidates the firstn+1
lines of a CSV into a single-line header, joining fragments with spaces. For example,Name,Age\nFirst,Years
becomesList("Name First", "Age Years")
.While this provides a merged header, it introduces several challenges:
NamedTuple
for field access becomes cumbersome due to spaces and special characters in header names (e.g., `row.'Name First``). This hinders IDE autocompletion and feels unidiomatic in Scala.Name First
toName_First
) to improve usability and programmatic access?Beta Was this translation helpful? Give feedback.
All reactions