# How to make a Table from Imported data?

I have imported into Mathematica notebook data from TXT file. I would like to make it as a Table afterwards, so I can do some calculations. I wrote:

I wrote:

dat = Import["PirmaisPikis.txt"]


It gives out:

1   7
2   7
3   2
4   2
5   2
6   3
7   2
8   3
9   2
10  2
11  3
12  2


If I write:

dat = Import["PirmaisPikis.txt"];
fabri = Table[{dat[[i, 1]], dat[[i, 2]]}, {i, 600}]


It gives me out ( and does it 3 times):

Part::partd: "Part specification" 1 7
2   7
3   2
4   2
5   2
6   3
7   2
8   3
9   2
10  2
11  3
12  2


Same thing If I write:

dat = Import["PirmaisPikis.txt"];
fabri = Table[{dat[[i, 1]], {i, 1, Length[dat]}]


If I write:

dat = Import["PirmaisPikis.txt"];
fabri = Table[{dat[[i, 1]], dat[[i,2]]}, {i, 1, Length[dat]}]


It gives me out nothing {} What is the problem?

(You can import with Import["https://pastebin.com/raw/w9ys8Rfd"].)

• Without access to PirmaisPikis.txt it is difficult to say. Can you show a small example of the dat after importing or share the text file? – Jack LaVigne Oct 26 '17 at 14:50
• We need to see the all of the curly brackets. Edit and add to the question, not the comment – Jack LaVigne Oct 26 '17 at 14:55
• You may also put the text file in a dropbox or pastebin for downloading. – Jack LaVigne Oct 26 '17 at 14:57
• Post the output of dat[[1;;5]] if your data is too large. You can try fabri = dat[[All,1;;2]]. – Sumit Oct 26 '17 at 14:58
• dat2=ImportString[dat, "Table"] ? – Ruud3.1415 Oct 26 '17 at 15:00

dat = ImportString[Import["pirmaispikis.txt"],

or import the file as a table by Import["pirmaispikis.txt","Table"]
fabri=dat;