Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Import text file table with some blank entries' topicStudent Support Forum > General > "Import text file table with some blank entries"

Next Comment >Help | Reply To Topic
Author Comment/Response
molly
09/18/07 1:55pm

I'm trying to import data from a table in a text file (entries separated by several spaces), and it works fine to use Import["file","Table"] when all the columns have an entry, but this doesn't work when there are blank entries in the original table. The final row that is imported simply has too few entries, and I have no way of knowing which column was empty for that row. Is there some way importing the table that preserves the information about these spaces that are left blank in the original table?

For example, I want to import: "a b c/x z" as {{{a},{b},{c}},{{x},{},{z}}} instead of {{a,b,c},{x,z}}.

Thanks,
Molly

URL: ,

Subject (listing for 'Import text file table with some blank entries')
Author Date Posted
Import text file table with some blank entries molly 09/18/07 1:55pm
Re: Import text file table with some blank entr... Forum Modera... 09/18/07 5:17pm
Re: Re: Import text file table with some blank ... molly 09/19/07 09:20am
Next Comment >Help | Reply To Topic