oplus/weather_data/weather_data.py
def get_bounds(self):
        """
        Returns
        -------
        (start, end)

        Datetime instants of beginning and end of data. If no data, will be: (None, None).
        """
        start, end = None, None
        if len(self._weather_series) == 0:
            return start, end

        for i in (0, -1):
            # create or find instant
            if self.has_tuple_instants:
                row = self._weather_series.iloc[i, :]
                instant = dt.datetime(row["year"], row["month"], row["day"], row["hour"], row["minute"])
            else:
                instant = self._weather_series.index[i].to_pydatetime()

            # store
            if i == 0:
                start = instant
            else:
                end = instant

        return start, end
def get_bounds(self):
        """
        Returns
        -------
        (start, end)

        Datetime instants of beginning and end of data. If no data, will be: (None, None).
        """
        start, end = None, None
        if len(self._weather_series) == 0:
            return start, end

        for i in (0, -1):
            # create or find instant
            if self.has_tuple_instants:
                row = self._weather_series.iloc[i, :]
                instant = dt.datetime(row["year"], row["month"], row["day"], row["hour"], row["minute"])
            else:
                instant = self._weather_series.index[i].to_pydatetime()

            # store
            if i == 0:
                start = instant
            else:
                end = instant

        return start, end
def get_bounds ( self ) : start , end = None , None if len ( self . _weather_series ) == 0 : return start , end for i in ( 0 , - 1 ) : # create or find instant if self . has_tuple_instants : row = self . _weather_series . iloc [ i , : ] instant = dt . datetime ( row [ "year" ] , row [ "month" ] , row [ "day" ] , row [ "hour" ] , row [ "minute" ] ) else : instant = self . _weather_series . index [ i ] . to_pydatetime ( ) # store if i == 0 : start = instant else : end = instant return start , end
Returns
        -------
        (start, end)

        Datetime instants of beginning and end of data. If no data, will be: (None, None).
Returns ------- ( start end )