Closed Abhisek1994Roy closed 3 years ago
I agree, this is a reasonable request. Unfortunately the underlying pandas function: Series.isin
doesn't support this. I suppose because it needs to work regardless of whether it's dealing with text or not.
That said, I could add a case insensitive flag that converts it to lowercase, converts the provided list to lowercase also, and then calls isin
. It would break if used on non-text data however.
Right @TMiguelT . It can be an optional flag, which would only work for a list of strings. Let me take a stab at it and give you a pull request.
@TMiguelT I cloned the code and realized that this flag is already there, and it works.
Column('InterestType', [InListValidation(['flat', 'reducing'], case_sensitive=False)]),
There is a case_sensitive flag, but I guess it needs to be added to the documentation.
Huh, there you go. Well this should be sorted once I get the documentation building automatically
Yep. Closing this.
Suppose I want to do a InListValidation and I have these two keys- ["paid", "unpaid"]. It would be great if we could ignore the case using a flag. Current options include-