BaseTabular Class#
This is the base class for tabular data structures in PyNeon, such as
pyneon.Events and pyneon.Stream. It is not intended to be
used directly, but provides common functionality for its subclasses.
- class pyneon.tabular.BaseTabular(data: DataFrame)#
Bases:
objectBase for tabular data classes like
pyneon.Eventsandpyneon.Stream.When initialized, performs the following checks and processing on the input data:
Ensures the data is not empty.
If present, checks that
recording idandsection idcolumns contain only a single unique value, and removes these columns.Identifies and handles duplicate columns by retaining only the first occurrence and issuing a warning.
Sets the data types of columns based on a predefined mapping. Columns not found in this mapping are left with their default data types, and a warning is issued.
- Parameters:
- datapandas.DataFrame
Raw data to be processed.
- Attributes:
- datapandas.DataFrame
The processed data.
Methods
copy()Create a deep copy of the instance.
- property shape: tuple[int, int]#
Return a tuple representing the shape of the data.
- Returns:
- tuple[int, int]
Shape of the data as (rows, columns).
- property columns: Index#
Return the column labels of the data.
- Returns:
- pd.Index
Column labels of the data.
- property dtypes: Series#
Return the data types of the columns in the data.
- Returns:
- pd.Series
Data types of the columns in the data.
- copy()#
Create a deep copy of the instance.