On Mon, Jul 15, 2019 at 7:17 PM Andrew Barnert via Python-ideas <python-ideas@python.org> wrote: > > Consider the case where dt is a join of two tables d1 and d2. Today you can > write dt[d1.price * d2.taxrate < x]. With the proposed new feature, you could > presumably write dt[price * taxrate < x], and get an exception if, say, both > tables have price columns, but otherwise get exactly what you expected. I > assume you think that’s too unclear or magical or whatever? But then I’m not > sure how dt[\price * \taxrate < x] is much better. >
I'm not 100% sure how joins work in Pandas, but wouldn't it just be dt[dt.price * dt.taxrate < x] ? Once they're joined, you'd just reference columns from the combined table, surely? ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/UB6WJ7AOIBHTPP7QVLKXWL5CANCHDOC4/ Code of Conduct: http://python.org/psf/codeofconduct/