# Is there a package to do DataFrames comparisons?

**URL:** https://discourse.julialang.org/t/is-there-a-package-to-do-dataframes-comparisons/65713
**Category:** General Usage
**Tags:** dataframes
**Created:** [August 3, 2021, 2:08am UTC](https://discourse.julialang.org/t/is-there-a-package-to-do-dataframes-comparisons/65713 "2021-08-03T02:08:10Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)
#### Post date: [August 3, 2021, 2:18pm UTC](https://discourse.julialang.org/t/is-there-a-package-to-do-dataframes-comparisons/65713/5 "2021-08-03T14:18:43Z")

</div>

It would be really nice if @ssfrr 's [DeepDiffs.jl](https://github.com/ssfrr/DeepDiffs.jl) directly supported Tables.  
(probably displaying via PrettyTables.jl)  
But it does not

it does however support vectors

So some demos

```julia
julia> using DataFrames, DeepDiffs

julia> costs = DataFrame(brand=["BurgerDuke", "BurgerDuke", "BurgerDuke", "McDannys", "McDan
       nys"], product = ["burger", "fries", "drink", "burger", "drink"], price=[10.0, 5.0, 1.0, 9.5
       , 0.5])
5×3 DataFrame
 Row │ brand product price   
     │ String String Float64 
─────┼──────────────────────────────
   1 │ BurgerDuke burger 10.0
   2 │ BurgerDuke fries 5.0
   3 │ BurgerDuke drink 1.0
   4 │ McDannys burger 9.5
   5 │ McDan\nnys drink 0.5

julia> costs2 = DataFrame(brand=["BurgerDuke", "BurgerDuke", "BurgerDuke", "McDannys", "McDan
       nys"], product = ["burger", "fries", "drink", "burger", "drink"], price=[10.0, 7.0, 1.0, 9.5
       , 0.5])
5×3 DataFrame
 Row │ brand product price   
     │ String String Float64 
─────┼──────────────────────────────
   1 │ BurgerDuke burger 10.0
   2 │ BurgerDuke fries 7.0
   3 │ BurgerDuke drink 1.0
   4 │ McDannys burger 9.5
   5 │ McDan\nnys drink 0.5

```

by row

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/7/7725353a3d88bc25eefec1c942a8f5f8be93ac17.png)  
by column  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/d/3d18fc9cdb641d57e76568a8c6391530d5fd42c3.png)

Perhaps best is to convert to dict:  
`as_dict(t) = getfield(Tables.dictcolumntable(t), :values)`

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/6/16fd872dd6f20f4c5f9c0265968f406b15910c38.png)

---

_[View the full topic](https://discourse.julialang.org/t/is-there-a-package-to-do-dataframes-comparisons/65713)._
