neptyne.data

def big_query(sql: str) -> pandas.core.frame.DataFrame:

Query the Google BigQuery database.

sql: the query to run

Example: =data.big_query("SELECT * FROM bigquery-public-data.covid19_open_data.covid19_open_data LIMIT 10")

def csv(url_or_str: str) -> pandas.core.frame.DataFrame:

Import a CSV file from the web.

Example: =data.csv("https://data.cityofnewyork.us/resource/erm2-nwe9.csv")

def geocode(address: str) -> tuple[float, float]:

Get the latitude and longitude of an address.

address: the address to geocode

Example: =data.geocode("1600 Amphitheatre Parkway, Mountain View, CA")

def geojson(url_or_str: str) -> pandas.core.frame.DataFrame:

Import a GeoJSON file from the web.

Example: =data.geojson("https://data.cityofnewyork.us/resource/erm2-nwe9.geojson")

def json(url_or_str: str) -> pandas.core.frame.DataFrame:

Import a JSON file from the web.

Example: =data.json("https://data.cityofnewyork.us/resource/erm2-nwe9.json")

def rss(url: str) -> pandas.core.frame.DataFrame:

Import an RSS feed from the web.

Example: =data.rss("https://www.reddit.com/r/Python/.rss")

def stock_lookup(symbols: str | list[str]) -> pandas.core.frame.DataFrame:

Lookup stock information for one or more stocks.

symbols: the stock symbols to lookup

Example: =data.stock_lookup("AAPL")

def web_table(url: str, idx=-1) -> pandas.core.frame.DataFrame:

Import a table from the web.

url: the url of the table idx: the index of the table on the page. Defaults to the largest table.

Example: =data.web_table("https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)")