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
This error occurs when using relplot then adding a refline. From investigation, it appears that replot is duplicating the data. In this example, when i concatentate my 3 dataframes, I did not use 'ignore_index'; therefore there are duplicate indicies in the input data.
The problem is solved when I use ignore_index, or feed the data in with as df.reset_index(), however, the error message was not useful in discovering this! After tracking down the relplot source code, it appears the problem is related to the grid_data merging at the end of the function. I was able to solve this by skipping the "merge" if all of the columns are already present. I have submitted a pull request #3692 .
the error was: ValueError: operands could not be broadcast together with shapes (45000,) (15000,)
(the input data was 15000 rows long with 3 different "hue" variables)
zacharygibbs
changed the title
Relplot refline error in situations when using concatenated dataframes
Relplot refline error in situations when using dataframes w/ duplicate indicies
May 10, 2024
This error occurs when using relplot then adding a refline. From investigation, it appears that replot is duplicating the data. In this example, when i concatentate my 3 dataframes, I did not use 'ignore_index'; therefore there are duplicate indicies in the input data.
The problem is solved when I use ignore_index, or feed the data in with as
df.reset_index()
, however, the error message was not useful in discovering this! After tracking down the relplot source code, it appears the problem is related to thegrid_data
merging at the end of the function. I was able to solve this by skipping the "merge" if all of the columns are already present. I have submitted a pull request #3692 .the error was:
ValueError: operands could not be broadcast together with shapes (45000,) (15000,)
(the input data was 15000 rows long with 3 different "hue" variables)
Reproducible example:
The text was updated successfully, but these errors were encountered: