gpytorchwrapper.src.data.data_reader
Functions
|
Returns True if the file has a header and False if the file doesn't have one. |
Classes
Class for reading data from either a pickle or csv file. |
- class gpytorchwrapper.src.data.data_reader.DataReader[source]
Bases:
object
Class for reading data from either a pickle or csv file. The processed dataset must be a pandas DataFrame.
- read_data(file: str | Path, file_type: str) DataFrame [source]
- Parameters:
file (str or Path) – The path to the file to read.
file_type (str) – The type of file to read. Either ‘csv’ or ‘pickle’.
- Returns:
The data read from the file
- Return type:
pd.DataFrame
- Raises:
ImportError – If the file is not of the file type specified.
NotImplementedError – If the file type specified is not implemented or the processed dataset in the pickle file is not a pandas DataFrame.