Closed bleearmstrong closed 6 years ago
Added this manually to v0.3.1 due to conflicts with new code.
Apparently pandas now has a bunch of type inference functions in the api:
https://pandas.pydata.org/pandas-docs/stable/api.html#data-types-related-functionality
But I think this was introduced after v0.20 of pandas. I could bump up the requirement for pandas from i think 0.18 that i have it at now, then just create symbolic function versions of these inference methods. Or I could do it manually, but the pandas api functions are certainly going to be more reliable for that.
I'll think about it. I don't really see any issue bumping up the pandas requirement, but it might be annoying for some people.
Adds mutate_if() function. This might be a good place to add some helper functions that can represent common use cases that don't appear to be part of pandas, e.g. an 'is_numeric' function, 'is_character', etc.
Line 103 copies the dataframe, because the function calls an inplace operation. I wasn't sure if that was required or not. If not required, it should probably be removed.