diff --git a/doc/source/api.rst b/doc/source/api.rst index 59f0f0a82a892..662f8c512e8a7 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -1694,16 +1694,18 @@ application to columns of a specific data type. .. autosummary:: :toctree: generated/ + DataFrameGroupBy.agg + DataFrameGroupBy.all + DataFrameGroupBy.any DataFrameGroupBy.bfill + DataFrameGroupBy.corr + DataFrameGroupBy.count + DataFrameGroupBy.cov DataFrameGroupBy.cummax DataFrameGroupBy.cummin DataFrameGroupBy.cumprod DataFrameGroupBy.cumsum DataFrameGroupBy.describe - DataFrameGroupBy.all - DataFrameGroupBy.any - DataFrameGroupBy.corr - DataFrameGroupBy.cov DataFrameGroupBy.diff DataFrameGroupBy.ffill DataFrameGroupBy.fillna @@ -1717,6 +1719,7 @@ application to columns of a specific data type. DataFrameGroupBy.rank DataFrameGroupBy.resample DataFrameGroupBy.shift + DataFrameGroupBy.size DataFrameGroupBy.skew DataFrameGroupBy.take DataFrameGroupBy.tshift diff --git a/doc/source/comparison_with_sql.rst b/doc/source/comparison_with_sql.rst index 5dc083db7d147..26e76e8c5a4f6 100644 --- a/doc/source/comparison_with_sql.rst +++ b/doc/source/comparison_with_sql.rst @@ -138,7 +138,7 @@ Getting items where ``col1`` IS NOT NULL can be done with :meth:`~pandas.Series. GROUP BY -------- -In pandas, SQL's GROUP BY operations performed using the similarly named +In pandas, SQL's GROUP BY operations are performed using the similarly named :meth:`~pandas.DataFrame.groupby` method. :meth:`~pandas.DataFrame.groupby` typically refers to a process where we'd like to split a dataset into groups, apply some function (typically aggregation) , and then combine the groups together. @@ -163,23 +163,24 @@ The pandas equivalent would be: tips.groupby('sex').size() -Notice that in the pandas code we used :meth:`~pandas.DataFrameGroupBy.size` and not -:meth:`~pandas.DataFrameGroupBy.count`. This is because :meth:`~pandas.DataFrameGroupBy.count` -applies the function to each column, returning the number of ``not null`` records within each. +Notice that in the pandas code we used :meth:`~pandas.core.groupby.DataFrameGroupBy.size` and not +:meth:`~pandas.core.groupby.DataFrameGroupBy.count`. This is because +:meth:`~pandas.core.groupby.DataFrameGroupBy.count` applies the function to each column, returning +the number of ``not null`` records within each. .. ipython:: python tips.groupby('sex').count() -Alternatively, we could have applied the :meth:`~pandas.DataFrameGroupBy.count` method to an -individual column: +Alternatively, we could have applied the :meth:`~pandas.core.groupby.DataFrameGroupBy.count` method +to an individual column: .. ipython:: python tips.groupby('sex')['total_bill'].count() Multiple functions can also be applied at once. For instance, say we'd like to see how tip amount -differs by day of the week - :meth:`~pandas.DataFrameGroupBy.agg` allows you to pass a dictionary +differs by day of the week - :meth:`~pandas.core.groupby.DataFrameGroupBy.agg` allows you to pass a dictionary to your grouped DataFrame, indicating which functions to apply to specific columns. .. code-block:: sql