Removes ignore fields from the data that we got from Solr.
2387
def _trim_fields(self, docs):
        '''
        
        '''
        for doc in docs:
            for field in self._ignore_fields:
                if field in doc:
                    del(doc[field])
        return docs
1374146
def _DataClean_(fieldVal):
    

    fieldValNew = fieldVal

    fieldValNew = fieldValNew.upper()

    fieldValNew = fieldValNew.strip()

    fieldValNew = re.sub("[\s\n\t]+", " ", fieldValNew)

    return fieldValNew
657143
function clean_fields( $fields )
	{
		// trim down the fields
		if( $fields )
		{
			foreach( $fields as $i => $field )
			{
				// unset unneccessary bits
				unset( $field['id'], $field['class'], $field['order_no'], $field['field_group'], $field['_name'] );
				
				
				// instructions
				if( !$field['instructions'] )
				{
					unset( $field['instructions'] );
				}
				
				
				// Required
				if( !$field['required'] )
				{
					unset( $field['required'] );
				}
				
				
				// conditional logic
				if( !$field['conditional_logic']['status'] )
				{
					unset( $field['conditional_logic'] );
				}
				
				
				// children
				if( isset($field['sub_fields']) )
				{
					$field['sub_fields'] = apply_filters('acf/export/clean_fields', $field['sub_fields']);
				}
				elseif( isset($field['layouts']) )
				{
					foreach( $field['layouts'] as $l => $layout )
					{
						$field['layouts'][ $l ]['sub_fields'] = apply_filters('acf/export/clean_fields', $layout['sub_fields']);
					}
				}

				
				// override field
				$fields[ $i ] = $field;
			}
		}
		
		return $fields;
	}
1268182
function removeBadFields(attrs){
	var badList = ['scores', 'table', 'headers'];
	for(var k in badList){
		if(attrs[badList[k]])
			delete attrs[badList[k]];
	}
}
1086864
def remove_fields(layer, fields_to_remove):
    
    index_to_remove = []
    data_provider = layer.dataProvider()

    for field in fields_to_remove:
        index = layer.fields().lookupField(field)
        if index != -1:
            index_to_remove.append(index)

    data_provider.deleteAttributes(index_to_remove)
    layer.updateFields()
1189532
def clear_cache_fields(self):
        ''''''
        for field in self._meta.scalarfields:
            if field.as_cache:
                setattr(self, field.name, None)
1193846
def clear(self):
        
        self._filters = []
        self._order_by = OrderedDict()
        self._selects = set()
        self._negation = False
        self._attribute = None
        self._chain = None
        self._search = None

        return self
1321433
def clear(self):
        '''
        
        '''
        self._data_fields = {}
        self._sub_reports = {}
        self.set_status(Report.FAILED if self._default_failed else Report.PASSED)
        self.add('name', self._name)
        self.add('sub_reports', [])
594487
private static Field[] removeMetaFields(Field[] fields) {
		Field[] realFields = new Field[fields.length - 1];
		//We'll delete at least one, sometimes more than one field (because there's at least the r$type field).
		int i = 0;
		for (Field field : fields) {
			if (!field.getName().startsWith(Constants.PREFIX)) {
				realFields[i++] = field;
			}
		}
		if (i < realFields.length) {
			realFields = Utils.arrayCopyOf(realFields, i);
		}
		if (GlobalConfiguration.assertsMode) {
			Utils.assertTrue(i == realFields.length, "Bug in removeMetaFields, created array of wrong length");
		}
		return realFields;
	}
1317164
protected void removeUnmappedFields(JdbcIndex<?> index) {
        Iterator<IndexField<?>> iterator = index.getFields().iterator();

        while (iterator.hasNext()) {
            IndexField<?> field = iterator.next();

            if (field.getMappedType() == null) {
                LOG.info("Removing {} from index {} - no mapped type information", field.getName(), index.getName());
                iterator.remove();
            }
        }

    }
163603
def _clean_fields(allowed_fields: dict, fields: FieldsParam) -> Iterable[str]:
    """"""
    if fields == ALL:
        fields = allowed_fields.keys()
    else:
        fields = tuple(fields)
        unknown_fields = set(fields) - allowed_fields.keys()
        if unknown_fields:
            raise ValueError('Unknown fields: {}'.format(unknown_fields))
    return fields
993288
def clean(docs=False, bytecode=False, extra=''):
    ''''''
    patterns = ['build', 'dist', 'cover', 'docs/_build', '**/*.pyc', '*.egg-info', '.tox', '**/__pycache__']
    for pattern in patterns:
        print('Removing {0}'.format(pattern))
        lrun('rm -rf {0}'.format(pattern))
315427
def _clean_schema_fields(self, fields):
        """"""
        fields_sorted = sorted(fields, key=lambda field: field["name"])
        # Ignore mode and description when comparing schemas.
        return [
            {"name": field["name"], "type": field["type"]}
            for field in fields_sorted
        ]
910327
def cleaniddfield(acomm):
    """"""
    for key in list(acomm.keys()):
        val = acomm[key]
        acomm[key.lower()] = val
    for key in list(acomm.keys()):
        val = acomm[key]
        if key != key.lower():
            acomm.pop(key)
    return acomm
118759
public void clearSavedFields() {
    append = null;
    tokenToName = new LinkedHashMap<String, Navigation>();
    nameToToken = new LinkedHashMap<String, Navigation>();
    remainingMappings = new ArrayList<Navigation>();
  }
970479
public void removeAll()
    {
        if (m_aRecords != null)
        {
            for (int iArrayIndex = 0; iArrayIndex < MAX_RECORD_ARRAY_SIZE; iArrayIndex++)
            {   // Free the objects that are no longer used
                this.freeElement(m_aRecords[iArrayIndex]);
                m_aRecords[iArrayIndex] = null;
            }
            m_aRecords = null;
        }
        m_iRecordListStep = 1;
        m_iRecordListEnd = 0;
        m_iRecordListMax = 0; // Current size of the record list (records scanned) (-1 - unknown)
    }
596497
def hide_defaults(self):
        """"""
        for k in list(self.fields.keys()):
            if k in self.default_fields:
                if self.default_fields[k] == self.fields[k]:
                    del(self.fields[k])
        self.payload.hide_defaults()