Value types¶
The names below appear in the annotations and in the descriptions of the parameters. numdaplot does not export them, so ndp.ScalarValue does not exist: a parameter of one of these types takes the value itself.
ScalarValue = bool | int | float | str | date | datetime | timedelta | time
Source¶
A single value: a boolean, a number, a text, a date, a datetime, a duration or a time of day.
It is a name used by the documentation and the annotations, not an object to create: pass the value itself,
such as True, 10, 2.5, "Paris", date(2026, 1, 31), datetime(2026, 1, 31, 14, 30) or
timedelta(days=1) or time(15, 35).
Added in version 0.1.0
Examples:
OrderedValue = int | float | str | date | datetime | timedelta | time
Source¶
A single value that can be ordered: a number, a text in alphabetical order, a date, a datetime, a duration or a time of day.
It is a name used by the documentation and the annotations, not an object to create: pass the value itself,
such as 10, 2.5, "Paris", date(2026, 1, 31), datetime(2026, 1, 31, 14, 30) or
timedelta(days=1) or time(15, 35).
Added in version 0.1.0
Examples:
ListValue = ScalarValue | None
Source¶
A single value of a list given to Array.from_list: a ScalarValue, or None for a missing value.
It is a name used by the documentation and the annotations, not an object to create: pass the value itself,
such as 10, "Paris" or None.
Added in version 0.1.0
Examples:
NestedValues = Sequence[ListValue] | Sequence[NestedValues]
Source¶
FilePath = str | Path
Source¶
The path of a file, as a text or a pathlib.Path.
It is a name used by the documentation and the annotations, not an object to create: pass the value itself,
such as "sales.csv" or Path("data/sales.csv").
Added in version 0.1.0
Examples:
from pathlib import Path
from tempfile import TemporaryDirectory
import numdaplot as ndp
cities = ndp.Array.from_list(["Paris", "Lyon"])
sales = ndp.Table.from_arrays({"city": cities})
with TemporaryDirectory() as folder:
sales.to_csv(Path(folder) / "sales.csv")
ndp.Table.from_csv(Path(folder) / "sales.csv").column("city").to_list()
# ['Paris', 'Lyon']