cudf.core.groupby.groupby.DataFrameGroupBy.fillna#
- DataFrameGroupBy.fillna(value=None, method=None, axis=0, inplace=False, limit=None, downcast=None)#
Fill NA values using the specified method.
- Parameters
- valuescalar, dict
Value to use to fill the holes. Cannot be specified with method.
- method{‘backfill’, ‘bfill’, ‘pad’, ‘ffill’, None}, default None
Method to use for filling holes in reindexed Series
pad/ffill: propagate last valid observation forward to next valid
backfill/bfill: use next valid observation to fill gap
- axis{0 or ‘index’, 1 or ‘columns’}
Unsupported
- inplacebool, default False
If True, fill inplace. Note: this will modify other views on this object.
- limitint, default None
Unsupported
- downcastdict, default None
Unsupported
- Returns
- DataFrame or Series
Pandas Compatibility Note
groupby.fillna
This function may return result in different format to the method Pandas supports. For example:
>>> df = pd.DataFrame({'k': [1, 1, 2], 'v': [2, None, 4]}) >>> gdf = cudf.from_pandas(df) >>> df.groupby('k').fillna({'v': 4}) # pandas v k 1 0 2.0 1 4.0 2 2 4.0 >>> gdf.groupby('k').fillna({'v': 4}) # cudf v 0 2.0 1 4.0 2 4.0