How can I solve error UndefVarError while I was using describe for DataFrames


I am trying to use describe() function for DataFrame like describe(data). But I am getting error “UndefVarError: describe not defined”. What is the reason? I am using Atom with julia version 1.1.0.
I am new to Julia, so can anyone help me to solve this error?


What is the result of running the following commands:

using Pkg

I am getting the results like this.

 [c52e3926] Atom v0.8.8
  [336ed68f] CSV v0.5.9
  [a93c6f00] DataFrames v0.19.1
  [31c24e10] Distributions v0.21.0
  [38e38edf] GLM v1.1.1
  [28b8d3ca] GR v0.38.1
  [c91e804a] Gadfly v1.0.1
  [09f84164] HypothesisTests v0.8.0
  [7073ff75] IJulia v1.18.1
  [e5e0dc1b] Juno v0.7.0
  [f0f68f2c] PlotlyJS v0.12.3
  [91a5bcdd] Plots v0.23.1
  [438e738f] PyCall v1.91.2
  [d330b81b] PyPlot v2.8.0
  [3646fa90] ScikitLearn v0.5.1
  [60ddc479] StatPlots v0.9.2
  [2913bbd2] StatsBase v0.31.0
  [f3b207a7] StatsPlots v0.10.2
  [fce5fe82] Turing v0.6.11
  [b8865327] UnicodePlots v1.1.0

Thanks and Regards,

So the problem is you did the following thing:

julia> using StatsBase

julia> using DataFrames

julia> describe
WARNING: both DataFrames and StatsBase export "describe"; uses of it in module Main must be qualified
ERROR: UndefVarError: describe not defined

(note the warning you get above an error)

The problem is that StatsBase.jl defines describe as well as DataFrames.jl. This is already fixed on StatsBase.jl master, but the release has not been tagged yet.

So in short - very soon it will be working again. For now you need to write DataFrames.describe(df) to disambiguate.

1 Like

@bkamins : thanks for your wonderful support