How to use the investpy.data.stocks_data.stock_countries_as_list function in investpy

To help you get started, we’ve selected a few investpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alvarob96 / investpy / investpy / stocks.py View on Github external
This function returns a listing with all the available countries from where stocks can be retrieved, so to
    let the user know which of them are available, since the parameter country is mandatory in every stock retrieval
    function. Also, not just the available countries, but the required name is provided since Investing.com has a
    certain country name standard and countries should be specified the same way they are in Investing.com.

    Returns:
        :obj:`list` - countries:
            The resulting :obj:`list` contains all the available countries with stocks as indexed in Investing.com

    Raises:
        FileNotFoundError: raised if `stock_countries.csv` file was not found.
        IOError: raised when `stock_countries.csv` file is missing or empty.

    """

    return stock_countries_as_list()