DataSearch.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:qtpandas 作者: draperjames 项目源码 文件源码
def indexSearch(self, indexes):
        """Filters the data by a list of indexes.

        Args:
            indexes (list of int): List of index numbers to return.

        Returns:
            list: A list containing all indexes with filtered data. Matches
            will be `True`, the remaining items will be `False`. If the
            dataFrame is empty, an empty list will be returned.

        """

        if not self._dataFrame.empty:
            filter0 = self._dataFrame.index == -9999
            for index in indexes:
                filter1 = self._dataFrame.index == index
                filter0 = np.logical_or(filter0, filter1)

            return filter0
        else:
            return []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号