# Nan Error in CSV

**URL:** <https://discourse.julialang.org/t/nan-error-in-csv/49197>\
**Category:** New to Julia\
**Tags:** question, function\
**Created:** [October 28, 2020, 6:24pm UTC](https://discourse.julialang.org/t/nan-error-in-csv/49197 "2020-10-28T18:24:20Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [October 28, 2020, 10:30pm UTC](https://discourse.julialang.org/t/nan-error-in-csv/49197/3 "2020-10-28T22:30:33Z")

</div>

`replace(x, NaN => 0)`, (or `replace!(x, NaN => 0)` if you want to do in-place replacement) should work in many circumstances. Can you post a minimum reproducible example where that does not work?

Please consider the following recommendations to post your example:

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

---

_[View the full topic](https://discourse.julialang.org/t/nan-error-in-csv/49197)._
