2

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?

1
  • can I get some comment before someone asking to close this question? I dont think any exact question is there online asking "whether serialization/deserialization is correct approach?" or "how to approach it?" or "should I go for in-memory caching?" Commented Sep 29, 2016 at 13:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.