I'm importing a CSV file with two columns. I've done this with other files, but this one is causing issues when trying to create rules to associate IDs with the titles. Here's a sample of the contents of the CSV file. I tried the CharacterEncodings Unicode and UTF-8. With Unicode, I get a bunch of Chinese characters. Which is weird because another file worked with Unicode.
protein/ACCA0AVT1,"Ubiquitin-like modifier-activating enzyme 6 (human)"
protein/ACCA0R666,"HTH-type transcriptional regulator EthR (Mycolicibacterium smegmatis MC2 155)"
protein/ACCA0SYQ0,"Prostaglandin E synthase (dog)"
As you can see in the picture, when I display the rules in a table it looks fine. When I try to call one it throws an error about "mixture of lists and nonlists".
DeleteCases
orSelect
that will toss the ones that are right or show the ones that are wrong and then useInputForm
on the result to see exactly what all the characters including any quotes and spaces and control characters are? I am guessing the moment you see that you will realize what needs to be fixed. If it isn't easy to isolate the problem entries then perhaps keep hacking the size of the list in half until the problem goes away and then increase one at a time till you find a bad entry to see. $\endgroup$