Skip to content

Commit

Permalink
update reading a text matrix into a Matrix type
Browse files Browse the repository at this point in the history
Now also without using DataFrames
  • Loading branch information
a2ray committed Apr 20, 2023
1 parent c65368c commit 3c98f4f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,9 @@ file = CSV.File(IOBuffer(data); header=false, delim=' ', types=Float64)
# 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

# another alternative is to simply use CSV.Tables.matrix and say
B = file|>CSV.Tables.matrix # does not require DataFrames
```

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

0 comments on commit 3c98f4f

Please sign in to comment.