Skip to content
Snippets Groups Projects
Commit 90cfbea5 authored by BRONES Romain's avatar BRONES Romain
Browse files

Switch to pandas.Series output

parent cb518d6e
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ import logging ...@@ -5,6 +5,7 @@ import logging
import datetime import datetime
import numpy as np import numpy as np
import PyTango as tango import PyTango as tango
import pandas as pd
__version__ = "1.0.1" __version__ = "1.0.1"
...@@ -238,6 +239,7 @@ class ArchiveExtractor: ...@@ -238,6 +239,7 @@ class ArchiveExtractor:
return None return None
# Transform to datetime - value arrays # Transform to datetime - value arrays
# NOTE: it is faster than using pandas.to_datetime()
_value = np.asarray(_value, dtype=float) _value = np.asarray(_value, dtype=float)
if len(_date) > 0: if len(_date) > 0:
_date = ArrayTimeStampToDatetime(_date/1000.0) _date = ArrayTimeStampToDatetime(_date/1000.0)
...@@ -251,7 +253,7 @@ class ArchiveExtractor: ...@@ -251,7 +253,7 @@ class ArchiveExtractor:
self.logger.debug("Extraction done for %s."%attribute) self.logger.debug("Extraction done for %s."%attribute)
return [date, value] return pd.Series(index=date, data=value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment