code: def query(dataset_key, query, query_type='sql', profile='default',
            parameters=None, **kwargs):
      
      return _get_instance(profile, **kwargs).query(dataset_key, query,
                                                    query_type=query_type,
                                                    parameters=parameters,
                                                    **kwargs)
docs: Query an existing dataset
  
      :param dataset_key: Dataset identifier, in the form of owner/id or of a url
      :type dataset_key: str
      :param query: SQL or SPARQL query
      :type query: str
      :param query_type: The type of the query. Must be either 'sql' or 'sparql'.
          (Default value = 'sql')
      :type query_type: {'sql', 'sparql'}, optional
      :param parameters: parameters to the query - if SPARQL query, this should
          be a dict containing named parameters, if SQL query, then this should
          be a list containing positional parameters.  Boolean values will be
          converted to xsd:boolean, Integer values to xsd:integer, and other
          Numeric values to xsd:decimal. anything else is treated as a String
          literal (Default value = None)
      :type parameters: query parameters, optional
      :param profile: Configuration profile (account) to use.
          (Default value = 'default')
      :type profile: str, optional
      :returns: Object containing the results of the query
      :rtype: Results
      :raises RuntimeError: If a server error occurs
  
      Examples
      --------
      >>> import datadotworld as dw
      >>> results = dw.query(
      ...     'jonloyens/an-intro-to-dataworld-dataset',
      ...     'SELECT * FROM `DataDotWorldBBallStats`, `DataDotWorldBBallTeam` '
      ...     'WHERE DataDotWorldBBallTeam.Name = DataDotWorldBBallStats.Name')
      >>> df = results.dataframe
      >>> df.shape
      (8, 6)