tabsdata.tableframe.selectors.integer#
- integer() SelectorProxy [source]#
Select all columns with integer data types.
Example
>>> import tabsdata.tableframe as td_tf >>> >>> tf = td_tf.TableFrame({ ... "Id": [1, 2, 3, 4, 5, 6, 7, 8], ... "Score": [91.0, 85.5, 88.0, 90.0, 87.0, 89.5, 84.0, 86.0], ... "Level": [3, 2, 1, 3, 2, 1, 3, 2], ... "Name": ["A", "B", "C", "D", "E", "F", "G", "H"] ... })
Original: ┌────┬───────┬───────┬──────┐ │ Id ┆ Score ┆ Level ┆ Name │ │ —┆ — ┆ — ┆ — │ │ i64┆ f64 ┆ i64 ┆ str │ ╞════╪═══════╪═══════╪══════╡ │ 1 ┆ 91.0 ┆ 3 ┆ “A” │ │ 2 ┆ 85.5 ┆ 2 ┆ “B” │ │ 3 ┆ 88.0 ┆ 1 ┆ “C” │ │ 4 ┆ 90.0 ┆ 3 ┆ “D” │ │ 5 ┆ 87.0 ┆ 2 ┆ “E” │ │ 6 ┆ 89.5 ┆ 1 ┆ “F” │ │ 7 ┆ 84.0 ┆ 3 ┆ “G” │ │ 8 ┆ 86.0 ┆ 2 ┆ “H” │ └────┴───────┴───────┴──────┘
>>> tf.select(td_tf.selectors.integer())
Selected: ┌────┬───────┐ │ Id ┆ Level │ │ —┆ — │ │ i64┆ i64 │ ╞════╪═══════╡ │ 1 ┆ 3 │ │ 2 ┆ 2 │ │ 3 ┆ 1 │ │ 4 ┆ 3 │ │ 5 ┆ 2 │ │ 6 ┆ 1 │ │ 7 ┆ 3 │ │ 8 ┆ 2 │ └────┴───────┘