Utilities#
- ctdfjorder.utils.utils.get_cwd()[source]#
Gets the current working directory.
- Returns:
The current working directory.
- Return type:
str
- ctdfjorder.utils.utils.linear_regression_polars(x, y)[source]#
Performs linear regression using Polars columns. Returns the slope and intercept of the best-fit line.
- ctdfjorder.utils.utils.save_to_csv(data: DataFrame, output_file: str, null_value: str | None)[source]#
Renames the columns of the CTD data table based on a predefined mapping and saves the data to the specified CSV file.
- Parameters:
data (pl.DataFrame) – The CTD data table.
output_file (str) – The output CSV file path.
null_value (str) – The value that will fill blank cells in the data.