Returns the unique destination value(s) of the DataFrame.

        The destination airport is mostly represented as a ICAO or a IATA code.
13756
def destination(self) -> Optional[Union[str, Set[str]]]:
        
        if "destination" not in self.data.columns:
            return None
        tmp = set(self.data.destination)
        if len(tmp) == 1:
            return tmp.pop()
        logging.warn("Several destinations for one flight, consider splitting")
        return tmp
888408
def get_aircraft(self):
        """"""
        acs = self.acs
        icaos = list(acs.keys())
        for icao in icaos:
            if acs[icao]['lat'] is None:
                acs.pop(icao)
        return acs
745847
def is_icao_assigned(icao):
    

    if (icao is None) or (not isinstance(icao, str)) or (len(icao)!=6):
        return False

    icaoint = hex2int(icao)

    if 0x200000 < icaoint < 0x27FFFF: return False      # AFI
    if 0x280000 < icaoint < 0x28FFFF: return False      # SAM
    if 0x500000 < icaoint < 0x5FFFFF: return False      # EUR, NAT
    if 0x600000 < icaoint < 0x67FFFF: return False      # MID
    if 0x680000 < icaoint < 0x6F0000: return False      # ASIA
    if 0x900000 < icaoint < 0x9FFFFF: return False      # NAM, PAC
    if 0xB00000 < icaoint < 0xBFFFFF: return False      # CAR
    if 0xD00000 < icaoint < 0xDFFFFF: return False      # future
    if 0xF00000 < icaoint < 0xFFFFFF: return False      # future

    return True
998975
def unique_index(df):
    
    try:
        assert df.index.is_unique
    except AssertionError as e:
        e.args = df.index.get_duplicates()
        raise
    return df
1186451
def frame_unique(f):
        
        return f.f_code.co_filename, f.f_code.co_name, f.f_lineno
332176
def _get_values(self):
        
        (gi, _), (ci, _), (si, _) = self._get_dims(self.hmap.last)
        ndims = self.hmap.last.ndims
        dims = self.hmap.last.kdims
        dimensions = []
        values = {}
        for vidx, vtype in zip([gi, ci, si], self._dimensions):
            if vidx < ndims:
                dim = dims[vidx]
                dimensions.append(dim)
                vals = self.hmap.dimension_values(dim.name)
            else:
                dimensions.append(None)
                vals = [None]
            values[vtype] = list(unique_iterator(vals))
        return values, dimensions
1334841
def unique_combs(df):
    
    # List of unique values from every column
    lst = (x.unique() for x in (df[c] for c in df))
    rows = list(itertools.product(*lst))
    _df = pd.DataFrame(rows, columns=df.columns)

    # preserve the column dtypes
    for col in df:
        _df[col] = _df[col].astype(df[col].dtype, copy=False)
    return _df
683092
private Set getDestinationLocalitySet (BaseDestinationHandler destinationHandler, Capability capability)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getDestinationLocalitySet",
        new Object[]{destinationHandler, capability});
    
      // Check if the localisation should be deleted
      Set localitySet = null;

      //Get the locality sets as known by admin
      try
      {
          localitySet = _messageProcessor.getSIBDestinationLocalitySet(null, destinationHandler.getUuid().toString(), true);
      }
      catch(SIBExceptionBase e)
      {
        // FFDC
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.DestinationChangeListener.getDestinationLocalitySet",
          "1:368:1.45",
          this);
      }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getDestinationLocalitySet", localitySet);

    return localitySet;
  }
611692
def destinations(stop):
    """"""
    from pyruter.api import Departures

    async def get_destinations():
        """Get departure information."""
        async with aiohttp.ClientSession() as session:
            data = Departures(LOOP, stop, session=session)
            result = await data.get_final_destination()
            print(json.dumps(result, indent=4, sort_keys=True,
                             ensure_ascii=False))
    LOOP.run_until_complete(get_destinations())
719940
def path_get_destination(p: tcod.path.AStar) -> Tuple[int, int]:
    
    x = ffi.new("int *")
    y = ffi.new("int *")
    lib.TCOD_path_get_destination(p._path_c, x, y)
    return x[0], y[0]
184333
def icao(msg):
    

    DF = df(msg)

    if DF in (11, 17, 18):
        addr = msg[2:8]
    elif DF in (0, 4, 5, 16, 20, 21):
        c0 = bin2int(crc(msg, encode=True))
        c1 = hex2int(msg[-6:])
        addr = '%06X' % (c0 ^ c1)
    else:
        addr = None

    return addr
216893
def get_distinct_values_from_cols(self, l_col_list):
        
        uniq_vals = []
        for l_col_name in l_col_list:
            #print('col_name: ' + l_col_name)   
            uniq_vals.append(set(self.get_col_data_by_name(l_col_name)))
            #print(' unique values = ', uniq_vals)    
        
        #print(' unique values[0] = ', uniq_vals[0])
        #print(' unique values[1] = ', uniq_vals[1])
        if len(l_col_list) == 0:
            return []
        elif len(l_col_list) == 1:
            return sorted([v for v in uniq_vals])
        elif len(l_col_list) == 2:
            res = []
            res = [(a, b) for a in uniq_vals[0] for b in uniq_vals[1]]
            return res
        else:
            print ("TODO ")
            return -44
84631
def destination(self, name=""):
        
        if name:
            return self._session.put(
                self.__v2() + "/hoverfly/destination",
                data={"destination": name}).json()
        else:
            return self._session.get(
                self.__v2() + "/hoverfly/destination").json()
883148
def get_idxs(data, eid2idx):
    
    uniq, inv = numpy.unique(data['eid'], return_inverse=True)
    idxs = numpy.array([eid2idx[eid] for eid in uniq])[inv]
    return idxs
779631
def get_value(self, row, column):
        """"""
        # To increase the performance iat is used but that requires error
        # handling, so fallback uses iloc
        try:
            value = self.df.iat[row, column]
        except OutOfBoundsDatetime:
            value = self.df.iloc[:, column].astype(str).iat[row]
        except:
            value = self.df.iloc[row, column]
        return value
501770
def load_flights():
    """"""
    tbl_name = 'flights'
    data = get_example_data('flight_data.csv.gz', make_bytes=True)
    pdf = pd.read_csv(data, encoding='latin-1')

    # Loading airports info to join and get lat/long
    airports_bytes = get_example_data('airports.csv.gz', make_bytes=True)
    airports = pd.read_csv(airports_bytes, encoding='latin-1')
    airports = airports.set_index('IATA_CODE')

    pdf['ds'] = pdf.YEAR.map(str) + '-0' + pdf.MONTH.map(str) + '-0' + pdf.DAY.map(str)
    pdf.ds = pd.to_datetime(pdf.ds)
    del pdf['YEAR']
    del pdf['MONTH']
    del pdf['DAY']

    pdf = pdf.join(airports, on='ORIGIN_AIRPORT', rsuffix='_ORIG')
    pdf = pdf.join(airports, on='DESTINATION_AIRPORT', rsuffix='_DEST')
    pdf.to_sql(
        tbl_name,
        db.engine,
        if_exists='replace',
        chunksize=500,
        dtype={
            'ds': DateTime,
        },
        index=False)
    tbl = db.session.query(TBL).filter_by(table_name=tbl_name).first()
    if not tbl:
        tbl = TBL(table_name=tbl_name)
    tbl.description = 'Random set of flights in the US'
    tbl.database = utils.get_or_create_main_db()
    db.session.merge(tbl)
    db.session.commit()
    tbl.fetch_metadata()
    print('Done loading table!')
1290915
def var_to_df(self):
        
        ret = {}
        self._check_pd()

        if self._flags['address'] is False:
            return pd.DataFrame.from_dict(ret)

        ret.update({'name': self.name})
        ret.update({'idx': self.idx})

        for x in self._states:
            idx = self.__dict__[x]
            ret.update({x: self.system.dae.x[idx]})
        for y in self._algebs:
            idx = self.__dict__[y]
            ret.update({y: self.system.dae.y[idx]})

        var_df = pd.DataFrame.from_dict(ret).set_index('idx')

        return var_df