Get a DataFrame of country codes and names.
Returns
pl.DataFrame
-
A DataFrame with country information.
Columns
The returned DataFrame contains the following columns:
country_code: ISO 3166-1 alpha-2 country code
- country: Country name
Examples
Get a list of all countries with weather stations:
import weathervault as wv
countries = wv.get_countries()
countries
shape: (251, 2)| country_code | country |
|---|
| str | str |
| "AF" | "Afghanistan" |
| "AL" | "Albania" |
| "DZ" | "Algeria" |
| "AS" | "American Samoa" |
| "AD" | "Andorra" |
| … | … |
| "WS" | "Western Samoa" |
| "YE" | "Yemen" |
| "CD" | "Zaire" |
| "ZM" | "Zambia" |
| "ZW" | "Zimbabwe" |