Skip to content

Instantly share code, notes, and snippets.

@UkiDLucas
Last active December 6, 2020 13:51
Show Gist options
  • Save UkiDLucas/1df28932efcaab9544fd72bd7d210a4f to your computer and use it in GitHub Desktop.
Save UkiDLucas/1df28932efcaab9544fd72bd7d210a4f to your computer and use it in GitHub Desktop.
Create DataFrame - Julia language

DataFrame in Julia is similar to Dict{String, Array}.

using DataFrames

df = DataFrame(
    Column1 = ["Value1","Value2","Value3" ], 
    Column2 = [ 1, 2, 3 ],
    Column3 = [ 1.0, 2.0, 3.0 ]
)
id Column1 Column2 Column3
String Int64 Float64
1 Value1 1 1.0.
2 Value2 2 2.0
3 Value3 3 3.0

max_Column2 = maximum( df.Column3[1:2] ) # get only elements from 1 to 2

output: 2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment