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"]
.)
dat
after importing or share the text file? $\endgroup$dat[[1;;5]]
if your data is too large. You can tryfabri = dat[[All,1;;2]]
. $\endgroup$dat2=ImportString[dat, "Table"]
? $\endgroup$