# Missing not defined

**URL:** <https://discourse.julialang.org/t/missing-not-defined/72267>\
**Category:** New to Julia\
**Created:** [November 30, 2021, 3:44am UTC](https://discourse.julialang.org/t/missing-not-defined/72267 "2021-11-30T03:44:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sransome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sransome/32/29810_2.png) [@sransome](https://discourse.julialang.org/u/sransome)\
**Post date:** [November 30, 2021, 3:44am UTC](https://discourse.julialang.org/t/missing-not-defined/72267/1 "2021-11-30T03:44:44Z")

</div>

Hi,

I have been using the following to replace missing values with zero but it’s now failing and I can’t see why.

`replace!(df.myfloat64field, missing => 0.0)`  
returns  
`ERROR: UndefVarError: missing not defined`

same problem when I try `df = DataFrame(A=2,B=missing)`

I’m using Julia 1.6.2 but I did try to upgrade to Julia 1.6.3 and 1.6.4 but the Language server gets stuck starting so I reverted. I have noticed strange problems in the past when I change versions. I tried adding Missings but no change. Do I need to do some sort of refresh or clearing of files when I change versions?

Thanks  
Steve

---

<div class="post-metadata">

**Author:** ![lawless-m](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lawless-m/32/30869_2.png) [@lawless-m](https://discourse.julialang.org/u/lawless-m)\
**Post date:** [November 30, 2021, 8:20am UTC](https://discourse.julialang.org/t/missing-not-defined/72267/2 "2021-11-30T08:20:41Z")

</div>

All I can help with is letting you know it is _supposed_ to work 🙂

```julia
Version 1.6.3 (2021-09-23)
 
julia> using DataFrames

julia> df = DataFrame([[1,missing,3], [10,20,30]], ["a", "b"])
3×2 DataFrame
 Row │ a b
     │ Int64? Int64?
─────┼─────────────────
   1 │ 1 10
   2 │ missing 20
   3 │ 3 30

julia> replace!(df.a, missing => 0.0)
3-element Vector{Union{Missing, Int64}}:
 1
 0
 3

```

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [November 30, 2021, 8:24am UTC](https://discourse.julialang.org/t/missing-not-defined/72267/3 "2021-11-30T08:24:11Z")

</div>

It may help to make the example more minimal. What happens if you restart Julia and just type

```julia
julia> missing

```

into the repl? And what is your full `versioninfo()` output? What if you type `Base.missing`?

---

<div class="post-metadata">

**Author:** ![sransome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sransome/32/29810_2.png) [@sransome](https://discourse.julialang.org/u/sransome)\
**Post date:** [November 30, 2021, 11:54pm UTC](https://discourse.julialang.org/t/missing-not-defined/72267/4 "2021-11-30T23:54:32Z")

</div>

> [@DNF](#):
>
> Base.missing

Thanks DNF,

I changed my code to include your suggestion:

```julia
println("Base.missing ",Base.missing)
println("Verion Info ",versioninfo())
replace!(df_Value.Quantity, missing => 0)

```

and when I run the file using ^ F5 the output is

```julia
Base.missing missing
ERROR: LoadError: UndefVarError: versioninfo not defined

```

But from the repl I get

```julia
julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_HOME = C:\JuliaPro-1.3.1-2\Julia-1.3.1\bin
  JULIA_EDITOR = code
  JULIA_NUM_THREADS =

julia> Base.missing
missing

```

Thanks  
Steve

---

<div class="post-metadata">

**Author:** ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)\
**Post date:** [December 1, 2021, 9:11pm UTC](https://discourse.julialang.org/t/missing-not-defined/72267/5 "2021-12-01T21:11:10Z")

</div>

Something seems to be seriously broken in your install: your Julia 1.6 uses ` JULIA_HOME = C:\JuliaPro-1.3.1-2\Julia-1.3.1\bin`. I suggest removing that old JuliaPro version and reinstalling Julia from scratch.

---

<div class="post-metadata">

**Author:** ![sransome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sransome/32/29810_2.png) [@sransome](https://discourse.julialang.org/u/sransome)\
**Post date:** [December 2, 2021, 3:49am UTC](https://discourse.julialang.org/t/missing-not-defined/72267/6 "2021-12-02T03:49:34Z")

</div>

Thanks, juliapro was previously removed but I uninstalled everything including the vscode extension and the Julia updater from the Microsoft store and re-installed 1.7.0 via direct download and it works as expected now. All versions after 1.6.2 were also failing to start the language server and that problem is also fixed. Thanks for your help.
