GeoEco.Datasets.Table.DeleteField

Table.DeleteField(name, failIfDoesNotExist=False)

Deletes a field from the table.

If the field cannot be deleted, an appropriate exception will be raised. This can happen for a variety of reasons, which may include:

  • The field does not exist.

  • The underlying storage format or programming library used to access it does not support the deletion of fields.

  • The table is not empty, and the format or library only allow fields to be deleted when it is empty.

  • The table is read-only, or the caller does not have sufficient privileges to delete fields.

Parameters:
  • name (str) –

    Name of the field to delete.

    The name must conform to all rules imposed by the underlying storage format and programming library used to access it. The caller is expected to be aware of these rules and this function attempts to fail if any rule is violated. Certain libraries are designed to automatically modify the caller’s illegal name to a legal name. Where possible, this function overrides that behavior and tries to fail anyway.

    This function treats names as case-insensitive, even if the underlying format and library support case-sensitive names. This behavior should be of little consequence to most callers. The only callers that will be affected are those who require the ability to have multiple fields with the same name but different case. That scenario is not supported, regardless of whether the format and library may support it, and the behavior of this function in that scenario is undefined.

    Minimum length꞉ 1.

  • failIfDoesNotExist (bool, optional) – If True and the field does not exist with the name requested by the caller, an exception will raised. If False and the field does not exist, this function will silently succeed.