Comments (5)
🤦🏼♂️
I was going to write that I found a solution but it looks like I'm slightly too late.
Thanks for your answer.
mlr --icsv --ojson --flatsep : cat < mlr.bug.2.csv
[
{
"expt_name": "lr=1.0e-5_e=16/000",
"A": 40.93,
"B.last_checkpoint": 39.75,
"C.001": 44.05,
"C.001.last_checkpoint": 43.13
},
{
"expt_name": "lr=1.0e-5_e=16/001",
"A": 41.09,
"B.last_checkpoint": 41.11,
"C.001": 43.81,
"C.001.last_checkpoint": 43.82
},
{
"expt_name": "lr=1.0e-5_e=16/002",
"A": 40.84,
"B.last_checkpoint": 40.81,
"C.001": 43.87,
"C.001.last_checkpoint": 43.72
}
]
from miller.
Here's another example where we see the .
hierarchy shadowing substrings.
expt_name,A,B.last_checkpoint,C.001,C.001.last_checkpoint
lr=1.0e-5_e=16/000,40.93,39.75,44.05,43.13
lr=1.0e-5_e=16/001,41.09,41.11,43.81,43.82
lr=1.0e-5_e=16/002,40.84,40.81,43.87,43.72
mlr --icsv --ojson cat < mlr.bug.2.csv
[
{
"expt_name": "lr=1.0e-5_e=16/000",
"A": 40.93,
"B": {
"last_checkpoint": 39.75
},
"C": {
"001": {
"last_checkpoint": 43.13
}
}
},
{
"expt_name": "lr=1.0e-5_e=16/001",
"A": 41.09,
"B": {
"last_checkpoint": 41.11
},
"C": {
"001": {
"last_checkpoint": 43.82
}
}
},
{
"expt_name": "lr=1.0e-5_e=16/002",
"A": 40.84,
"B": {
"last_checkpoint": 40.81
},
"C": {
"001": {
"last_checkpoint": 43.72
}
}
}
]
from miller.
Please read this https://miller.readthedocs.io/en/6.11.0/reference-main-flag-list/index.html#flatten-unflatten-flags
The way to do it, is to use --no-auto-unflatten
flag. Running
mlr --c2j --no-auto-unflatten cat input.csv
you get
[
{
"expt_name": "lr=1.0e-5_e=16/000",
"baseline-final-test": 40.93,
"baseline-final-test.last_checkpoint": 39.75,
"stage-all.001": 44.05,
"stage-all.001.last_checkpoint": 43.13
},
{
"expt_name": "lr=1.0e-5_e=16/001",
"baseline-final-test": 41.09,
"baseline-final-test.last_checkpoint": 41.11,
"stage-all.001": 43.81,
"stage-all.001.last_checkpoint": 43.82
},
{
"expt_name": "lr=1.0e-5_e=16/002",
"baseline-final-test": 40.84,
"baseline-final-test.last_checkpoint": 40.81,
"stage-all.001": 43.87,
"stage-all.001.last_checkpoint": 43.72
}
]
from miller.
@SamuelLarkin what do you think about Miller? Have you been using it for a long time?
from miller.
Related Issues (20)
- system: not able to escape single quote HOT 12
- Add support for thousands separator in `fmtnum` HOT 2
- Question related to unsparsify HOT 6
- CSV header/data length mismatch 5 != 3 on row that does not exist HOT 2
- Is there a way to "sparsify" HOT 3
- [feature request] Split by file size
- Miller produces no output on TSV with > 64K characters per line HOT 11
- [feature request] Right-align numeric values in PPRINT and Markdown output formats
- Read performance can be improved for high-column-count data
- Investigate shutdown latency on `mlr head` HOT 2
- Cryptic fatal error message for nonexistent files since 6.9.0 HOT 2
- Investigate spurious `[]` on JSON output in some cases HOT 4
- `flatten` not working on csv input data
- Bash process substitution not working with `put -f`
- Miller's `strptime` accepts fewer format options than `strptime`
- Inconsistent result when using `$*`
- Double-width characters spoil column alignment HOT 4
- Add description for "put" verb HOT 1
- 'mlr cut' is very slow HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miller.