df.groupby(column_name)
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:
- Grouping without an aggregate method will return a DataFrameGroupBy object (not 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:
- Grouping without an aggregate method will return a DataFrameGroupBy object (not DataFrame)
- Input:
- column_name : string
- Group by the column specified.
- column_names : list (of strings)
- Groups by all listed columns, starting with the first one in the list.
- 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 0782b871..a4a4a77d 100644
--- a/docs/intro/index.html
+++ b/docs/intro/index.html
@@ -5,7 +5,7 @@
intro | bpd
-
+
diff --git a/docs/plotting/histogram/index.html b/docs/plotting/histogram/index.html
index f51f9a03..0f9ab5b3 100644
--- a/docs/plotting/histogram/index.html
+++ b/docs/plotting/histogram/index.html
@@ -5,7 +5,7 @@
histogram | bpd
-
+
diff --git a/docs/series-methods/ser.count()/index.html b/docs/series-methods/ser.count()/index.html
index 410e42dc..938bb14f 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/series-methods/ser.max()/index.html b/docs/series-methods/ser.max()/index.html
index da43375c..49b34692 100644
--- a/docs/series-methods/ser.max()/index.html
+++ b/docs/series-methods/ser.max()/index.html
@@ -5,7 +5,7 @@
ser.max() | bpd
-
+
diff --git a/docs/tutorial-basics/congratulations/index.html b/docs/tutorial-basics/congratulations/index.html
index 6a320ef7..24c7c20c 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 dc879fcc..ed87d830 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 1188f85b..14132c6a 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 e84a10a4..3312e5cc 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 3901aa86..28ae092f 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 42d173a8..b55c0974 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 94fb85fb..e654acda 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 efc9a268..8aaf2332 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 e6bbf2f2..4760a5e3 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 4e319074..baecfd82 100644
--- a/markdown-page/index.html
+++ b/markdown-page/index.html
@@ -5,7 +5,7 @@
Markdown page example | bpd
-
+