-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong parsing d3.tsvParse with only number header #77
Comments
samuelvaneck
changed the title
wrong parsing d3.tsvParse
wrong parsing d3.tsvParse with only number header
Aug 19, 2020
Sorry I can't reproduce the issue: https://observablehq.com/d/f47916b62d483682 |
I tried again. It fails the code in my local dev enviroment but success on the observerablehq.com website. Not sure why for now. I'll futher investigate the issue. |
It could be related to the fact that you can't use dot notation if an object key begins with a number:
|
Closing since we can’t reproduce. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have an issue with headers that contain only numbers. It's not being parsed correctly by
d3.tsvParse
. The header with the number has the values of the first column.The problem is with the last column
1234
E.g.
data string:
Distance_from_anode[nm] TAPC mCBP 4CzIPN-Me T2T 1234
70 0 0 0 0 0.000304539
71 0 0 0 0 0.000234767
72 0 0 0 0 0.00016237
is returns following incorrect result
index 70
4CzIPN-Me: 1e-99
1234: 70
Distance_from_anode[nm]: 1e-99
T2T: 0.000304539
TAPC: 1e-99
mCBP: 1e-99
index 71
4CzIPN-Me: 1e-99
1234: 71
Distance_from_anode[nm]: 1e-99
T2T: 0.000234767
TAPC: 1e-99
mCBP: 1e-99
index 72
4CzIPN-Me: 1e-99
1234: 72
Distance_from_anode[nm]: 1e-99
T2T: 0.00016237
TAPC: 1e-99
mCBP: 1e-99
Expected
index 70
4CzIPN-Me: 1e-99
1234: 0.000304539
Distance_from_anode[nm]: 70
T2T: 1e-99
TAPC: 1e-99
mCBP: 1e-99
index 71
4CzIPN-Me: 1e-99
1234: 0.000234767
Distance_from_anode[nm]: 71
T2T: 1e-99
TAPC: 1e-99
mCBP: 1e-99
index 72
4CzIPN-Me: 1e-99
1234: 0.00016237
Distance_from_anode[nm]: 72
T2T: 1e-99
TAPC: 1e-99
mCBP: 1e-99
I'm fixing if for now to check if the header has only number and adding an underscore in that's true.
The text was updated successfully, but these errors were encountered: