def _extract_series()

in src/lookoutequipment/plot.py [0:0]


    def _extract_series(self, tag_name):
        """
        This private method extracts the time series data for a given tag and
        make it available as ``pandas.DataFrame``. Each timeseries will consist
        on a single column DataFrame with a column name equal to the tag name
        and the timestamp column is used as the DateTimeIndex. Resampling and
        forward fill will also happen in this method.
        
        Parameters:
            tag_name (string):
                The name of the tag to extract
        """
        if self._format == 'timeseries':
            df = self._extract_series_timeseries(tag_name)
            
        elif self._format == 'tabular':
            df = self._extract_series_tabular(tag_name)
            
        df = self._preprocess_timeseries(df)
        self._signals_data.append(df)
        del df

        start_date = np.min(self._signals_data[-1].index)
        end_date = np.max(self._signals_data[-1].index)
        
        if self._start_date is None:
            self._start_date = start_date
        elif self._start_date > start_date:
            self._start_date = start_date
            
        if self._end_date is None:
            self._end_date = end_date
        elif self._end_date < end_date:
            self._end_date = end_date