First of all, I cannot think of a better title for this question.
I have a csv file, snippet, which is encoded in Japanese. I used the following code to import and it could correctly show the column head, at least, not some random characters.
I then wanted to do some calculation: col4-col2 (after convert them to
TimeObject), which I know is the ending and starting time of a travel. However, I do not know how to type in Japanese, which means I cannot type the "column_head" when write a
#head to do so. I then tried to extract the
Keys with the following code.
dataset[All, (Slot[Normal[dataset[1, Keys]][]] - Slot[Normal[dataset[1, Keys]][]]) &]
But it did not work and showed the following error message.
Function::slot: Slot[Normal[dataset[1,Keys]][]] (in Slot[Normal[dataset[1,Keys]][]]-Slot[Normal[dataset[1,Keys]][]]&) should contain a non-negative integer or string.
Could anyone please show me a way to implement this function either by using the
column head or
column number and also please show me why I have the above error? Thanks.