traffic/core/flight.py
def last(self, value: deltalike = None, **kwargs) -> Optional["Flight"]:
        """Returns the last n days, hours, minutes or seconds of the Flight.

        The elements passed as kwargs as passed as is to the datetime.timedelta
        constructor.

        Example usage:

        >>> flight.last(minutes=10)
        >>> flight.last("1H")
        >>> flight.last(10)  # seconds by default
        """
        delta = to_timedelta(value, **kwargs)
        bound = self.stop - delta  # noqa: F841 => used in the query
        # full call is necessary to keep @bound as a local variable
        df = self.data.query("timestamp > @bound")
        if df.shape[0] == 0:
            return None
        return self.__class__(df)
Returns the last n days, hours, minutes or seconds of the Flight.

        The elements passed as kwargs as passed as is to the datetime.timedelta
        constructor.

        Example usage:

        >>> flight.last(minutes=10)
        >>> flight.last("1H")
        >>> flight.last(10)  # seconds by default
        
Returns the last n days, hours, minutes or seconds of the Flight.
The elements passed as kwargs as passed as is to the datetime.timedelta
constructor.

Example usage.


Returns the last n days hours minutes or seconds of the Flight . The elements passed as kwargs as passed as is to the datetime . timedelta constructor . Example usage .
def last(self, value: deltalike = None, **kwargs) -> Optional["Flight"]:
        delta = to_timedelta(value, **kwargs)
        bound = self.stop - delta  
        df = self.data.query("timestamp > @bound")
        if df.shape[0] == 0:
            return None
        return self.__class__(df)
def last ( self , value : deltalike = None , ** kwargs ) -> Optional [ "Flight" ] : delta = to_timedelta ( value , ** kwargs ) bound = self . stop - delta df = self . data . query ( "timestamp > @bound" ) if df . shape [ 0 ] == 0 : return None return self . __class__ ( df )
Returns the last n days, hours, minutes or seconds of the Flight.
Returns the last n days hours minutes or seconds of the Flight .
"""Returns the last n days, hours, minutes or seconds of the Flight.

        The elements passed as kwargs as passed as is to the datetime.timedelta
        constructor.

        Example usage:

        >>> flight.last(minutes=10)
        >>> flight.last("1H")
        >>> flight.last(10)  # seconds by default
        """ # noqa: F841 => used in the query # full call is necessary to keep @bound as a local variable
self
value
deltalike