Table Of Contents
- What’s New
- Installation
- Contributing to pandas
- Frequently Asked Questions (FAQ)
- Package overview
- 10 Minutes to pandas
- Tutorials
- Cookbook
- Intro to Data Structures
- Essential Basic Functionality
- Working with Text Data
- Options and Settings
- Indexing and Selecting Data
- MultiIndex / Advanced Indexing
- Computational tools
- Working with missing data
- Group By: split-apply-combine
- Merge, join, and concatenate
- Reshaping and Pivot Tables
- Time Series / Date functionality
- Time Deltas
- Categorical Data
- Visualization
- Style
- IO Tools (Text, CSV, HDF5, ...)
- Remote Data Access
- Enhancing Performance
- Sparse data structures
- Caveats and Gotchas
- rpy2 / R interface
- pandas Ecosystem
- Comparison with R / R libraries
- Comparison with SQL
- Comparison with SAS
- API Reference
- Input/Output
- General functions
- Series
- DataFrame
- Panel
- Panel4D
- Index
- CategoricalIndex
- MultiIndex
- DatetimeIndex
- TimedeltaIndex
- pandas.TimedeltaIndex
- pandas.TimedeltaIndex.T
- pandas.TimedeltaIndex.asi8
- pandas.TimedeltaIndex.asobject
- pandas.TimedeltaIndex.base
- pandas.TimedeltaIndex.components
- pandas.TimedeltaIndex.data
- pandas.TimedeltaIndex.days
- pandas.TimedeltaIndex.dtype
- pandas.TimedeltaIndex.dtype_str
- pandas.TimedeltaIndex.flags
- pandas.TimedeltaIndex.freq
- pandas.TimedeltaIndex.freqstr
- pandas.TimedeltaIndex.has_duplicates
- pandas.TimedeltaIndex.hasnans
- pandas.TimedeltaIndex.inferred_freq
- pandas.TimedeltaIndex.inferred_type
- pandas.TimedeltaIndex.is_all_dates
- pandas.TimedeltaIndex.is_monotonic
- pandas.TimedeltaIndex.is_monotonic_decreasing
- pandas.TimedeltaIndex.is_monotonic_increasing
- pandas.TimedeltaIndex.is_unique
- pandas.TimedeltaIndex.itemsize
- pandas.TimedeltaIndex.microseconds
- pandas.TimedeltaIndex.name
- pandas.TimedeltaIndex.names
- pandas.TimedeltaIndex.nanoseconds
- pandas.TimedeltaIndex.nbytes
- pandas.TimedeltaIndex.ndim
- pandas.TimedeltaIndex.nlevels
- pandas.TimedeltaIndex.resolution
- pandas.TimedeltaIndex.seconds
- pandas.TimedeltaIndex.shape
- pandas.TimedeltaIndex.size
- pandas.TimedeltaIndex.strides
- pandas.TimedeltaIndex.values
- pandas.TimedeltaIndex.all
- pandas.TimedeltaIndex.any
- pandas.TimedeltaIndex.append
- pandas.TimedeltaIndex.argmax
- pandas.TimedeltaIndex.argmin
- pandas.TimedeltaIndex.argsort
- pandas.TimedeltaIndex.asof
- pandas.TimedeltaIndex.asof_locs
- pandas.TimedeltaIndex.astype
- pandas.TimedeltaIndex.ceil
- pandas.TimedeltaIndex.copy
- pandas.TimedeltaIndex.delete
- pandas.TimedeltaIndex.diff
- pandas.TimedeltaIndex.difference
- pandas.TimedeltaIndex.drop
- pandas.TimedeltaIndex.drop_duplicates
- pandas.TimedeltaIndex.duplicated
- pandas.TimedeltaIndex.equals
- pandas.TimedeltaIndex.factorize
- pandas.TimedeltaIndex.fillna
- pandas.TimedeltaIndex.floor
- pandas.TimedeltaIndex.format
- pandas.TimedeltaIndex.get_duplicates
- pandas.TimedeltaIndex.get_indexer
- pandas.TimedeltaIndex.get_indexer_for
- pandas.TimedeltaIndex.get_indexer_non_unique
- pandas.TimedeltaIndex.get_level_values
- pandas.TimedeltaIndex.get_loc
- pandas.TimedeltaIndex.get_slice_bound
- pandas.TimedeltaIndex.get_value
- pandas.TimedeltaIndex.get_value_maybe_box
- pandas.TimedeltaIndex.get_values
- pandas.TimedeltaIndex.groupby
- pandas.TimedeltaIndex.holds_integer
- pandas.TimedeltaIndex.identical
- pandas.TimedeltaIndex.insert
- pandas.TimedeltaIndex.intersection
- pandas.TimedeltaIndex.is
- pandas.TimedeltaIndex.is_boolean
- pandas.TimedeltaIndex.is_categorical
- pandas.TimedeltaIndex.is_floating
- pandas.TimedeltaIndex.is_integer
- pandas.TimedeltaIndex.is_lexsorted_for_tuple
- pandas.TimedeltaIndex.is_mixed
- pandas.TimedeltaIndex.is_numeric
- pandas.TimedeltaIndex.is_object
- pandas.TimedeltaIndex.is_type_compatible
- pandas.TimedeltaIndex.isin
- pandas.TimedeltaIndex.item
- pandas.TimedeltaIndex.join
- pandas.TimedeltaIndex.map
- pandas.TimedeltaIndex.max
- pandas.TimedeltaIndex.memory_usage
- pandas.TimedeltaIndex.min
- pandas.TimedeltaIndex.nunique
- pandas.TimedeltaIndex.order
- pandas.TimedeltaIndex.putmask
- pandas.TimedeltaIndex.ravel
- pandas.TimedeltaIndex.reindex
- pandas.TimedeltaIndex.rename
- pandas.TimedeltaIndex.repeat
- pandas.TimedeltaIndex.round
- pandas.TimedeltaIndex.searchsorted
- pandas.TimedeltaIndex.set_names
- pandas.TimedeltaIndex.set_value
- pandas.TimedeltaIndex.shift
- pandas.TimedeltaIndex.slice_indexer
- pandas.TimedeltaIndex.slice_locs
- pandas.TimedeltaIndex.sort
- pandas.TimedeltaIndex.sort_values
- pandas.TimedeltaIndex.sortlevel
- pandas.TimedeltaIndex.str
- pandas.TimedeltaIndex.summary
- pandas.TimedeltaIndex.sym_diff
- pandas.TimedeltaIndex.take
- pandas.TimedeltaIndex.to_datetime
- pandas.TimedeltaIndex.to_native_types
- pandas.TimedeltaIndex.to_pytimedelta
- pandas.TimedeltaIndex.to_series
- pandas.TimedeltaIndex.tolist
- pandas.TimedeltaIndex.total_seconds
- pandas.TimedeltaIndex.transpose
- pandas.TimedeltaIndex.union
- pandas.TimedeltaIndex.unique
- pandas.TimedeltaIndex.value_counts
- pandas.TimedeltaIndex.view
- Components
- Conversion
- pandas.TimedeltaIndex
- Window
- GroupBy
- Resampling
- Style
- General utility functions
- Internals
- Release Notes
Search
Enter search terms or a module, class or function name.
pandas.TimedeltaIndex.sym_diff¶
- TimedeltaIndex.sym_diff(other, result_name=None)¶
Compute the sorted symmetric difference of two Index objects.
Parameters: other : Index or array-like
result_name : str
Returns: sym_diff : Index
Notes
sym_diff contains elements that appear in either idx1 or idx2 but not both. Equivalent to the Index created by (idx1 - idx2) + (idx2 - idx1) with duplicates dropped.
The sorting of a result containing NaN values is not guaranteed across Python versions. See GitHub issue #6444.
Examples
>>> idx1 = Index([1, 2, 3, 4]) >>> idx2 = Index([2, 3, 4, 5]) >>> idx1.sym_diff(idx2) Int64Index([1, 5], dtype='int64')
You can also use the ^ operator:
>>> idx1 ^ idx2 Int64Index([1, 5], dtype='int64')