description |
---|
Check if all the value in a series is greater than a value |
danfo.Series.gt(other)
Parameters | Type | Description | Default |
---|---|---|---|
other | Series, Array or number | value(s) to compare |
Returns: Series (boolean element)
Example
Check if all the values in a series are greater than a value
{% tabs %} {% tab title="Node" %}
const dfd = require("danfojs-node")
let data1 = [10, 45, 56, 25, 23, 20, 10]
let sf1 = new dfd.Series(data1)
sf1.gt(20).print()
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="Output" %}
βββββ€ββββββββ
β 0 β false β
βββββΌββββββββ’
β 1 β true β
βββββΌββββββββ’
β 2 β true β
βββββΌββββββββ’
β 3 β true β
βββββΌββββββββ’
β 4 β true β
βββββΌββββββββ’
β 5 β false β
βββββΌββββββββ’
β 6 β false β
βββββ§ββββββββ
{% endtab %} {% endtabs %}
check if all the values in a series are greater than values in another series.
{% tabs %} {% tab title="Node" %}
const dfd = require("danfojs-node")
let data1 = [10, 45, 56, 25, 23, 20, 10]
let data2 = [10, 450, 56, 5, 25, 2, 0]
let sf1 = new dfd.Series(data1)
let sf2 = new dfd.Series(data2)
sf1.gt(sf2).print()
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="Output" %}
βββββ€ββββββββ
β 0 β false β
βββββΌββββββββ’
β 1 β false β
βββββΌββββββββ’
β 2 β false β
βββββΌββββββββ’
β 3 β true β
βββββΌββββββββ’
β 4 β false β
βββββΌββββββββ’
β 5 β true β
βββββΌββββββββ’
β 6 β true β
βββββ§ββββββββ
{% endtab %} {% endtabs %}