The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Coding a decision tree structure is one thing, but the problem I see with generating code for it is making it work in the general sense - a similar problem with state machines. As in, sure I can make one of these things, but it will be suitable toward one particular task - like your airfare example. I don't see a lot of opportunity to generalize the algorithm. As I said, I ran into the same problem with state machines.
It's just really painful. It ought to be possible to define a cleansyntax that was far more expressive of common data manipulation on dataframes and translate into a series of pandas calls. It could be done as a pre-processor step prior to trying to merge into baseline Python.
It would be interesting to try to define this as an abstract and be able to translate into python/pandas code, LINQ, R, SQL, etc
Those of us who've been here long enough will remember Osmodian (I might have that name wrong) where he went on and on about English language to code generation. In many ways, I think that's still the Holy Grail - when I was 20 or so, at a computer convention in SF (think Apple ][, Commodore, Trash-80, Atari, Sinclair, etc) there were quite a few demonstrations of code being generated from sentences. It was touted as "this is the future".
Yeah, and it's not wrong either. Mac users DO stink!
Anything that is unrelated to elephants is irrelephant Anonymous - The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 - Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain