Table Of Contents
- What’s New
- Installation
- Contributing to pandas
- 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
- Styling
- IO Tools (Text, CSV, HDF5, ...)
- Remote Data Access
- Enhancing Performance
- Sparse data structures
- Frequently Asked Questions (FAQ)
- 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
- Index
- CategoricalIndex
- IntervalIndex
- 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.empty
- 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.contains
- pandas.TimedeltaIndex.copy
- pandas.TimedeltaIndex.delete
- pandas.TimedeltaIndex.difference
- pandas.TimedeltaIndex.drop
- pandas.TimedeltaIndex.drop_duplicates
- pandas.TimedeltaIndex.dropna
- 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_interval
- 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.isnull
- pandas.TimedeltaIndex.item
- pandas.TimedeltaIndex.join
- pandas.TimedeltaIndex.map
- pandas.TimedeltaIndex.max
- pandas.TimedeltaIndex.memory_usage
- pandas.TimedeltaIndex.min
- pandas.TimedeltaIndex.notnull
- pandas.TimedeltaIndex.nunique
- pandas.TimedeltaIndex.putmask
- pandas.TimedeltaIndex.ravel
- pandas.TimedeltaIndex.reindex
- pandas.TimedeltaIndex.rename
- pandas.TimedeltaIndex.repeat
- pandas.TimedeltaIndex.reshape
- 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.symmetric_difference
- 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
- pandas.TimedeltaIndex.where
- 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.symmetric_difference¶
-
TimedeltaIndex.
symmetric_difference
(other, result_name=None)[source]¶ Compute the symmetric difference of two Index objects. It’s sorted if sorting is possible.
Parameters: other : Index or array-like
result_name : str
Returns: symmetric_difference : Index
Notes
symmetric_difference
contains elements that appear in eitheridx1
oridx2
but not both. Equivalent to the Index created byidx1.difference(idx2) | idx2.difference(idx1)
with duplicates dropped.Examples
>>> idx1 = Index([1, 2, 3, 4]) >>> idx2 = Index([2, 3, 4, 5]) >>> idx1.symmetric_difference(idx2) Int64Index([1, 5], dtype='int64')
You can also use the
^
operator:>>> idx1 ^ idx2 Int64Index([1, 5], dtype='int64')