Exception raised when merging data. Subclass of ``ValueError``. See Also -------- DataFrame.join : For joining DataFrames on their indexes. merge : For merging two DataFrames on a common set of keys. Examples -------- >>> left = pd.DataFrame( ... {"a":
| 433 | |
| 434 | |
| 435 | class MergeError(ValueError): |
| 436 | """ |
| 437 | Exception raised when merging data. |
| 438 | |
| 439 | Subclass of ``ValueError``. |
| 440 | |
| 441 | See Also |
| 442 | -------- |
| 443 | DataFrame.join : For joining DataFrames on their indexes. |
| 444 | merge : For merging two DataFrames on a common set of keys. |
| 445 | |
| 446 | Examples |
| 447 | -------- |
| 448 | >>> left = pd.DataFrame( |
| 449 | ... {"a": ["a", "b", "b", "d"], "b": ["cat", "dog", "weasel", "horse"]}, |
| 450 | ... index=range(4), |
| 451 | ... ) |
| 452 | >>> right = pd.DataFrame( |
| 453 | ... {"a": ["a", "b", "c", "d"], "c": ["meow", "bark", "chirp", "nay"]}, |
| 454 | ... index=range(4), |
| 455 | ... ).set_index("a") |
| 456 | >>> left.join( |
| 457 | ... right, |
| 458 | ... on="a", |
| 459 | ... validate="one_to_one", |
| 460 | ... ) |
| 461 | Traceback (most recent call last): |
| 462 | MergeError: Merge keys are not unique in left dataset; not a one-to-one merge |
| 463 | """ |
| 464 | |
| 465 | |
| 466 | class AbstractMethodError(NotImplementedError): |
no outgoing calls
no test coverage detected