def blockchain_explorers(self): """Get list of URLs to blockchain explorers for given coin: Returns ------- pandas.DataFrame Metric, Value """ blockchain = self._get_links().get("blockchain_site") if blockchain: dct = filter_list(blockchain) df = pd.Series(dct).to_frame().reset_index() df.columns = ["Metric", "Value"] df["Metric"] = df["Metric"].apply( lambda x: replace_underscores_in_column_names(x) if isinstance(x, str) else x) return df[df["Value"].notna()] return None
def websites(self): """Get list of URLs to websites like homepage of coin, forum, Returns ------- pandas.DataFrame Metric, Value """ websites_dct = {} links = self._get_links() sites = ["homepage", "official_forum_url", "announcement_url"] for site in sites: websites_dct[site] = filter_list(links.get(site)) df = pd.Series(websites_dct).to_frame().reset_index() df.columns = ["Metric", "Value"] df["Value"] = df["Value"].apply(lambda x: ",".join(x)) df["Metric"] = df["Metric"].apply( lambda x: replace_underscores_in_column_names(x) if isinstance(x, str) else x) return df[df["Value"].notna()]