danfo.DataFrame.max(axis) [source]
Parameters | Type | Description | Default |
axis | Int | 0 for row and 1 for columns | 1 |
Returns:
return Series
const dfd = require("danfojs-node")data = [[11, 20, 3], [1, 15, 6], [2, 30, 40], [2, 89, 78]]cols = ["A", "B", "C"]df.print()let df = new dfd.DataFrame(data)df.max().print()
╔═══╤═══════════════════╤═══════════════════╤═══════════════════╗║ │ A │ B │ C ║╟───┼───────────────────┼───────────────────┼───────────────────╢║ 0 │ 11 │ 20 │ 3 ║╟───┼───────────────────┼───────────────────┼───────────────────╢║ 1 │ 1 │ 15 │ 6 ║╟───┼───────────────────┼───────────────────┼───────────────────╢║ 2 │ 2 │ 30 │ 40 ║╟───┼───────────────────┼───────────────────┼───────────────────╢║ 3 │ 2 │ 89 │ 78 ║╚═══╧═══════════════════╧═══════════════════╧═══════════════════╝╔═══╤══════════════════════╗║ │ 0 ║╟───┼──────────────────────╢║ A │ 11 ║╟───┼──────────────────────╢║ B │ 89 ║╟───┼──────────────────────╢║ C │ 78 ║╚═══╧══════════════════════╝
const dfd = require("danfojs-node")data = [[11, 20, 3], [1, 15, 6], [2, 30, 40], [2, 89, 78]]cols = ["A", "B", "C"]df.print()let df = new dfd.DataFrame(data)df.max(axis=0).print()
╔═══╤═══════════════════╤═══════════════════╤═══════════════════╗║ │ A │ B │ C ║╟───┼───────────────────┼───────────────────┼───────────────────╢║ 0 │ 11 │ 20 │ 3 ║╟───┼───────────────────┼───────────────────┼───────────────────╢║ 1 │ 1 │ 15 │ 6 ║╟───┼───────────────────┼───────────────────┼───────────────────╢║ 2 │ 2 │ 30 │ 40 ║╟───┼───────────────────┼───────────────────┼───────────────────╢║ 3 │ 2 │ 89 │ 78 ║╚═══╧═══════════════════╧═══════════════════╧═══════════════════╝╔═══╤══════════════════════╗║ │ 0 ║╟───┼──────────────────────╢║ 0 │ 20 ║╟───┼──────────────────────╢║ 1 │ 15 ║╟───┼──────────────────────╢║ 2 │ 40 ║╟───┼──────────────────────╢║ 3 │ 89 ║╚═══╧══════════════════════╝