Open sirrice opened 2 years ago
Make ascending
argument to sort_values
use bool True/False rather than 1/0. Figure out general way to translate Python list/dict into printable strings.
This requires identifying "pandas pipeline breakers" -- sequences of operators in a query plan pipeline that can be inlined into a single statement. Could do this by augmenting compiler with a chain
type method. Something like:
ctx.add_line("df = ...")
tmp = ctx.chain("df2", "df")
tmp.call("foo(a,b)")
tmp.call("bar(c)")
tmp2 = ctx.chain("df3", "df2")
tmp2.call("baaz(d")
would generate:
df = ...
df2 = (df
.foo(a,b)
.bar(c))
df3 = df2
.baaz(d)
We then need a way to pass the chained tmp
or tmp2 from child to parent. Could pass chain objects instead of variable names in ctx['df']
?
Generate instead
pandastutor - i manually rewrote it as a one-liner