Commit 27047c1e authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

series/meta: remove the unused `index_names` attribute

We can leave the old ones in place.
parent 318748138181
......@@ -189,7 +189,7 @@ You can see a series metadata:
```python
>>> tsh.metadata(engine, 'my_series')
{'tzaware': False, 'index_type': 'datetime64[ns]', 'value_type': 'float64',
'index_dtype': '<M8[ns]', 'index_names': [], 'value_dtype': '<f8'}
'index_dtype': '<M8[ns]', 'value_dtype': '<f8'}
```
We built a series with naive time stamps, but timezone-aware
......
......@@ -334,7 +334,6 @@ def test_serie_metadata(engine, tsh):
initialmeta = tsh.metadata(engine, 'ts-metadata')
assert initialmeta == {
'index_dtype': '<M8[ns]',
'index_names': [],
'index_type': 'datetime64[ns]',
'tzaware': False,
'value_dtype': '<f8',
......@@ -351,7 +350,6 @@ def test_serie_metadata(engine, tsh):
assert tsh.metadata(engine, 'ts-metadata') == {
'index_dtype': '<M8[ns]',
'index_names': [],
'index_type': 'datetime64[ns]',
'topic': 'banana spot price',
'tzaware': False,
......@@ -1081,7 +1079,6 @@ def test_serie_deletion(engine, tsh):
'index_type': 'datetime64[ns]',
'value_type': 'float64',
'index_dtype': '<M8[ns]',
'index_names': [],
'value_dtype': '<f8'
}
......@@ -1113,7 +1110,6 @@ def test_serie_deletion(engine, tsh):
'index_type': 'datetime64[ns, UTC]',
'value_type': 'float64',
'index_dtype': '|M8[ns]',
'index_names': [],
'value_dtype': '<f8'
}
......
......@@ -32,7 +32,6 @@ class timeseries(SeriesServices):
metakeys = {
'tzaware',
'index_type',
'index_names',
'index_dtype',
'value_dtype',
'value_type'
......@@ -662,11 +661,9 @@ class timeseries(SeriesServices):
def _series_initial_meta(self, cn, name, ts):
index = ts.index
inames = [name for name in index.names if name]
return {
'tzaware': tzaware_serie(ts),
'index_type': index.dtype.name,
'index_names': inames,
'index_dtype': index.dtype.str,
'value_dtype': ts.dtypes.str,
'value_type': ts.dtypes.name
......
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