ctdam.parser.bottlefile module¶
- class ctdam.parser.bottlefile.BottleFile(path_to_file, only_header=False)[source]¶
Bases:
DataFileClass that represents a Sea-Bird Bottle File (.btl) .
Organizes the files table information into a pandas dataframe. This allows the usage of this powerful library for statistics, visualization, data manipulation, export, etc.
- Parameters:
path_to_file (
Path|str) – The path to the .btl fileonly_header (
bool) – Whether to only check the header and not parse data
- create_dataframe()[source]¶
Creates a dataframe out of the .btl file.
Handles the double data header correctly.
- adding_timestamp_column()[source]¶
Creates a timestamp column that holds both, Date and Time information.
- selecting_rows(df=None, statistic_of_interest=['avg'])[source]¶
Creates a dataframe with the given row identifier, using the statistics column. A single string or a list of strings can be processed.
- Parameters:
df (pandas.Dataframe :) – the files Pandas representation (Default value = self.df)
statistic_of_interest (Union[list) – collection of values of the ‘statistics’ column in self.df (Default value = [‘avg’])
statistic_of_interest
str] – (Default value = [“avg”])