tabsdata.tableframe.selectors.decimal#
- decimal() SelectorProxy [source]#
Select all columns of decimal data type.
Example
>>> import tabsdata.tableframe as td_tf >>> from decimal import Decimal >>> >>> tf = td_tf.TableFrame({ ... "Price": [ ... Decimal("10.99"), Decimal("15.49"), Decimal("8.75"), ... Decimal("12.00"), Decimal("9.99"), Decimal("20.00"), ... Decimal("7.30"), Decimal("11.45") ... ], ... "Item": ["A", "B", "C", "D", "E", "F", "G", "H"] ... })
Original: ┌────────┬──────┐ │ Price ┆ Item │ │ — ┆ — │ │ dec ┆ str │ ╞════════╪══════╡ │ 10.99 ┆ “A” │ │ 15.49 ┆ “B” │ │ 8.75 ┆ “C” │ │ 12.00 ┆ “D” │ │ 9.99 ┆ “E” │ │ 20.00 ┆ “F” │ │ 7.30 ┆ “G” │ │ 11.45 ┆ “H” │ └────────┴──────┘
>>> tf.select(td_tf.selectors.decimal())
Selected: ┌────────┐ │ Price │ │ — │ │ dec │ ╞════════╡ │ 10.99 │ │ 15.49 │ │ 8.75 │ │ 12.00 │ │ 9.99 │ │ 20.00 │ │ 7.30 │ │ 11.45 │ └────────┘