pytemppack.py_pack.PyPack
- class PyPack(data)[source]
Bases:
objectPyPack object for transforming
np.ndarraytopd.DataFrame.This class contains methods to transform an
np.ndarraytopd.DataFrame.- results
A dataframe with the canonical inputs.
- Type
pd.DataFrame
Examples
>>> pypack = PyPack(data) >>> pypack.transform(columns)
Initialize with
np.ndarraydata.- Parameters
data (np.ndarray) – The data that has to be transformed into a
pd.DataFrame.- Raises
ValueError – If the data is not an
np.ndarray.
Methods
Transform the
datainto apd.DataFrame.Attributes
- transform_results(columns=None)[source]
Transform the
datainto apd.DataFrame.The
np.ndarraywill be transposed as the rows are considered to be columns, and vice versa.- Parameters
columns (Optional[List[str]]) – The column names that can be used in the
pd.DataFrame.- Return type
None
Note
The transformed
datais not returned but attributed toresults.