# Sort dataframe by column values

**URL:** <https://discourse.julialang.org/t/sort-dataframe-by-column-values/60318>\
**Category:** General Usage\
**Tags:** question, dataframes\
**Created:** [April 30, 2021, 2:12pm UTC](https://discourse.julialang.org/t/sort-dataframe-by-column-values/60318 "2021-04-30T14:12:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shazman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shazman/32/23093_2.png) [@Shazman](https://discourse.julialang.org/u/Shazman)\
**Post date:** [April 30, 2021, 2:12pm UTC](https://discourse.julialang.org/t/sort-dataframe-by-column-values/60318/1 "2021-04-30T14:12:21Z")

</div>

HI  
I want to sort the data `A` by column value in column `ID`.  
so the new data will have only one `ID` with `numbers` for each `ID`  
how can I do that?  
thank you in advance.

data `A`

> 27856×2 DataFrame  
> Row │ ID numbers  
> │ String Int64  
> ───────┼─────────────────  
> 1 │ 10041 14  
> 2 │ 10041 14  
> 3 │ 10041 14  
> 4 │ 10041 14  
> 5 │ 10041 14  
> 6 │ 10041 14  
> 7 │ 10041 14  
> 8 │ 10041 14  
> 9 │ 10041 14  
> 10 │ 10041 14  
> 11 │ 10041 14  
> 12 │ 10041 14  
> 13 │ 10041 14  
> ⋮ │ ⋮ ⋮  
> 27844 │ NULL 38  
> 27845 │ NULL 38  
> 27846 │ NULL 38  
> 27847 │ NULL 38  
> 27848 │ NULL 38  
> 27849 │ NULL 38  
> 27850 │ NULL 38  
> 27851 │ NULL 38  
> 27852 │ NULL 38  
> 27853 │ NULL 38  
> 27854 │ NULL 38  
> 27855 │ NULL 38  
> 27856 │ NULL 38  
> 27830 rows omitted

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [April 30, 2021, 2:20pm UTC](https://discourse.julialang.org/t/sort-dataframe-by-column-values/60318/2 "2021-04-30T14:20:17Z")

</div>

Check out the docs for [split-apply-combine](https://dataframes.juliadata.org/stable/man/split_apply_combine/) in DataFrames. You want `combine`.
