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
- DatetimeIndex
- TimedeltaIndex
- GroupBy
- Indexing, iteration
- Function application
- Computations / Descriptive Stats
- pandas.core.groupby.GroupBy.count
- pandas.core.groupby.GroupBy.cumcount
- pandas.core.groupby.GroupBy.first
- pandas.core.groupby.GroupBy.head
- pandas.core.groupby.GroupBy.last
- pandas.core.groupby.GroupBy.max
- pandas.core.groupby.GroupBy.mean
- pandas.core.groupby.GroupBy.median
- pandas.core.groupby.GroupBy.min
- pandas.core.groupby.GroupBy.nth
- pandas.core.groupby.GroupBy.ohlc
- pandas.core.groupby.GroupBy.prod
- pandas.core.groupby.GroupBy.size
- pandas.core.groupby.GroupBy.sem
- pandas.core.groupby.GroupBy.std
- pandas.core.groupby.GroupBy.sum
- pandas.core.groupby.GroupBy.var
- pandas.core.groupby.GroupBy.tail
- pandas.core.groupby.DataFrameGroupBy.bfill
- pandas.core.groupby.DataFrameGroupBy.cummax
- pandas.core.groupby.DataFrameGroupBy.cummin
- pandas.core.groupby.DataFrameGroupBy.cumprod
- pandas.core.groupby.DataFrameGroupBy.cumsum
- pandas.core.groupby.DataFrameGroupBy.describe
- pandas.core.groupby.DataFrameGroupBy.all
- pandas.core.groupby.DataFrameGroupBy.any
- pandas.core.groupby.DataFrameGroupBy.corr
- pandas.core.groupby.DataFrameGroupBy.cov
- pandas.core.groupby.DataFrameGroupBy.diff
- pandas.core.groupby.DataFrameGroupBy.ffill
- pandas.core.groupby.DataFrameGroupBy.fillna
- pandas.core.groupby.DataFrameGroupBy.hist
- pandas.core.groupby.DataFrameGroupBy.idxmax
- pandas.core.groupby.DataFrameGroupBy.idxmin
- pandas.core.groupby.DataFrameGroupBy.mad
- pandas.core.groupby.DataFrameGroupBy.pct_change
- pandas.core.groupby.DataFrameGroupBy.plot
- pandas.core.groupby.DataFrameGroupBy.quantile
- pandas.core.groupby.DataFrameGroupBy.rank
- pandas.core.groupby.DataFrameGroupBy.resample
- pandas.core.groupby.DataFrameGroupBy.shift
- pandas.core.groupby.DataFrameGroupBy.skew
- pandas.core.groupby.DataFrameGroupBy.take
- pandas.core.groupby.DataFrameGroupBy.tshift
- pandas.core.groupby.SeriesGroupBy.nlargest
- pandas.core.groupby.SeriesGroupBy.nsmallest
- pandas.core.groupby.SeriesGroupBy.nunique
- pandas.core.groupby.SeriesGroupBy.unique
- pandas.core.groupby.SeriesGroupBy.value_counts
- pandas.core.groupby.DataFrameGroupBy.corrwith
- pandas.core.groupby.DataFrameGroupBy.boxplot
- Style
- General utility functions
- Internals
- Release Notes
Search
Enter search terms or a module, class or function name.
pandas.core.groupby.DataFrameGroupBy.diff¶
- DataFrameGroupBy.diff(periods=1, axis=0)¶
1st discrete difference of object
Parameters: periods : int, default 1
Periods to shift for forming difference
axis : {0 or ‘index’, 1 or ‘columns’}, default 0
Take difference over rows (0) or columns (1).
Returns: diffed : DataFrame