So, what I'm trying to achieve is to collect some pandas functions in a dict object in which a key is a column name (string) and the value is a list (or any other collection) of functions. I then want to be able to dispatch those functions on a correlated column from a particular df.
I tried doing something like
dispatcher = {"ABC": pd.isnull}
but after trying to run the value of this key-value pair on a df I got AttributeError: 'Series' object has no attribute 'x'.
Is something like this achievable?
I also saw this thread but it didn't help as functions stored in there weren't used on a object (dataframe).
@EDIT: I'm looking for something that would allow me to store functions like that:
dispatcher = {
"ABC": [func1, func2, func3],
"DEF": [func4, func5]
}
and then, when working on some example_df, dispatch those functions on correlated columns. So it would cast functions like:
example_df["ABC"].func1()
example_df["ABC"].func2()
example_df["ABC"].func3()
example_df["DEF"].func4()
example_df["DEF"].func5()