I know how to use GEE with JavaScript to import the shapefile, which is just uploading file to asset, then import it in JavaScript code, just like this:

var counties: Table user/wxystudio/cb_2016_us_county

It will be automatically transferred to a FeatureCollection object in GEE.

But how can I import this file as FeatureCollection in Python?

1 Answer 1


You can install the Earth Engine Python API using pip install earthengine-api

Once you install ee module, open your Jupyter Notebook and run these followinge codes to import the feature collection

import ee

# Trigger the authentication flow.

# Initialize the library.

feature_collection = ee.FeatureCollection('user/wxystudio/cb_2016_us_county')

If you don't want to install earth engine python api on your local machine, you can always try coding on Google Colab. The ee module is installed by default there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.