Juliaデータ処理共通パッケージ_DataFramesパッケージテスト3_2020-02-20Th

24327 ワード

#Juliaデータ処理共通パッケージ_DataFramesパッケージテスト3_2020-02-20Th
#@前にDataFramesパッケージの特徴と関数機能を学び、テストしました.次に今回のテストに続きます:DataFramesパッケージを利用して読み取ります.csvファイルのデータ.

## 1.作成します。csvファイル

using DataFrames
using DelimitedFiles
using CSV
mycsv1 = open("mycsv_test.csv","w")

## 2.データの書き込み

data1 = rand(1:1000,10,8)
println(data1)
# [974 379 630 665 371 733 164 377; 590 992 342 44 736 781 310 940; 120 364 988 837 642 230 225 609; 301 985 681 985 479 500 733 898; 115 295
# 629 170 202 364 622 718; 900 426 601 47 986 133 673 521; 686 411 31 809 606 199 726 413; 98 114 481 423 557 217 224 537; 406 656 149 682 94
# 554 186 271; 397 128 767 474 912 994 560 736]
writedlm(mycsv1,data1,',')
close(mycsv1)
println(" csv , 10 8 。")

## 3.DataFramesパッケージでcsvデータを読み込む

df = readtable("mycsv_test.csv")
#@  , :
# julia> df = readtable("mycsv_test.csv")
# ┌ Warning: readtable is deprecated, use CSV.read from the CSV package instead
# │   caller = top-level scope at none:0
# └ @ Core none:0
# ERROR: Invalid UTF-8 string
# Stacktrace:
#  [1] utf8proc_error(::Int64) at .\strings\unicode.jl:142
#  [2] utf8proc_map(::String, ::Int64) at .\strings\unicode.jl:147
#  [3] #normalize#1 at .\strings\unicode.jl:197 [inlined]
#  [4] normalize at .\strings\unicode.jl:176 [inlined]
#  [5] #normalize#1 at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Unicode\src\Unicode.jl:56 [inlined]
#  [6] normalize at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Unicode\src\Unicode.jl:56 [inlined]
#  [7] identifier(::String) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:786
#  [8] parsenames!(::Array{Symbol,1}, ::Bool, ::Array{UInt8,1}, ::Array{Int64,1}, ::BitArray{1}, ::Int64, ::Bool) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:852
#  [9] readtable!(::DataFrames.ParsedCSV, ::IOStream, ::Int64, ::DataFrames.ParseOptions{String,String}) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:932
#  [10] #readtable#379(::Bool, ::Char, ::Array{Char,1}, ::Char, ::Array{String,1}, ::Array{String,1}, ::Array{String,1}, ::Bool, ::Int64, ::Array{Symbol,1}, ::Array{Any,1}, ::Bool, ::Char, ::Bool, ::Int64, ::Array{Int64,1}, ::Bool, ::Symbol, ::Bool, ::Bool, ::typeof(readtable), ::IOStream, ::Int64) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:1020
#  [11] (::getfield(DataFrames, Symbol("#kw##readtable")))(::NamedTuple{(:header, :separator, :quotemark, :decimal, :nastrings, :truestrings,
# :falsestrings, :makefactors, :nrows, :names, :eltypes, :allowcomments, :commentmark, :ignorepadding, :skipstart, :skiprows, :skipblanks, :encoding, :allowescapes, :normalizenames),Tuple{Bool,Char,Array{Char,1},Char,Array{String,1},Array{String,1},Array{String,1},Bool,Int64,Array{Symbol,1},Array{Any,1},Bool,Char,Bool,Int64,Array{Int64,1},Bool,Symbol,Bool,Bool}}, ::typeof(readtable), ::IOStream, ::Int64) at .
one:0 #  [12] (::getfield(DataFrames, Symbol("#_r#381")){Bool,Char,Array{Char,1},Char,Array{String,1},Array{String,1},Array{String,1},Bool,Int64,Array{Symbol,1},Array{Any,1},Bool,Char,Bool,Int64,Array{Int64,1},Bool,Symbol,Bool,Bool})(::IOStream) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:1102 #  [13] #open#312(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(open), ::getfield(DataFrames, Symbol("#_r#381")){Bool,Char,Array{Char,1},Char,Array{String,1},Array{String,1},Array{String,1},Bool,Int64,Array{Symbol,1},Array{Any,1},Bool,Char,Bool,Int64,Array{Int64,1},Bool,Symbol,Bool,Bool}, ::String, ::Vararg{String,N} where N) at .\iostream.jl:375 #  [14] open at .\iostream.jl:373 [inlined] #  [15] #readtable#380(::Bool, ::Char, ::Array{Char,1}, ::Char, ::Array{String,1}, ::Array{String,1}, ::Array{String,1}, ::Bool, ::Int64, ::Array{Symbol,1}, ::Array{Any,1}, ::Bool, ::Char, ::Bool, ::Int64, ::Array{Int64,1}, ::Bool, ::Symbol, ::Bool, ::Bool, ::typeof(readtable), ::String) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:1138 #  [16] readtable(::String) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:1099 #  [17] top-level scope at none:0

#@もう一度やってみよう
println(" mycsv_test.csv , :", readtable("mycsv_test.csv"))
#@  , readtable() 
# ┌ Warning: readtable is deprecated, use CSV.read from the CSV package instead
# │   caller = top-level scope at none:0
# └ @ Core none:0
# ERROR: Invalid UTF-8 string
# Stacktrace:
#  [1] utf8proc_error(::Int64) at .\strings\unicode.jl:142
#  [2] utf8proc_map(::String, ::Int64) at .\strings\unicode.jl:147
#  [3] #normalize#1 at .\strings\unicode.jl:197 [inlined]
#  [4] normalize at .\strings\unicode.jl:176 [inlined]
#  [5] #normalize#1 at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Unicode\src\Unicode.jl:56 [inlined]
#  [6] normalize at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Unicode\src\Unicode.jl:56 [inlined]
#  [7] identifier(::String) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:786
#  [8] parsenames!(::Array{Symbol,1}, ::Bool, ::Array{UInt8,1}, ::Array{Int64,1}, ::BitArray{1}, ::Int64, ::Bool) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:852
#  [9] readtable!(::DataFrames.ParsedCSV, ::IOStream, ::Int64, ::DataFrames.ParseOptions{String,String}) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:932
#  [10] #readtable#379(::Bool, ::Char, ::Array{Char,1}, ::Char, ::Array{String,1}, ::Array{String,1}, ::Array{String,1}, ::Bool, ::Int64, ::Array{Symbol,1}, ::Array{Any,1}, ::Bool, ::Char, ::Bool, ::Int64, ::Array{Int64,1}, ::Bool, ::Symbol, ::Bool, ::Bool, ::typeof(readtable), ::IOStream, ::Int64) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:1020
#  [11] (::getfield(DataFrames, Symbol("#kw##readtable")))(::NamedTuple{(:header, :separator, :quotemark, :decimal, :nastrings, :truestrings,
# :falsestrings, :makefactors, :nrows, :names, :eltypes, :allowcomments, :commentmark, :ignorepadding, :skipstart, :skiprows, :skipblanks, :encoding, :allowescapes, :normalizenames),Tuple{Bool,Char,Array{Char,1},Char,Array{String,1},Array{String,1},Array{String,1},Bool,Int64,Array{Symbol,1},Array{Any,1},Bool,Char,Bool,Int64,Array{Int64,1},Bool,Symbol,Bool,Bool}}, ::typeof(readtable), ::IOStream, ::Int64) at .
one:0 #  [12] (::getfield(DataFrames, Symbol("#_r#381")){Bool,Char,Array{Char,1},Char,Array{String,1},Array{String,1},Array{String,1},Bool,Int64,Array{Symbol,1},Array{Any,1},Bool,Char,Bool,Int64,Array{Int64,1},Bool,Symbol,Bool,Bool})(::IOStream) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:1102 #  [13] #open#312(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(open), ::getfield(DataFrames, Symbol("#_r#381")){Bool,Char,Array{Char,1},Char,Array{String,1},Array{String,1},Array{String,1},Bool,Int64,Array{Symbol,1},Array{Any,1},Bool,Char,Bool,Int64,Array{Int64,1},Bool,Symbol,Bool,Bool}, ::String, ::Vararg{String,N} where N) at .\iostream.jl:375 #  [14] open at .\iostream.jl:373 [inlined] #  [15] #readtable#380(::Bool, ::Char, ::Array{Char,1}, ::Char, ::Array{String,1}, ::Array{String,1}, ::Array{String,1}, ::Bool, ::Int64, ::Array{Symbol,1}, ::Array{Any,1}, ::Bool, ::Char, ::Bool, ::Int64, ::Array{Int64,1}, ::Bool, ::Symbol, ::Bool, ::Bool, ::typeof(readtable), ::String) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:1138 #  [16] readtable(::String) at C:\Users\lenovo\.juliapro\JuliaPro_v1.2.0-1\packages\DataFrames\yH0f6\src\deprecated.jl:1099 #  [17] top-level scope at none:0

#@CSVパッケージのread()関数でデータを読み込みます
df = read(mycsv1)
println(" mycsv_test.csv , :")
dfnew = DataFrame(df)
println(dfnew)

#@または一言で書く
println(" mycsv_test.csv , :", read("mycsv_test.csv"))
#@  :
#  mycsv_test.csv , :UInt8[0x16, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x02, 0x00, 0x00, 0x00, 0x00,
# 0x00, 0x00, 0xed, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0xe3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xab, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x01,
# 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
# 0xc7, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x02, 0x00, 0x00, 0x00, 0x00,
# 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x03, 0x00, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0xbb, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
# 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x00, 0x00,
# 0x00, 0x00, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x16, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x02, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xed, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35,
# 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xab, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
# 0x00, 0xb8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x03, 0x00, 0x00, 0x00,
# 0x00, 0x00, 0x00, 0x2b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x02, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce,
# 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
# 0x00, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00, 0x00,
# 0x00, 0x00, 0x00, 0xcd, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x16, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
# 0x36, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xed, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00,
# 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xab, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x02, 0x00, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
# 0x16, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x02, 0x00, 0x00, 0x00, 0x00,
# 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x03, 0x00, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0xa9, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00,
# 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
# 0xc4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x37, 0x39, 0x30, 0x2c, 0x31,
# 0x37, 0x37, 0x2c, 0x34, 0x30, 0x36, 0x2c, 0x35, 0x35, 0x35, 0x2c, 0x32, 0x30, 0x34, 0x2c, 0x33, 0x37, 0x34, 0x2c, 0x35, 0x32, 0x30, 0x2c, 0x33, 0x33, 0x36, 0x0a, 0x33, 0x30, 0x33, 0x2c, 0x35, 0x30, 0x34, 0x2c, 0x39, 0x35, 0x32, 0x2c, 0x37, 0x31, 0x31, 0x2c, 0x32, 0x32, 0x30, 0x2c, 0x35, 0x36, 0x37, 0x2c, 0x38, 0x31, 0x32, 0x2c, 0x32, 0x37, 0x37, 0x0a, 0x38, 0x32, 0x32, 0x2c, 0x35, 0x33, 0x2c, 0x33, 0x35, 0x31, 0x2c,
# 0x31, 0x34, 0x37, 0x2c, 0x35, 0x34, 0x31, 0x2c, 0x36, 0x31, 0x34, 0x2c, 0x32, 0x35, 0x33, 0x2c, 0x34, 0x35, 0x32, 0x0a, 0x36, 0x37, 0x36, 0x3, 0x2c, 0x36, 0x0a, 0x36, 0x38, 0x35, 0x2c, 0x34, 0x38, 0x33, 0x2c, 0x37, 0x32, 0x38, 0x2c, 0x31, 0x38, 0x32, 0x2c, 0x33, 0x39, 0x31, 0x2c, 0x38, 0x32, 0x33, 0x2c, 0x37, 0x35, 0x36, 0x2c, 0x36, 0x32, 0x34, 0x0a, 0x34, 0x39, 0x33, 0x2c, 0x36, 0x31, 0x2c, 0x32, 0x37, 0x39, 0x2c, 0x32, 0x33, 0x35, 0x2c, 0x35, 0x39, 0x34, 0x2c, 0x36, 0x38, 0x31, 0x2c, 0x39, 0x37, 0x33, 0x2c, 0x37, 0x30, 0x35, 0x0a, 0x39, 0x36, 0x38, 0x2c, 0x37, 0x34, 0x37, 0x2c, 0x31, 0x34, 0x2c, 0x37, 0x33, 0x37, 0x2c, 0x31, 0x36, 0x39, 0x2c, 0x38, 0x38, 0x34, 0x2c, 0x35, 0x37, 0x32, 0x2c, 0x35, 0x36, 0x36, 0x0a, 0x35, 0x30, 0x37, 0x2c, 0x39, 0x33, 0x39, 0x2c, 0x36, 0x39, 0x36, 0x2c, 0x37, 0x39, 0x30, 0x2c, 0x34, 0x36, 0x32, 0x2c, 0x31, 0x30, 0x32, 0x2c, 0x37, 0x30, 0x30, 0x2c, 0x37, 0x30, 0x37, 0x0a, 0x33, 0x33, 0x30, 0x2c, 0x39, 0x30, 0x31, 0x2c, 0x31, 0x35, 0x32, 0x2c, 0x37, 0x31, 0x36, 0x2c, 0x39, 0x34, 0x30, 0x2c, 0x36, 0x34, 0x38, 0x2c, 0x31, 0x37, 0x36, 0x2c, 0x36, 0x34, 0x31, 0x0a, 0x32, 0x32, 0x30, 0x2c, 0x37, 0x35, 0x38, 0x2c, 0x37, 0x39, 0x36, 0x2c, 0x36, 0x34, 0x35, 0x2c, 0x36, 0x39, 0x39, 0x2c, 0x32, 0x36, 0x33, 0x2c, 0x37, 0x33, 0x33, 0x2c, 0x39, 0x38, 0x30, 0x0a]

#@とにかく私たちが望んでいる結果ではありません

## 4.CSVパッケージでcsvファイルのデータを読み込む

using CSV
using DataFrames
mydata = CSV.read("mycsv_test.csv")
println(" read() csv :")
println(mydata)
#  read() csv :
# 9×8 DataFrame
# │ Row │ 331   │ 68    │ 875   │ 304   │ 578   │ 16    │ 436   │ 376   │
# │     │ Int64 │ Int64 │ Int64 │ Int64 │ Int64 │ Int64 │ Int64 │ Int64 │
# │ 1   │ 202   │ 514   │ 656   │ 268   │ 849   │ 651   │ 455   │ 77    │
# │ 2   │ 888   │ 882   │ 39    │ 237   │ 995   │ 955   │ 591   │ 836   │
# │ 3   │ 383   │ 942   │ 201   │ 747   │ 935   │ 262   │ 78    │ 157   │
# │ 4   │ 479   │ 301   │ 588   │ 828   │ 101   │ 989   │ 26    │ 857   │
# │ 5   │ 724   │ 738   │ 201   │ 750   │ 741   │ 80    │ 481   │ 184   │
# │ 6   │ 299   │ 180   │ 582   │ 298   │ 266   │ 991   │ 271   │ 604   │
# │ 7   │ 955   │ 285   │ 549   │ 76    │ 505   │ 68    │ 11    │ 242   │
# │ 8   │ 24    │ 962   │ 219   │ 342   │ 745   │ 910   │ 453   │ 193   │
# │ 9   │ 432   │ 522   │ 981   │ 248   │ 282   │ 734   │ 667   │ 892   │

#@もういいですが、この表には何か欠けているような気がします.はい、ヘッダーがなく、不完全な感じがします.そこで、次は表データにヘッダーを追加します.
mydata = CSV.read("mycsv_test.csv";header=[" "," "," "," "," "," "," "," "])
println(" , mydata :")
println(mydata)
# 10×8 DataFrame
# │ Row │   │   │   │   │   │   │   │   │
# │     │ Int64  │ Int64  │ Int64  │ Int64  │ Int64  │ Int64  │ Int64  │ Int64  │
# ├─────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
# │ 2   │ 202    │ 514    │ 656    │ 268    │ 849    │ 651    │ 455    │ 77     │
# │ 3   │ 888    │ 882    │ 39     │ 237    │ 995    │ 955    │ 591    │ 836    │
# │ 4   │ 383    │ 942    │ 201    │ 747    │ 935    │ 262    │ 78     │ 157    │
# │ 5   │ 479    │ 301    │ 588    │ 828    │ 101    │ 989    │ 26     │ 857    │
# │ 6   │ 724    │ 738    │ 201    │ 750    │ 741    │ 80     │ 481    │ 184    │
# │ 7   │ 299    │ 180    │ 582    │ 298    │ 266    │ 991    │ 271    │ 604    │
# │ 8   │ 955    │ 285    │ 549    │ 76     │ 505    │ 68     │ 11     │ 242    │
# │ 9   │ 24     │ 962    │ 219    │ 342    │ 745    │ 910    │ 453    │ 193    │
# │ 10  │ 432    │ 522    │ 981    │ 248    │ 282    │ 734    │ 667    │ 892    │

#@では、問題が来ました.行名をどのように修正しますか?みんなに解決を残す

## 5.さあ、今日はこれで


#@あなたの考えに注意してください.それはあなたの言語に影響を与えるからです.あなたの言語に注意してください.それはあなたの行為に影響を与えるからです.習慣に影響を与えるので、あなたの行為に注意してください.あなたの習慣に注意してください.それはあなたの運命に影響を与えるからです.