tabsdata.tableframe.selectors.numeric#
- numeric() SelectorProxy [source]#
Select all columns of numeric data types.
This includes integer and float columns of any size or signedness.
Example
>>> import tabsdata.tableframe as td_tf >>> >>> tf = td_tf.TableFrame({ ... "Id": [1, 2, 3, 4, 5, 6, 7, 8], ... "Score": [91.5, 85.0, 78.25, 88.75, 90.0, 76.5, 82.25, 89.0], ... "Name": ["Alice", "Bob", "Cara", "Dan", "Eve", "Finn", "Gus", "Hana"], ... "IsActive": [True, False, True, True, False, True, True, False] ... })
Original: ┌────┬────────┬────────┬──────────┐ │ Id ┆ Score ┆ Name ┆ IsActive │ │ —┆ — ┆ — ┆ — │ │ i64┆ f64 ┆ str ┆ bool │ ╞════╪════════╪════════╪══════════╡ │ 1 ┆ 91.5 ┆ “Alice”┆ true │ │ 2 ┆ 85.0 ┆ “Bob” ┆ false │ │ 3 ┆ 78.25 ┆ “Cara” ┆ true │ │ 4 ┆ 88.75 ┆ “Dan” ┆ true │ │ 5 ┆ 90.0 ┆ “Eve” ┆ false │ │ 6 ┆ 76.5 ┆ “Finn” ┆ true │ │ 7 ┆ 82.25 ┆ “Gus” ┆ true │ │ 8 ┆ 89.0 ┆ “Hana” ┆ false │ └────┴────────┴────────┴──────────┘
>>> tf.select(td_tf.selectors.numeric())
Selected: ┌────┬────────┐ │ Id ┆ Score │ │ —┆ — │ │ i64┆ f64 │ ╞════╪════════╡ │ 1 ┆ 91.5 │ │ 2 ┆ 85.0 │ │ 3 ┆ 78.25 │ │ 4 ┆ 88.75 │ │ 5 ┆ 90.0 │ │ 6 ┆ 76.5 │ │ 7 ┆ 82.25 │ │ 8 ┆ 89.0 │ └────┴────────┘