# Force describe() not to omit columns

**URL:** <https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793>\
**Category:** Data\
**Created:** [August 20, 2018, 10:09pm UTC](https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793 "2018-08-20T22:09:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [August 20, 2018, 10:09pm UTC](https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793/1 "2018-08-20T22:09:03Z")

</div>

is it possible to force describe not to omit columns for printing?

---

<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:** [August 21, 2018, 3:56am UTC](https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793/2 "2018-08-21T03:56:54Z")

</div>

That currently isn’t possible, but the negative indexing is definitely on our radars. There has been discussion of implement something along the lines of `Not()`, `Between()` and regex matching from JuliaDB somewhere in DataFrames Ecosystem, which would make something like `describe(select(df, Not(:a))` very easy to do.

A workaround for now would be

```julia
df[setdiff(names(df), vars_i_dont_want)] |> describe

```

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [August 21, 2018, 5:52pm UTC](https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793/3 "2018-08-21T17:52:28Z")

</div>

Actually, I was unclear. I did not mean input but output columns. So I had meant output column suppression, not row suppression. I figured out that on linux, I can use `stty cols 180` to make sure this does not happen.

the setdiff was nice, though…

regards, /iaw

---

<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:** [August 21, 2018, 5:54pm UTC](https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793/4 "2018-08-21T17:54:44Z")

</div>

Could you provide an MWE of what you want? Are talking about describe with a DataFrame?

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [August 21, 2018, 6:01pm UTC](https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793/5 "2018-08-21T18:01:32Z")

</div>

yes, I was. unimportant for me now that I know how to fix it, but here is to explain what I mean:

```julia
julia> using DataFrames, Serialization; df= deserialize(open("sample-df.bin"));

julia> df
6×4 DataFrame
│ Row │ n1 │ n2 │ n3 │ n4 │
├─────┼────┼──────┼───────────┼─────┤
│ 1 │ 99 │ 9801 │ -0.999207 │ 'a' │
│ 2 │ 1 │ 1 │ 0.841471 │ 'b' │
│ 3 │ 3 │ 9 │ 0.14112 │ 'c' │
│ 4 │ 5 │ 25 │ -0.958924 │ 'd' │
│ 5 │ 7 │ 49 │ 0.656987 │ 'e' │
│ 6 │ 9 │ 81 │ 0.412118 │ 'f' │

julia> describe(df)
4×8 DataFrame
│ Row │ variable │ mean │ min │ median │ max │ nunique │ nmissing │ eltype │
├─────┼──────────┼───────────┼───────────┼──────────┼──────────┼─────────┼──────────┼─────────┤
│ 1 │ n1 │ 20.6667 │ 1 │ 6.0 │ 99 │ │ │ Int64 │
│ 2 │ n2 │ 1661.0 │ 1 │ 37.0 │ 9801 │ │ │ Int64 │
│ 3 │ n3 │ 0.0155942 │ -0.999207 │ 0.276619 │ 0.841471 │ │ │ Float64 │
│ 4 │ n4 │ │ 'a' │ │ 'f' │ 6 │ │ Char │

```

with stty cols 64:

```julia

julia> describe(df)
4×8 DataFrame. Omitted printing of 3 columns
│ Row │ variable │ mean │ min │ median │ max │
├─────┼──────────┼───────────┼───────────┼──────────┼──────────┤
│ 1 │ n1 │ 20.6667 │ 1 │ 6.0 │ 99 │
│ 2 │ n2 │ 1661.0 │ 1 │ 37.0 │ 9801 │
│ 3 │ n3 │ 0.0155942 │ -0.999207 │ 0.276619 │ 0.841471 │
│ 4 │ n4 │ │ 'a' │ │ 'f' │

```

---

<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:** [August 21, 2018, 6:02pm UTC](https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793/6 "2018-08-21T18:02:31Z")

</div>

read the docstring of `describe`, there is a `stats` keyword argument where you can specify which results you want.

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [August 21, 2018, 8:03pm UTC](https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793/7 "2018-08-21T20:03:18Z")

</div>

I think even specifying all (stats = [:mean, :min, :median, :max, :nmissing, :nunique, :eltype])), it still excludes columns if the terminal is not wide enough.

---

<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:** [August 21, 2018, 10:06pm UTC](https://discourse.julialang.org/t/force-describe-not-to-omit-columns/13793/8 "2018-08-21T22:06:42Z")

</div>

One of the benefits of the new `describe` function is that its just a dataframe, so any method that prints all columns of any dataframe will work.

[this](https://discourse.julialang.org/t/print-all-columns-of-a-dataframe/8520/5) might be a helpful link. I think `show(describe(df), true)` should work.

Though feel free to post an issue at DataFrames.
