# How to find min/max or Q1/median/Q3 in Julia

**URL:** https://discourse.julialang.org/t/how-to-find-min-max-or-q1-median-q3-in-julia/24573
**Category:** New to Julia
**Tags:** question
**Created:** [May 24, 2019, 2:28pm UTC](https://discourse.julialang.org/t/how-to-find-min-max-or-q1-median-q3-in-julia/24573 "2019-05-24T14:28:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Luigi\_Marongiu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luigi_marongiu/32/7909_2.png) [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)
#### Post date: [May 24, 2019, 2:28pm UTC](https://discourse.julialang.org/t/how-to-find-min-max-or-q1-median-q3-in-julia/24573/1 "2019-05-24T14:28:18Z")

</div>

Dear all,  
I have a dataframe and I can use describe to have an initial hint of the data. But to have more control, I would like to find these values one column at the time.  
So I can find the average of one column with `mean(df[:column])`.  
But if I do `min(df[:column])` I get the error `MethodError No method matching min`, but `using statistics` is loaded.  
And if I do `describe(df[:column], stats = :min)` I get an argument error.  
What is wrong?  
Can I apply these basic statistics to selected columns of a dataframe? Can I find a median or quartile/percentiles?  
Thank you

---

<div class="post-metadata">

### Author: ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)
#### Post date: [May 24, 2019, 2:36pm UTC](https://discourse.julialang.org/t/how-to-find-min-max-or-q1-median-q3-in-julia/24573/2 "2019-05-24T14:36:57Z")

</div>

You want `minimum(df[:column])`. Note that you can also do `df.column`. The `min` function is for returning the minimum of its arguments, for example `min(0,1,2) == 0`. For `describe`, the `stats` keyword argument is deprecated. Use regular arguments instead, for example `describe(df, :mean, :min)`.

Also note that you can view the documentation string for these functions directly in the REPL by typing e.g. `?describe`.

If you are not already aware of it, you may want to check out [StatsBase.jl](https://github.com/JuliaStats/StatsBase.jl).

---

<div class="post-metadata">

### Author: ![Luigi\_Marongiu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luigi_marongiu/32/7909_2.png) [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)
#### Post date: [May 24, 2019, 2:41pm UTC](https://discourse.julialang.org/t/how-to-find-min-max-or-q1-median-q3-in-julia/24573/3 "2019-05-24T14:41:08Z")

</div>

Thank you. I use REPL but I did not know about minimum. I’ll have a look at StatsBase.
