Commit bb64fd26 authored by PIOLLE's avatar PIOLLE
Browse files

fixed extract for empty field list

parent c5fa3062
...@@ -1484,13 +1484,17 @@ class Dataset(ABC): ...@@ -1484,13 +1484,17 @@ class Dataset(ABC):
subset. subset.
""" """
if isinstance(self.dataset, Dataset): if isinstance(self.dataset, Dataset):
return self.dataset.extract( return self.dataset.extract(
index=index, fields=fields, padding=padding, index=index, fields=fields, padding=padding,
prefix=prefix, deep=deep, **kwargs prefix=prefix, deep=deep, **kwargs)
if fields is None: if fields is None:
fields = self._varnames fields = self._varnames
# remove possible duplicates
fields = list(set(fields))
if index is None: if index is None:
subset = self.dataset[fields] subset = self.dataset[fields]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment