I want to be able to call given python functions from java, pass it arguments and obtain return value. I want this to happen very transparently, without requiring to modify py file or java code. I considered many possible options. I asked elaborate questions on stackoverflow: 1,2.
However I dont think none of the ready made solution can handle pandas series, dataframe. So I resorted to doing serialize and deserialize the parameters.
I am able to do basic serialization. For example I can serialize standalone objects like int, string, tuple, list, dict (with simplejson.dumps()), pandas series, pandas dataframe (with series.to_json and dataframe.to_json). However, when pandas series, dataframes gets arbitrarily encapsulated inside any of the other data structures (say dictionary containing data frame at some depth/nested key) then it becomes tricky to serialize them with inbuilt methods (as I realized from this recent question I asked couple of hours ago.)
Now I am wondering if there is any good/standard way out of this problem. Can serialization/deserialization be a good solution. OR should I start looking for something else? May be some in-memory cache from/to which I can share objects. Is there any such standard in-memory caching framework for both python and java which can be utilized without requiring to perform serialization/deserialization?