PostgreSQL.get_column_info

PostgreSQL.get_column_info(table_name, schema_name=None, as_dict=True)[source]

Retrieve information about columns of a table.

Parameters:
  • table_name (str) – Name of the table.

  • schema_name (str | None) – Name of the schema; if schema_name=None (default), it defaults to DEFAULT_SCHEMA (i.e. 'public').

  • as_dict (bool) – Whether to return the column information as a dictionary; defaults to True.

Returns:

Information about all columns of the given table.

Return type:

pandas.DataFrame | dict

See also