Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.errors.MergeError#

exceptionpandas.errors.MergeError[source]#

Exception raised when merging data.

Subclass ofValueError.

Examples

>>>left=pd.DataFrame({"a":["a","b","b","d"],..."b":["cat","dog","weasel","horse"]},...index=range(4))>>>right=pd.DataFrame({"a":["a","b","c","d"],..."c":["meow","bark","chirp","nay"]},...index=range(4)).set_index("a")>>>left.join(right,on="a",validate="one_to_one",)Traceback (most recent call last):MergeError:Merge keys are not unique in left dataset; not a one-to-one merge

[8]ページ先頭

©2009-2025 Movatter.jp