pgcom.commuter.Commuter.select_one

Commuter.select_one(cmd: Union[str, psycopg2.sql.Composed], values: Optional[Union[Sequence[Any], Mapping[str, Any]]] = None, default: Optional[Any] = None) Any[source]

Select the first element of returned DataFrame.

Parameters
  • cmd – string SQL query to be executed.

  • values – Parameters to pass to execute method.

  • default – If query result is empty, then return the default value.