# About examples in format validation from inmemorydatasets documents

**URL:** <https://discourse.julialang.org/t/about-examples-in-format-validation-from-inmemorydatasets-documents/86640>\
**Category:** Data\
**Tags:** question, inmemorydatasets\
**Created:** [September 1, 2022, 12:44pm UTC](https://discourse.julialang.org/t/about-examples-in-format-validation-from-inmemorydatasets-documents/86640 "2022-09-01T12:44:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshdfyehd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/akshdfyehd/32/39097_2.png) [@akshdfyehd](https://discourse.julialang.org/u/akshdfyehd)\
**Post date:** [September 1, 2022, 12:44pm UTC](https://discourse.julialang.org/t/about-examples-in-format-validation-from-inmemorydatasets-documents/86640/1 "2022-09-01T12:44:32Z")

</div>

Hi, I am relatively new to Julia, I can’t find the example for content inside red lines, can someone please make an example? How to show in Julia that changing the definition of the formats destroys the sorting order of the data set?

![image](https://global.discourse-cdn.com/julialang/original/3X/6/3/63a4b891b1bbc0e6e83fafa8db35a5c4bfce072d.png)  
Thanks for any help!!!

---

<div class="post-metadata">

**Author:** ![DataFrames](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@DataFrames](https://discourse.julialang.org/u/DataFrames)\
**Post date:** [September 13, 2022, 4:17am UTC](https://discourse.julialang.org/t/about-examples-in-format-validation-from-inmemorydatasets-documents/86640/2 "2022-09-13T04:17:16Z")

</div>

something like:

```julia
ds=Dataset(x=[1,10,2,5,3]);
fmt(x)=x==10
setformat!(ds,:x=>fmt);
groupby!(ds,:x,mapformats=true)

```

output:

```julia
5×1 Grouped Dataset with 2 groups
Grouped by: x
 Row │ x      
     │ fmt    
     │ Int64? 
─────┼────────
   1 │ false
   2 │ false
   3 │ false
   4 │ false
   5 │ true

```

now change the definition of `fmt`

```julia
fmt(x)=isodd(x)
ds

```

output:

```julia
5×1 Grouped Dataset with 2 groups
Grouped by: x
 Row │ x      
     │ fmt    
     │ Int64? 
─────┼────────
   1 │ true
   2 │ false
   3 │ true
   4 │ true
   5 │ false

```

ds’s destroyed. It is not sorted, but it says `5×1 Grouped Dataset with 2 groups Grouped by: x`
