Block Structures#
Block#
Constructor#
|
Single data block with a named Series and consistent index. |
Attributes and underlying data#
The name of the underlying Series. |
|
The underlying data, which must be numeric and non-NaN. |
|
Return the index of the underlying data. |
Conversion#
|
Create a copy of the structure. |
|
Return the underlying Series data. |
Get the underlying data as a NumPy array. |
|
Convert the Block to an xarray DataArray. |
Reindexing / selection / label manipulation#
|
Cross-select data based on index/column values. |
|
Return a new instance with data reindexed to the specified index and columns. |
|
Round float indices on the specified axis to given decimals. |
Serialization#
|
Load object from a pickle file. |
|
Save object to a pickle file. |
MatrixBlock#
Constructor#
|
Single 2D data block with row and column block names. |
Attributes and underlying data#
Name of the structure, used for error messages and block naming. |
|
The underlying data, which must be numeric and non-NaN. |
|
Name of the row block (e.g., 'state', 'obs'). |
|
Name of the column block (e.g., 'state', 'obs'). |
|
Return the index of the underlying data. |
|
Return the columns of the underlying DataFrame. |
|
Return the shape of the underlying data. |
|
Return values as numpy array or sparse matrix. |
Conversion#
|
Create a copy of the structure. |
|
Convert to DataFrame with optional block level. |
Get the underlying data as a NumPy array. |
Reindexing / selection / label manipulation#
|
Cross-select data based on index/column values. |
|
Return a new instance with data reindexed to the specified index and columns. |
|
Round float indices on the specified axis to given decimals. |
Serialization#
|
Load object from a pickle file. |
|
Save object to a pickle file. |
Sparse support#
True if the internal DataFrame uses pandas sparse storage. |
|
|
Return a copy with sparse internal storage. |
Return a copy with dense internal storage. |