# How to get the values in NDSparse as a matrix

**URL:** <https://discourse.julialang.org/t/how-to-get-the-values-in-ndsparse-as-a-matrix/41762>\
**Category:** Data\
**Tags:** question\
**Created:** [June 20, 2020, 2:01am UTC](https://discourse.julialang.org/t/how-to-get-the-values-in-ndsparse-as-a-matrix/41762 "2020-06-20T02:01:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Stephen](https://discourse.julialang.org/u/Stephen)\
**Post date:** [June 20, 2020, 2:01am UTC](https://discourse.julialang.org/t/how-to-get-the-values-in-ndsparse-as-a-matrix/41762/1 "2020-06-20T02:01:07Z")

</div>

```julia
julia> Distance = loadndsparse("distance matrix.csv",indexcols = 1)       
1-d NDSparse with 5 values (12 field named tuples):
     │ BO BR CO HA MN NA NH NL PO PR SP WO
─────┼─────────────────────────────────────────────────────
"BO" │ 0 93 69 98 55 37 128 95 62 42 82 34
"NA" │ 37 65 33 103 20 0 137 113 48 72 79 41
"PR" │ 42 106 105 73 92 72 94 57 104 0 68 38
"SP" │ 82 59 101 27 93 79 63 57 127 68 0 47
"WO" │ 34 68 72 66 60 41 98 71 85 38 47 0

```

 ![Capture](https://global.discourse-cdn.com/julialang/original/3X/7/6/76e005bc92a09531b5cd0e8c5f15a73c2d2ea95c.png)

I want the data in a matrix. what syntax should I use?

Thanks
