0

I want to read a csv and return error if a kwyword , say 'xyz' exists in a column NAME? Below is my implementation .

Yaml -

ID:
  type: integer
  required: True
NAME:
  type: string
  required: False
MAIL:
  type: string
  required: False
  regex: '---'
month:
  type: string
  required: False

what condition should be added extra?

df_ = pd.read_csv(filename)        
    v = cerberus.Validator(schema)
    l_ = df_projection.to_dict(orient="records")        

    for record in l_:
        status = v.validate(record)
        if not status:
            logger.error("Validation Failed for {}".format(filename))    
            return status
    return status
davidism
  • 121,510
  • 29
  • 395
  • 339
Sss
  • 11
  • 2

0 Answers0