description |
---|
Remove missing values from Series |
danfo.Series.dropNa(options) [source]
Parameters | Type | Description | Default |
---|---|---|---|
options | Object | inplace: Boolean indicating whether to perform the operation inplace or not. Defaults to false | { } |
{% tabs %} {% tab title="Node" %}
const dfd = require("danfojs-node")
let data1 = [10, 45, undefined, 10, 23, 20, null, 10]
let sf = new dfd.Series(data1)
let sf_rep = sf.dropNa()
sf_rep.print()
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="Output" %}
╔═══╤════╗
║ 0 │ 10 ║
╟───┼────╢
║ 1 │ 45 ║
╟───┼────╢
║ 3 │ 10 ║
╟───┼────╢
║ 4 │ 23 ║
╟───┼────╢
║ 5 │ 20 ║
╟───┼────╢
║ 7 │ 10 ║
╚═══╧════╝
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="Node" %}
const dfd = require("danfojs-node")
let data1 = [10, 45, undefined, 10, 23, 20, undefined, 10]
let sf = new dfd.Series(data1)
sf.dropNa({inplace:true})
sf.print()
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="Output" %}
╔═══╤════╗
║ 0 │ 10 ║
╟───┼────╢
║ 1 │ 45 ║
╟───┼────╢
║ 3 │ 10 ║
╟───┼────╢
║ 4 │ 23 ║
╟───┼────╢
║ 5 │ 20 ║
╟───┼────╢
║ 7 │ 10 ║
╚═══╧════╝
{% endtab %} {% endtabs %}