df.groupby(column_name)
-
or
+
or
df.groupby([column_names])
-
Group DataFrame by values in columns specified in column_name or a list of column_names
.
A groupby operation groups large amounts of data based on the column name(s)
- Note:
df.groupby(column(s))
without an aggregate method will return a DataFrameGroupBy object, not a DataFrame.- Input:
- columns : string, or list of column names
- Group by the column specified. If list, groups from left to right.
- Returns:
- df_gb - groupby object that contains information about the groups.
- Return Type:
- DataFrameGroupBy
Aggregate Methods
.mean()
.median()
.count()
.max()
.min()
.sum()
+
Group DataFrame by values in columns specified in column_name or a list of column_names.
A groupby operation groups large amounts of data based on the column name(s)
- Note:
df.groupby(column(s))
without an aggregate method will return a DataFrameGroupBy object, not a DataFrame.- Input:
- columns : string, or list of column names
- Group by the column specified. If list, groups from left to right.
- Returns:
- df_gb - groupby object that contains information about the groups.
- Return Type:
- DataFrameGroupBy
Aggregate Methods
.mean()
.median()
.count()
.max()
.min()
.sum()
Index | Species | Color | Weight | Age |
---|
0 | dog | black | 40 | 5 |
1 | cat | golden | 15 | 8 |
2 | cat | black | 20 | 9 |
3 | dog | white | 80 | 2 |
4 | dog | black | 25 | 0.5 |
5 | hamster | black | 1 | 3 |
6 | hamster | golden | 0.25 | 0.2 |
diff --git a/docs/intro/index.html b/docs/intro/index.html
index 3a48453c..62fd25a3 100644
--- a/docs/intro/index.html
+++ b/docs/intro/index.html
@@ -5,7 +5,7 @@
intro | bpd
-
+
diff --git a/docs/series-methods/ser.count()/index.html b/docs/series-methods/ser.count()/index.html
index 7fa5ee18..42441b48 100644
--- a/docs/series-methods/ser.count()/index.html
+++ b/docs/series-methods/ser.count()/index.html
@@ -5,7 +5,7 @@
ser.count() | bpd
-
+
diff --git a/docs/tutorial-basics/congratulations/index.html b/docs/tutorial-basics/congratulations/index.html
index d50f49e6..d894fd78 100644
--- a/docs/tutorial-basics/congratulations/index.html
+++ b/docs/tutorial-basics/congratulations/index.html
@@ -5,7 +5,7 @@
Congratulations! | bpd
-
+
diff --git a/docs/tutorial-basics/create-a-blog-post/index.html b/docs/tutorial-basics/create-a-blog-post/index.html
index 77357ab4..69881bf7 100644
--- a/docs/tutorial-basics/create-a-blog-post/index.html
+++ b/docs/tutorial-basics/create-a-blog-post/index.html
@@ -5,7 +5,7 @@
Create a Blog Post | bpd
-
+
diff --git a/docs/tutorial-basics/create-a-document/index.html b/docs/tutorial-basics/create-a-document/index.html
index bc7b27d8..60fe79a4 100644
--- a/docs/tutorial-basics/create-a-document/index.html
+++ b/docs/tutorial-basics/create-a-document/index.html
@@ -5,7 +5,7 @@
Create a Document | bpd
-
+
diff --git a/docs/tutorial-basics/create-a-page/index.html b/docs/tutorial-basics/create-a-page/index.html
index ecd694da..9a9f5b27 100644
--- a/docs/tutorial-basics/create-a-page/index.html
+++ b/docs/tutorial-basics/create-a-page/index.html
@@ -5,7 +5,7 @@
Create a Page | bpd
-
+
diff --git a/docs/tutorial-basics/deploy-your-site/index.html b/docs/tutorial-basics/deploy-your-site/index.html
index 80ff8192..3450097b 100644
--- a/docs/tutorial-basics/deploy-your-site/index.html
+++ b/docs/tutorial-basics/deploy-your-site/index.html
@@ -5,7 +5,7 @@
Deploy your site | bpd
-
+
diff --git a/docs/tutorial-basics/markdown-features/index.html b/docs/tutorial-basics/markdown-features/index.html
index e228483a..99a7be32 100644
--- a/docs/tutorial-basics/markdown-features/index.html
+++ b/docs/tutorial-basics/markdown-features/index.html
@@ -5,7 +5,7 @@
Markdown Features | bpd
-
+
diff --git a/docs/tutorial-extras/manage-docs-versions/index.html b/docs/tutorial-extras/manage-docs-versions/index.html
index 71db9859..96714d60 100644
--- a/docs/tutorial-extras/manage-docs-versions/index.html
+++ b/docs/tutorial-extras/manage-docs-versions/index.html
@@ -5,7 +5,7 @@
Manage Docs Versions | bpd
-
+
diff --git a/docs/tutorial-extras/translate-your-site/index.html b/docs/tutorial-extras/translate-your-site/index.html
index 462cdc41..2c629df2 100644
--- a/docs/tutorial-extras/translate-your-site/index.html
+++ b/docs/tutorial-extras/translate-your-site/index.html
@@ -5,7 +5,7 @@
Translate your site | bpd
-
+
diff --git a/index.html b/index.html
index e7c2c4cf..5c71a9bd 100644
--- a/index.html
+++ b/index.html
@@ -5,7 +5,7 @@
bpd reference sheet | bpd
-
+
diff --git a/markdown-page/index.html b/markdown-page/index.html
index c294d674..e2a5734b 100644
--- a/markdown-page/index.html
+++ b/markdown-page/index.html
@@ -5,7 +5,7 @@
Markdown page example | bpd
-
+