def fillna(df, column: str, value=None,  column_value=None):
if column not in df.columns:<EOL><INDENT>df[column] = nan<EOL><DEDENT>if value is not None and column_value is not None:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if value is not None:<EOL><INDENT>df[column] = df[column].fillna(value)<EOL><DEDENT>if column_value is not None:<EOL><INDENT>if column_value not in df.columns:<EOL><INDENT>raise ValueError(f'<STR_LIT>')<EOL><DEDENT>df[column] = df[column].fillna(df[column_value])<EOL><DEDENT>return df<EOL>
Can fill NaN values from a column with a given value or a column

---

### Parameters

- `column` (*str*): name of column you want to fill
- `value`: NaN will be replaced by this value
- `column_value`: NaN will be replaced by value from this column

*NOTE*: You must set either the 'value' parameter or the 'column_value' parameter

---

### Example

**Input**

| variable |   wave  |  year    | my_value |
|:--------:|:-------:|:--------:|:--------:|
|   toto   |  wave 1 |  2014    |  300     |
|   toto   |  wave 1 |  2015    |          |
|   toto   |  wave 1 |  2016    |  450     |

```cson
fillna:
  column: 'my_value'
  value: 0
```

**Output**

| variable |   wave  |  year    | my_value |
|:--------:|:-------:|:--------:|:--------:|
|   toto   |  wave 1 |  2014    |  300     |
|   toto   |  wave 1 |  2015    |    0     |
|   toto   |  wave 1 |  2016    |  450     |