I'm quite new to this so apologies in advance if this is a silly question. I'm trying to build a simple module which takes a Pandas dataframe and a set of instructions (in some text format) as an input, and converts this dataframe to a nested JSON representation of the data.
My plan was to essentially leave a section of the code blank and let the user supply the code (instructions) for how to do this conversion. I'm sure this is not a good way to solve the problem, and I'd happily take pointer on how it should be done as well, but is there a way to let the user insert a section of code into the code itself, and then execute the program?