You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Broadcast erroneously claims cast_on and onto_on are equivalents of left_on and right_on parameters of pandas.merge. #37
At least the documentation should be revise, whcih currently reads:
def broadcast(cast, onto, cast_on=None, onto_on=None,
cast_index=False, onto_index=False):
"""
Register a rule for merging two tables by broadcasting one onto
the other.
Parameters
----------
cast, onto : str
Names of registered tables.
cast_on, onto_on : str, optional
Column names used for merge, equivalent of ``left_on``/``right_on``
parameters of pandas.merge.
"""
Thanks, that's helpful. Looks like that code was added in e52fe6c as part of #20. That and the code I mentioned above both look like they wouldn't properly handle lists as cast_on/onto_on arguments.
Activity
jiffyclub commentedon Apr 26, 2018
Are you getting a specific error?
The
cast_onandonto_onvalues are passed straight through topandas.mergehere:However, using sequences may break other parts of the code, for example this looks like it might not properly handle lists of column names.
toliwaga commentedon Apr 26, 2018
The problem is on line 1808. I don't recall the exact error, but this is where things go wrong:
The comment for broadcast pretty much says it all:
It wants expects that cast_on and onto_on are strings, but pandas.merge also accepts lists.
If you want the exact error, I can easily generate it.
toliwaga commentedon Apr 26, 2018
The error is:
generated by passing lists of strs to broadcast:
jiffyclub commentedon Apr 26, 2018
Thanks, that's helpful. Looks like that code was added in e52fe6c as part of #20. That and the code I mentioned above both look like they wouldn't properly handle lists as
cast_on/onto_onarguments.toliwaga commentedon Apr 26, 2018
Yes.
Return to_frame columns in the requested order; accept multi-column b…
waddell commentedon Oct 4, 2026
Fixed by #68, released in 1.9.