# Get index corresponding to some number in list of outputs

**URL:** <https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068>\
**Category:** General Usage\
**Tags:** indexing\
**Created:** [July 2, 2023, 4:23am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068 "2023-07-02T04:23:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 2, 2023, 4:23am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/1 "2023-07-02T04:23:06Z")

</div>

I want to get indices in _lines_ corresponding to A=0 in output. 🧐  
My goal is to get out the data between row index 14 and 23 of the _lines_ variable output in terms of variable _i_.

```julia
using HTTP , Gumbo , Cascadia, DataFrames,ParserCombinator, Profile
url="https://gcn.nasa.gov/circulars/33733"
r=HTTP.get(url)
h=parsehtml(String(r.body))
body=h.root[2]
Div=eachmatch(Selector(".text-pre-wrap.margin-top-2"), body)
Div[1]
txt=text(Div[1])

```

![image](https://global.discourse-cdn.com/julialang/original/3X/d/8/d80017d88e0b9c46a0d1438056e03d435b38a77f.png)

```julia
lines = split(txt, "\n")

```

28

```julia
length(lines)

```

13

```julia
for i in 1:length(lines)
	try
	    parse_one(lines[i], Equal("Filter")) == ["Filter"] || continue
	catch e
		if isa(e,ParserException)
		end
		else
		print(i)
	end
end

```

13

```julia
i=13

```

![image](https://global.discourse-cdn.com/julialang/original/3X/1/4/14f725482a60270ac823d29e52d1f51101cb6a60.jpeg)

```julia
for x in i:length(lines)
	@show A=ncodeunits(lines[x])
end

```

---

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [July 2, 2023, 7:05am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/2 "2023-07-02T07:05:08Z")

</div>

I don’t know if all the packages you invoked are needed. I’d do this (and I’m sure there are even more direct ways to get to the table you’re looking for):

```julia
using CSV, DataFrames
lines=split(String((HTTP.get(url))),'\n')

fl=findfirst(l->startswith(l,"Filter"),lines)

ll=findnext(==(""),lines,fl+2)-1

tbl=map(l->replace(l, " +/- "=>"+/-", "&gt;"=>'>'), lines[fl:ll])

data=join(tbl.*'\n')

df=CSV.read(IOBuffer(data), DataFrame, delim=' ', ignorerepeated=true)

julia> df=CSV.read(IOBuffer(data), DataFrame, delim=' ', ignorerepeated=true)  
8×5 DataFrame
 Row │ Filter T_start(s) T_stop(s) Exp(s) Mag
     │ String7 Int64 Int64 Int64 String15
─────┼──────────────────────────────────────────────────────
   1 │ white 113 271 147 20.19+/-0.24
   2 │ white 614 807 38 >19.8
   3 │ u 334 583 247 >19.9
   4 │ u 10511 11899 738 20.66+/-0.30
   5 │ b 589 783 39 >19.1
   6 │ uvw1 714 734 20 >17.6
   7 │ uvm2 688 708 20 >17.2
   8 │ uvw2 639 658 20 >19.6

```

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 2, 2023, 8:08am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/3 "2023-07-02T08:08:09Z")

</div>

You are wizard. 😇 How you got that level of understanding ? Please suggest some resources for me to study. Please also add HTTP package in your answer. Thank You.

---

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [July 2, 2023, 9:52am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/4 "2023-07-02T09:52:43Z")

</div>

Exaggerated: the real “wizards” in this forum are others.  
My sources are essentially this forum where I randomly follow some topics without any specific interest: just curiosity.  
I also bought some books but I’ve never read them (too lazy and unmotivated if I don’t have a specific problem to apply myself to I don’t study the theory).  
In this case I made several attempts before arriving at the script I posted. Since I’ve used CSV before, I tried to see if it was applicable in this case too.  
In fact, the published idea didn’t satisfy me because first it split the text into various lines and then it had to be rejoined for the part of the table.  
I now propose (I also add using HTTP) a different idea that avoids split() and join(). An even more elegant solution could make use of regular expressions to select the part of the text of interest.

```julia
using CSV, DataFrames, HTTP
url="https://gcn.nasa.gov/circulars/33733"
txt=String((HTTP.get(url)))

hb,he=findfirst("Filter",txt)
# _,fr=findnext("\n\n",txt,fe)
# lr,_=findnext("\n\n",txt,fr)
lr,_=findnext("\n\nThe",txt,he)

cltxt=replace(txt[hb:lr], " +/- "=>"+/-", "&gt;"=>'>')
julia> df=CSV.read(IOBuffer(cltxt), DataFrame, delim=' ', ignorerepeated=true)
8×5 DataFrame
 Row │ Filter T_start(s) T_stop(s) Exp(s) Mag
     │ String7 Int64 Int64 Int64 String15     
─────┼──────────────────────────────────────────────────────
   1 │ white 113 271 147 20.19+/-0.24
   2 │ white 614 807 38 >19.8
   3 │ u 334 583 247 >19.9
   4 │ u 10511 11899 738 20.66+/-0.30
   5 │ b 589 783 39 >19.1
   6 │ uvw1 714 734 20 >17.6
   7 │ uvm2 688 708 20 >17.2
   8 │ uvw2 639 658 20 >19.6

```

PS  
I take the opportunity to ask if in doing the split it was possible to keep the delimiter used to divide the various pieces.

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 6, 2023, 10:36am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/5 "2023-07-06T10:36:31Z")

</div>

For url= [GCN - Circulars - 34135: GRB 230628E: Swift/UVOT Detection](https://gcn.nasa.gov/circulars/34135) there is issue of space before (FC).

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/c/cc184dff39f6e8d8113debcedfb5ca5e89ae23b4.png)

How to overcome these issues ?

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [July 6, 2023, 10:41am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/6 "2023-07-06T10:41:11Z")

</div>

Without having Julia at hand at the moment: Try setting the delimiter to `delim=' '` _or_ replace all 4-spaces with a `,` and use the comma as delimiter.

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 6, 2023, 11:07am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/7 "2023-07-06T11:07:56Z")

</div>

I am already using delim=’ ’

```julia
df=CSV.read(IOBuffer(cltxt), DataFrame, delim=' ', ignorerepeated=true)

```

Is there any way to ignore things with ( ) so that (FC) can be removed ?

---

<div class="post-metadata">

**Author:** ![Dan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dan/32/42581_2.png) [@Dan](https://discourse.julialang.org/u/Dan)\
**Post date:** [July 6, 2023, 11:17am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/8 "2023-07-06T11:17:21Z")

</div>

The table in the URL in question has fixed column widths. Parsing using separators is less ideal than simply splitting each line at the correct positions.

Finding the correct column ranges for each field automatically is a little trickier. Perhaps the header line, sensing numeric columns could allow it to be done. Maybe regular expressions are the way to go.

If it is a single type of table to be parsed many times, just manually getting the column ranges once and hard-coding them might be a solution.

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [July 6, 2023, 11:22am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/9 "2023-07-06T11:22:37Z")

</div>

Ah that was a typo I meant `' '` (4 spaces) which might not work, since it seems to just be one character.

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 6, 2023, 11:35am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/10 "2023-07-06T11:35:17Z")

</div>

Not working anyway , you can try code given below 🙂

```julia
using CSV, DataFrames, HTTP
url="https://gcn.nasa.gov/circulars/34135"
txt=String((HTTP.get(url)))

hb,he=findfirst("Filter",txt)
lr,_=findnext("\n\nThe",txt,he)

cltxt=replace(txt[hb:lr], " +/- "=>"+/-", "&gt;"=>'>')
df=CSV.read(IOBuffer(cltxt), DataFrame, delim=' ', ignorerepeated=true)

```

Is there any way to ignore things with ( ) bracket so that (FC) can be removed ?

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [July 6, 2023, 11:54am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/11 "2023-07-06T11:54:47Z")

</div>

As I already said: the delimiter is a character so it will most probably not work and proposed to replace four spaces with a comma instead.  
Another approach is of course to use a regular expression to remove the brackets and their content, sure.

Otherwise try the approaches by Dan.

But – similar to previous questions you posted – repeating your question does not help.

---

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [July 6, 2023, 4:13pm UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/12 "2023-07-06T16:13:51Z")

</div>

```julia
cltxt=replace(txt[hb:lr], " +/- "=>"+/-", "&gt;"=>'>',r"(\.\d+) +"=>s"\1") # also suppress blanks after '.abc'

df=CSV.read(IOBuffer(cltxt), DataFrame, delim=" ", ignorerepeated=true) #delim has 2 blanks 

```

```julia

julia> cltxt=replace(txt[hb:lr], " +/- "=>"+/-", r" +(\w)"=>s"\t\1",r" +(&gt;)"=>s"\t>");

julia> df=CSV.read(IOBuffer(cltxt), DataFrame, delim='\t')
8×5 DataFrame
 Row │ Filter T_start(s) T_stop(s) Exp(s) Mag
     │ String15 Int64 Int64 Int64 String31
─────┼────────────────────────────────────────────────────────────────
   1 │ white (FC) 221 371 167 20.10+/-0.20
   2 │ wh 501 1194 223 20.69+/-0.34
   3 │ v 379 1243 68 >19.1
   4 │ b 477 1170 78 >19.9
   5 │ u 452 1145 78 >19.6
   6 │ w1 428 1120 78 >19.4
   7 │ m2 1249 1269 19 >18.2
   8 │ w2 700 720 19 >18.5

```

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 6, 2023, 4:34pm UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/13 "2023-07-06T16:34:17Z")

</div>

This is also working

```julia
cltxt=replace(txt[hb:lr], " +/- "=>"+/-", "&gt;"=>'>', "(FC)"=>"")

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/3/53c61e4abd1d2836d0eb423753bea923a817b511.png)

```julia
df=CSV.read(IOBuffer(cltxt), DataFrame, delim=" ", ignorerepeated=true)

```

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 6, 2023, 4:57pm UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/14 "2023-07-06T16:57:51Z")

</div>

Header are not shown properly although (FC) is printed from your code.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/2/b2cb1d2a4309505895f53d5cca2ce9a4324f86e2.png)

---

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [July 6, 2023, 8:25pm UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/15 "2023-07-06T20:25:08Z")

</div>

here the output of the two scripts. The second is able to correctly parse the number and string types

neither format the header wrong.

```julia
julia> cltxt=replace(txt[hb:lr], " +/- "=>"+/-", "&gt;"=>'>',r"(\.\d+) +"=>s"\1")
"Filter T_start(s) T_stop(s) Exp(s) Mag\n\nwhite (FC) 221 371 167 20.10+/- 0.20\nwh 501 1194 223 20.69+/- 0.34\nv 379 1243 68 >19.1\nb 477 1170 78 >19.9\nu 452 1145 78 >19.6\nw1              
   428 1120 78 >19.4\nm2 1249 1269 19 >18.2\nw2 700 720 19 >18.5\n"

julia> df=CSV.read(IOBuffer(cltxt), DataFrame, delim=" ", ignorerepeated=true)
8×5 DataFrame
 Row │ Filter T_start(s) T_stop(s) Exp(s) Mag
     │ String15 String7 String7 String3 String15
─────┼──────────────────────────────────────────────────────────────
   1 │ white (FC) 221 371 167 20.10+/- 0.20
   2 │ wh 501 1194 223 20.69+/- 0.34
   3 │ v 379 1243 68 >19.1
   4 │ b 477 1170 78 >19.9
   5 │ u 452 1145 78 >19.6
   6 │ w1 428 1120 78 >19.4
   7 │ m2 1249 1269 19 >18.2
   8 │ w2 700 720 19 >18.5

```

```julia
julia> cltxt=replace(txt[hb:lr], " +/- "=>"+/-", r" +(\w)"=>s"\t\1",r" +(&gt;)"=>s"\t>")
"Filter\tT_start(s)\tT_stop(s)\tExp(s)\tMag\n\nwhite (FC)\t221\t371\t167\t20.10+/-0.20\nwh\t501\t1194\t223\t20.69+/-0.34 \nv\t379\t1243\t68\t>19.1\nb\t477\t1170\t78\t>19.9\nu\t452\t1145\t78\t>19.6\nw1\t428\t1120\t78\t>19.4\nm2\t1249\t1269\t19\t>18.2\nw2\t700\t720\t19\t>18.5\n"

julia> df=CSV.read(IOBuffer(cltxt), DataFrame, delim='\t')
8×5 DataFrame
 Row │ Filter T_start(s) T_stop(s) Exp(s) Mag
     │ String15 Int64 Int64 Int64 String31
─────┼────────────────────────────────────────────────────────────────
   1 │ white (FC) 221 371 167 20.10+/-0.20
   2 │ wh 501 1194 223 20.69+/-0.34
   3 │ v 379 1243 68 >19.1
   4 │ b 477 1170 78 >19.9
   5 │ u 452 1145 78 >19.6
   6 │ w1 428 1120 78 >19.4
   7 │ m2 1249 1269 19 >18.2
   8 │ w2 700 720 19 >18.5

```

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 7, 2023, 9:45am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/16 "2023-07-07T09:45:36Z")

</div>

Please see my new post [Make function ignore Case-sensitivity of its input](https://discourse.julialang.org/t/make-function-ignore-case-sensitivity-of-its-input/101294) which is problem due to url=[GCN - Circulars - 34049: ZTF23aaoohpy (AT2023lcr/ATLAS23msn): Swift/UVOT detection](https://gcn.nasa.gov/circulars/34049?page=2)

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 8, 2023, 3:51am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/17 "2023-07-08T03:51:52Z")

</div>

This code is not working for url [GCN - Circulars - 34049: ZTF23aaoohpy (AT2023lcr/ATLAS23msn): Swift/UVOT detection](https://gcn.nasa.gov/circulars/34049?page=2) as it contains _filter_ word twice. How to overcome this issue also ?

```julia
using CSV, DataFrames, HTTP
url="https://gcn.nasa.gov/circulars/34049"
txt=String((HTTP.get(url)))
hb,he= findfirst(r"filter"i, txt)
lr,_=findnext("\n\nThe",txt,he)
cltxt=replace(txt[hb:lr], " +/- "=>"+/-", r" +(\w)"=>s"\t\1",r" +(&gt;)"=>s"\t>")
df=CSV.read(IOBuffer(cltxt), DataFrame, delim='\t')

```

---

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [July 8, 2023, 6:32am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/18 "2023-07-08T06:32:24Z")

</div>

I read, following the link suggested by @stevengj, that in addition to the ‘i’ flag there is the ‘m’ flag which enables the use of ‘^’ as a marker for the beginning of a line.  
In the case that you propose a difference between the two occurrences of ‘filter’ word it is precisely the fact that the ‘filter’ you are looking for is placed at the beginning of a line. There would also be the fact that after the ‘filter’ there is a space, but this difference is less “robust”, in my opinion.

```julia
hb,he=findfirst(r"^Filter"im,txt)

```

PS  
But seeing how the table is formatted, I believe you have many other problems to sort out.

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 8, 2023, 9:49am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/19 "2023-07-08T09:49:29Z")

</div>

Yes , There is issue due to "_Detection_ " word in [GCN - Circulars - 34049: ZTF23aaoohpy (AT2023lcr/ATLAS23msn): Swift/UVOT detection](https://gcn.nasa.gov/circulars/34049?page=2) .

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/1/e1d6216c502275f470572e6b16a642e00d323563.png)

Try this code given below:

```julia
using CSV, DataFrames, HTTP
url="https://gcn.nasa.gov/circulars/34049"
txt=String((HTTP.get(url)))
hb,he= findfirst(r"^filter"im, txt)
lr,_=findnext("\n\nThe",txt,he)
cltxt=replace(txt[hb:lr], " +/- "=>"+/-", r" +(\w)"=>s"\t\1",r" +(&gt;)"=>s"\t>")
df=CSV.read(IOBuffer(cltxt), DataFrame, delim='\t')

```

---

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [July 8, 2023, 6:10pm UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068/20 "2023-07-08T18:10:01Z")

</div>

Unless I misinterpret the table (view “.\raw”), there are several problems to deal with.  
One is the header of the fourth field which is on two lines; then there are the missing on lines 1,2 and 5…  
I don’t know if there is any package that has convenient methods for such cases

PS  
Notice that the dataframe has only one column. There is work to do to divide the various pieces.

```julia
julia> hb,he=findfirst(r"^Filter"im,txt)
10949:10954

julia> lr,_=findnext("\n\nThe",txt,he)
11391:11395

julia> cltxt=replace(txt[hb:lr], "&gt;"=>">")
"FILTER EXP(s) MAG Significance of Upper Limits (3o)\n Detection\nv 157                 
                     >19.6\nb 157 >20.6\nu 157 20.6 ± 0.5 2.1 sigma >20.1\nw1 315 20.4 ± 0.5 2.1 sigma >20.0\nm2 1489 20.8 ± 0.3 3.9 sigma\nw2 629 21.0 ± 0.4 2.5 sigma >20.7\n"

julia> df=CSV.read(IOBuffer(cltxt), DataFrame)
7×1 DataFrame
 Row │ FILTER EXP(s) MAG Significance of Upper Limits (3o) 
     │ String
─────┼───────────────────────────────────────────────────────────────────
   1 │ Detection
   2 │ v 157 >19.6
   3 │ b 157 >20.6
   4 │ u 157 20.6 ± 0.5 2.1 sigma >20.1
   5 │ w1 315 20.4 ± 0.5 2.1 sigma >20.0
   6 │ m2 1489 20.8 ± 0.3 3.9 sigma
   7 │ w2 629 21.0 ± 0.4 2.5 sigma >20.7

```

[Next page](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068.md?page=2)
