Dataset Head

https://colab.research.google.com/assets/colab-badge.svg https://mybinder.org/badge_logo.svg

Returns top rows of a given dataset.


Parameters:
tableName: string

The name of table associated with the dataset. A full list of table names can be found in the Data Catalog or Datasets method.

rows: int, default: 5

Number of top rows to be returned (default 5).

Returns:

Pandas dataframe.


Example

Retrieves the top five rows of the Falkor 2018 cruise dataset.

#!pip install pycmap -q     #uncomment to install pycmap, if necessary

import pycmap

api = pycmap.API(token='<YOUR_API_KEY>')
api.head('tblFalkor_2018')
../../../../_images/sql.png

SQL Statement

Here is how to achieve the same results using a direct SQL statement. Please refer to Query for more information.

EXEC uspHead 'tableName', 'rows'

Example

Retrieves the top five rows of the Falkor 2018 cruise dataset.

EXEC uspHead 'tblFalkor_2018', '5'