Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

In julia `tail(DataFrame)` show tail not defined

In julia tail(DataFrame) show tail not defined. Anyone can help ?

tail(DataFrame)

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The head and tail function have been removed a long time ago. You are looking for last(data, n) where n is the number of rows you want to display.

julia> using DataFrames

julia> df = DataFrame(rand(100, 3), :auto);

julia> last(df, 3)
3×3 DataFrame
 Row │ x1        x2        x3       
     │ Float64   Float64   Float64  
─────┼──────────────────────────────
   1 │ 0.26611   0.17931   0.242719
   2 │ 0.059735  0.108221  0.882079
   3 │ 0.779656  0.112243  0.314842

If you want to know more about this, here’s a post from Bogumil Kaminski who is one of the lead developers of DataFrames:

https://bkamins.github.io/julialang/2021/05/14/nrow.html

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading