Skip to content

Commit 0d0f5dd

Browse files
committed
update dataframe
1 parent 2ff4a8e commit 0d0f5dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/output.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ JudiLing.save_L_matrix(L, joinpath(@__DIR__, "L.csv"))
383383
"""
384384
function save_L_matrix(L, filename)
385385

386-
L_df = convert(DataFrames.DataFrame, L.L)
386+
L_df = DataFrame(L.L)
387387
insertcols!(L_df, 1, :col_names => L.i2f)
388388
CSV.write(filename, L_df, quotestrings = true, header = false)
389389
nothing
@@ -436,7 +436,8 @@ JudiLing.save_S_matrix(S, joinpath(@__DIR__, "L.csv"), latin, :Word)
436436
```
437437
"""
438438
function save_S_matrix(S, filename, data, target_col; sep=" ")
439-
S_df = convert(DataFrames.DataFrame, S)
439+
440+
S_df = DataFrame(S)
440441
insertcols!(S_df, 1, :col_names => data[:,target_col])
441442
CSV.write(filename, S_df, quotestrings = true, header = false, delim=sep)
442443
nothing

0 commit comments

Comments
 (0)