traffic/core/flight.py
def at(self, time: Optional[timelike] = None) -> Optional[Position]:
        """Returns the position in the trajectory at a given timestamp.

        - ``time`` can be passed as a string, an epoch, a Python datetime, or
          a Pandas timestamp.

        - If no time is passed (default), the last know position is returned.
        - If no position is available at the given timestamp, None is returned.
          If you expect a position at any price, consider `Flight.resample
          <#traffic.core.Flight.resample>`_

        """

        if time is None:
            return Position(self.data.ffill().iloc[-1])

        index = to_datetime(time)
        df = self.data.set_index("timestamp")
        if index not in df.index:
            id_ = getattr(self, "flight_id", self.callsign)
            logging.warning(f"No index {index} for flight {id_}")
            return None
        return Position(df.loc[index])
Returns the position in the trajectory at a given timestamp.

        - ``time`` can be passed as a string, an epoch, a Python datetime, or
          a Pandas timestamp.

        - If no time is passed (default), the last know position is returned.
        - If no position is available at the given timestamp, None is returned.
          If you expect a position at any price, consider `Flight.resample
          <#traffic.core.Flight.resample>`_

        
Returns the position in the trajectory at a given timestamp.
``time`` can be passed as a string, an epoch, a Python datetime, or
a Pandas timestamp.

If no time is passed (default), the last know position is returned.
If no position is available at the given timestamp, None is returned.
If you expect a position at any price, consider `Flight.resample
<#traffic.core.Flight.resample>`_
Returns the position in the trajectory at a given timestamp . ` ` time ` ` can be passed as a string an epoch a Python datetime or a Pandas timestamp . If no time is passed ( default ) the last know position is returned . If no position is available at the given timestamp None is returned . If you expect a position at any price consider ` Flight . resample <#traffic . core . Flight . resample > ` _
def at(self, time: Optional[timelike] = None) -> Optional[Position]:
        if time is None:
            return Position(self.data.ffill().iloc[-1])
        index = to_datetime(time)
        df = self.data.set_index("timestamp")
        if index not in df.index:
            id_ = getattr(self, "flight_id", self.callsign)
            logging.warning(f"No index {index} for flight {id_}")
            return None
        return Position(df.loc[index])
def at ( self , time : Optional [ timelike ] = None ) -> Optional [ Position ] : if time is None : return Position ( self . data . ffill ( ) . iloc [ - 1 ] ) index = to_datetime ( time ) df = self . data . set_index ( "timestamp" ) if index not in df . index : id_ = getattr ( self , "flight_id" , self . callsign ) logging . warning ( f"No index {index} for flight {id_}" ) return None return Position ( df . loc [ index ] )
Returns the position in the trajectory at a given timestamp.
Returns the position in the trajectory at a given timestamp .
"""Returns the position in the trajectory at a given timestamp.

        - ``time`` can be passed as a string, an epoch, a Python datetime, or
          a Pandas timestamp.

        - If no time is passed (default), the last know position is returned.
        - If no position is available at the given timestamp, None is returned.
          If you expect a position at any price, consider `Flight.resample
          <#traffic.core.Flight.resample>`_

        """
self
time
Optional[timelike]