Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.51 KB

index.md

File metadata and controls

43 lines (32 loc) · 1.51 KB
layout title nav_order parent has_children
default
Pandas
50
API
true

Data Commons Pandas API

The Data Commons Pandas API is a superset of the Data Commons Python API: all functions from the Python API are also accessible from the Pandas API, and supplemental functions help with directly creating pandas{: target="_blank"} objects using data from the Data Commons knowledge graph for common use cases.

Note: The Pandas API only supports V1 of the REST APIs.

Before proceeding, make sure you have followed the setup instructions below.

Install the Python Data Commons API

  1. If not done already, install python3 and pip3. See Setting up a Python development environment{: target="_blank"} for procedures.
  2. Install the datacommons_pandas package:
$ pip install datacommons_pandas

You are ready to go! You can view our tutorials on how to use the API to perform certain tasks using Google Colab{: target="_blank"}, or refer to pages in the navigation bar for detailed information about all the methods available.

Run Python interactively

The pages in this site demonstrate running the Pandas methods interactively from the Bash shell. To use this facility, be sure to import the datacommons_pandas package:

From your virtual environment, run:

python3
>>> import datacommons_pandas
>>>