traffic/core/flight.py
def abs(self, features: Union[str, List[str]], **kwargs) -> "Flight":
        """Assign absolute versions of features to new columns.

        >>> flight.abs("track")

        The two following commands are equivalent:

        >>> flight.abs(["track", "heading"])
        >>> flight.abs(track="track_abs", heading="heading_abs")

        """
        assign_dict = dict()
        if isinstance(features, str):
            features = [features]
        if isinstance(features, Iterable):
            for feature in features:
                assign_dict[feature + "_abs"] = self.data[feature].abs()
        for key, value in kwargs.items():
            assign_dict[value] = self.data[key].abs()
        return self.assign(**assign_dict)
Assign absolute versions of features to new columns.

        >>> flight.abs("track")

        The two following commands are equivalent:

        >>> flight.abs(["track", "heading"])
        >>> flight.abs(track="track_abs", heading="heading_abs")

        
Assign absolute versions of features to new columns.

The two following commands are equivalent.


Assign absolute versions of features to new columns . The two following commands are equivalent .
def abs(self, features: Union[str, List[str]], **kwargs) -> "Flight":
        assign_dict = dict()
        if isinstance(features, str):
            features = [features]
        if isinstance(features, Iterable):
            for feature in features:
                assign_dict[feature + "_abs"] = self.data[feature].abs()
        for key, value in kwargs.items():
            assign_dict[value] = self.data[key].abs()
        return self.assign(**assign_dict)
def abs ( self , features : Union [ str , List [ str ] ] , ** kwargs ) -> "Flight" : assign_dict = dict ( ) if isinstance ( features , str ) : features = [ features ] if isinstance ( features , Iterable ) : for feature in features : assign_dict [ feature + "_abs" ] = self . data [ feature ] . abs ( ) for key , value in kwargs . items ( ) : assign_dict [ value ] = self . data [ key ] . abs ( ) return self . assign ( ** assign_dict )
Assign absolute versions of features to new columns.
Assign absolute versions of features to new columns .
"""Assign absolute versions of features to new columns.

        >>> flight.abs("track")

        The two following commands are equivalent:

        >>> flight.abs(["track", "heading"])
        >>> flight.abs(track="track_abs", heading="heading_abs")

        """
self
features
Union[str, List[str]]