Skip to content

Commit

Permalink
Example updated to show conversion to a Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
a2ray committed Apr 20, 2023
1 parent cfb4ffb commit c65368c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,15 @@ data = """

file = CSV.File(IOBuffer(data); header=false)
file = CSV.File(IOBuffer(data); header=false, delim=' ', types=Float64)

# as a last step if you want to convert this to a Matrix, this can be done by reading in first as a DataFrame and then
# function chaining to a Matrix
using DataFrames
A = file|>DataFrame|>Matrix
3×3 Matrix{Float64}:
1.0 0.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
```

## [Providing types](@id types_example)
Expand Down

0 comments on commit c65368c

Please sign in to comment.