M test/test_tsio.py +1 -1
@@ 534,7 534,7 @@ 2010-01-07 1.0
ts = tsh.get(engine, 'ts_through_time',
revision_date=datetime(2014, 1, 1, 18, 43, 23))
- assert ts is None
+ assert len(ts) == 0
# epilogue: back to the revdate issue
assert_df("""
M tshistory/tsio.py +6 -2
@@ 196,9 196,13 @@ class timeseries:
f'(from "{err}")'
)
- if current is not None and not _keep_nans:
- current.name = name
+ if current is None:
+ meta = self.metadata(cn, name)
+ return pd.Series(name=name, dtype=meta['value_type'])
+
+ if not _keep_nans:
current = current.dropna()
+ current.name = name
return current
@tx