Skip to content

Commit

Permalink
return just one dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
garciampred committed Dec 30, 2024
1 parent 3ab0f89 commit 9e3c79a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cdsobs/ingestion/readers/netcdf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from pathlib import Path
from typing import Tuple

import pandas
import xarray
Expand All @@ -20,7 +19,7 @@ def read_flat_netcdfs(
source: str,
time_space_batch: TimeSpaceBatch,
input_dir: str,
) -> Tuple[pandas.DataFrame, pandas.Series]:
) -> pandas.DataFrame:
if time_space_batch.space_batch != "global":
logger.warning("This reader does not support subsetting in space.")
time_batch = time_space_batch.time_batch
Expand All @@ -30,7 +29,6 @@ def read_flat_netcdfs(
)
if netcdf_path.exists():
data = xarray.open_dataset(netcdf_path).to_pandas()
data_types = data.dtypes
else:
raise EmptyBatchException
return data, data_types # type: ignore
return data

0 comments on commit 9e3c79a

Please sign in to comment.