Return the inferred column types in the DataFrame. This returns a Series with the data type of each column. The result’s index is the original DataFrame’s columns.
danfo.DataFrame.dtypes
Examples
Returns auto-generated index of a DataFrame
Node
Browser
1
const dfd =require("danfojs-node")
2
3
let data ={"A":[-20.1,30,47.3,-20],
4
"B":[34,-4,5,6],
5
"C":[20,-20,30,-40]}
6
7
let df =newdfd.DataFrame(data)
8
9
df.ctypes.print()
Copied!
1
Copied!
Output
1
╔═══╤══════════════════════╗
2
║ │ 0 ║
3
╟───┼──────────────────────╢
4
║ A │ float32 ║
5
╟───┼──────────────────────╢
6
║ B │ int32 ║
7
╟───┼──────────────────────╢
8
║ C │ int32 ║
9
╚═══╧══════════════════════╝
Copied!
Columns with mixed types are represented as string.