Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pony
tshistory
Commits
1bdc109715fc
Commit
27047c1e
authored
Jun 13, 2019
by
Aurélien Campéas
Browse files
series/meta: remove the unused `index_names` attribute
We can leave the old ones in place.
parent
318748138181
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
1bdc1097
...
...
@@ -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
...
...
test/test_tsio.py
View file @
1bdc1097
...
...
@@ -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'
}
...
...
tshistory/tsio.py
View file @
1bdc1097
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment