Create a new table with the given name in where location. Parameters ---------- where : str or Group The parent group from which the new table will hang. It can be a path string (for example '/level1/leaf5'), or a Group instance (see :ref:
(
self,
where: Group | str,
name: str,
description: (
dict | type[IsDescription] | Description | npt.DTypeLike | None
) = None,
title: str = "",
filters: Filters | None = None,
expectedrows: int = 10_000,
chunkshape: int | tuple[int] | None = None,
byteorder: str | None = None,
createparents: bool = False,
obj: np.ndarray | None = None,
track_times: bool = True,
)
| 977 | return Group(parentnode, name, title=title, new=True, filters=filters) |
| 978 | |
| 979 | def create_table( |
| 980 | self, |
| 981 | where: Group | str, |
| 982 | name: str, |
| 983 | description: ( |
| 984 | dict | type[IsDescription] | Description | npt.DTypeLike | None |
| 985 | ) = None, |
| 986 | title: str = "", |
| 987 | filters: Filters | None = None, |
| 988 | expectedrows: int = 10_000, |
| 989 | chunkshape: int | tuple[int] | None = None, |
| 990 | byteorder: str | None = None, |
| 991 | createparents: bool = False, |
| 992 | obj: np.ndarray | None = None, |
| 993 | track_times: bool = True, |
| 994 | ) -> Table: |
| 995 | """Create a new table with the given name in where location. |
| 996 | |
| 997 | Parameters |
| 998 | ---------- |
| 999 | where : str or Group |
| 1000 | The parent group from which the new table will hang. It can be a |
| 1001 | path string (for example '/level1/leaf5'), or a Group instance |
| 1002 | (see :ref:`GroupClassDescr`). |
| 1003 | name : str |
| 1004 | The name of the new table. |
| 1005 | description : Description |
| 1006 | This is an object that describes the table, i.e. how |
| 1007 | many columns it has, their names, types, shapes, etc. It |
| 1008 | can be any of the following: |
| 1009 | |
| 1010 | * *A user-defined class*: This should inherit from the |
| 1011 | IsDescription class (see :ref:`IsDescriptionClassDescr`) |
| 1012 | where table fields are specified. |
| 1013 | * *A dictionary*: For example, when you do not know |
| 1014 | beforehand which structure your table will have). |
| 1015 | * *A Description instance*: You can use the description |
| 1016 | attribute of another table to create a new one with the |
| 1017 | same structure. |
| 1018 | * *A NumPy dtype*: A completely general structured NumPy |
| 1019 | dtype. |
| 1020 | * *A NumPy (structured) array instance*: The dtype of |
| 1021 | this structured array will be used as the description. |
| 1022 | Also, in case the array has actual data, it will be |
| 1023 | injected into the newly created table. |
| 1024 | |
| 1025 | .. versionchanged:: 3.0 |
| 1026 | The *description* parameter can be None (default) if *obj* is |
| 1027 | provided. In that case the structure of the table is deduced |
| 1028 | by *obj*. |
| 1029 | |
| 1030 | title : str |
| 1031 | A description for this node (it sets the TITLE HDF5 attribute |
| 1032 | on disk). |
| 1033 | filters : Filters |
| 1034 | An instance of the Filters class (see :ref:`FiltersClassDescr`) |
| 1035 | that provides information about the desired I/O filters to be |
| 1036 | applied during the life of this object. |
no test coverage detected