I meet this problem When cleaning the raw data every time.
How can I agile to rename the key in the association?
assoc = Flatten[#] & /@
Transpose[{Range[10],
Transpose[{Table[{2019, 10}, {i, 1, 10}],
RandomChoice[Range[31], 10], Table[{0, 0, 0}, {i, 1, 10}]}],
RandomSample[Range[100], 10]}];
assoc = AssociationThread[{"id", "y", "m", "d", "h", "m", "s",
"Value"} -> #] & /@ assoc;
assoc[[All, "y"]] =
DateString@DateList[#] & /@
Values@Query[All, {"y", "m", "d", "h", "m", "s"}]@assoc;
assoc = KeyDrop[assoc, {"m", "d", "h", "m", "s"}]
I want to be able to rename Key [“y”] to Key [“date”].
How to do it?