We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Though API doc says Index.union can accept Index or array-like, it raises errors.
Index.union
Index
import numpy as np import pandas as pd idx = pd.Index([1, 2, 3]) idx.union([2, 3, 4]) # AttributeError: 'list' object has no attribute 'dtype' idx.union(pd.Series([2, 3, 4])) # AttributeError: 'Series' object has no attribute 'is_monotonic' idx.union(np.array([2, 3, 4])) # AttributeError: 'numpy.ndarray' object has no attribute 'is_monotonic'
NOTE: intersection looks OK.
intersection
idx.intersection([2, 3, 4]) # Int64Index([2, 3], dtype='int64') idx.intersection(pd.Series([2, 3, 4])) # Int64Index([2, 3], dtype='int64') idx.union([2, 3, 4]) # Int64Index([2, 3], dtype='int64')
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Though API doc says
Index.union
can acceptIndex
or array-like, it raises errors.NOTE:
intersection
looks OK.The text was updated successfully, but these errors were encountered: