np.array(input)
-
Casts an iterable into a list (bpd.Series, df.columns, and list)
- Input:
- input : ser, .columns, list
- Name of series/.columns/list to cast to an array.
- Returns:
- df_with_cols - Same input, casted to an array.
- Return Type:
- Array
+
Casts an iterable (bpd.Series, bpd.Index, and list) into a numpy array
- Input:
- input : ser, df.index, df.columns, list
- Name of series/.columns/list to cast to an array.
- Returns:
- An array with the same elements as the input.
- Return Type:
- Array
Series to Array
weight_ser = pets.get('Weight')
weight_ser
- 040
- 11.5
- 215
- 380
- 425
- 51
- 60.25
- 710
weight_arr = np.array(weight_ser)
weight_arr
array([40. , 15. , 20. , 80. , 25. , 1. , 0.25])
-
.columns to Array
+
bpd.Index to Array
+
pets_idx = pets.set_index('ID').index
pets_idx
+
Index(['dog_001', 'cat_001', 'cat_002', 'dog_002', 'dog_003', 'ham_001', 'ham_002', 'cat_003'], dtype='object', name='ID')
+
pets_idx_arr = np.array(pets.set_index('ID').index)
pets_idx_arr
+
array(['dog_001', 'cat_001', 'cat_002', 'dog_002', 'dog_003', 'ham_001', 'ham_002', 'cat_003'], dtype=object)
pets_cols = pets.columns
pet_cols
Index(['ID', 'Species', 'Color', 'Weight', 'Age', 'Is_Cat', 'Owner_Comment'], dtype='object')
-
pets_cols_arr = np.array(pets.columns)
pet_cols_arr
+
pets_cols_arr = np.array(pets.columns)
pet_cols_arr
array(['ID', 'Species', 'Color', 'Weight', 'Age', 'Is_Cat',
'Owner_Comment'], dtype=object)
List to Array
diff --git a/docs/documentation/for-loops/index.html b/docs/documentation/for-loops/index.html
index 201f1c24..3dac245c 100644
--- a/docs/documentation/for-loops/index.html
+++ b/docs/documentation/for-loops/index.html
@@ -5,7 +5,7 @@
for-loops | bpd
-
+
diff --git a/docs/documentation/if-statements/Logical Operators/index.html b/docs/documentation/if-statements/Logical Operators/index.html
index 2cf85c6e..d87186da 100644
--- a/docs/documentation/if-statements/Logical Operators/index.html
+++ b/docs/documentation/if-statements/Logical Operators/index.html
@@ -5,7 +5,7 @@
Logical Operators | bpd
-
+
diff --git a/docs/documentation/if-statements/if-elif-else/index.html b/docs/documentation/if-statements/if-elif-else/index.html
index 0d78eed9..ca372285 100644
--- a/docs/documentation/if-statements/if-elif-else/index.html
+++ b/docs/documentation/if-statements/if-elif-else/index.html
@@ -5,7 +5,7 @@
if-elif-else | bpd
-
+
diff --git "a/docs/documentation/if-statements/in \342\201\204 not in/index.html" "b/docs/documentation/if-statements/in \342\201\204 not in/index.html"
index 0098b24f..d1009e59 100644
--- "a/docs/documentation/if-statements/in \342\201\204 not in/index.html"
+++ "b/docs/documentation/if-statements/in \342\201\204 not in/index.html"
@@ -5,7 +5,7 @@
in ⁄ not in | bpd
-
+
diff --git a/docs/documentation/intro/index.html b/docs/documentation/intro/index.html
index f091d5d0..ea43cd6d 100644
--- a/docs/documentation/intro/index.html
+++ b/docs/documentation/intro/index.html
@@ -5,7 +5,7 @@
intro | bpd
-
+
diff --git a/docs/documentation/plotting/Bar Plot/index.html b/docs/documentation/plotting/Bar Plot/index.html
index 4df7da71..891a2d8d 100644
--- a/docs/documentation/plotting/Bar Plot/index.html
+++ b/docs/documentation/plotting/Bar Plot/index.html
@@ -5,7 +5,7 @@
Bar Plot | bpd
-
+
diff --git a/docs/documentation/plotting/Histogram/index.html b/docs/documentation/plotting/Histogram/index.html
index 6759c76e..a749a509 100644
--- a/docs/documentation/plotting/Histogram/index.html
+++ b/docs/documentation/plotting/Histogram/index.html
@@ -5,7 +5,7 @@
Histogram | bpd
-
+
diff --git a/docs/documentation/plotting/Line Plot/index.html b/docs/documentation/plotting/Line Plot/index.html
index 770e949e..fa44affe 100644
--- a/docs/documentation/plotting/Line Plot/index.html
+++ b/docs/documentation/plotting/Line Plot/index.html
@@ -5,7 +5,7 @@
Line Plot | bpd
-
+
diff --git a/docs/documentation/plotting/Scatter Plot/index.html b/docs/documentation/plotting/Scatter Plot/index.html
index 2b992d01..dc11f8c6 100644
--- a/docs/documentation/plotting/Scatter Plot/index.html
+++ b/docs/documentation/plotting/Scatter Plot/index.html
@@ -5,7 +5,7 @@
Scatter Plot | bpd
-
+
diff --git a/docs/documentation/querying/df[]/index.html b/docs/documentation/querying/df[]/index.html
index a7785a45..06df6cf3 100644
--- a/docs/documentation/querying/df[]/index.html
+++ b/docs/documentation/querying/df[]/index.html
@@ -5,7 +5,7 @@
df[] | bpd
-
+
diff --git a/docs/documentation/series-methods/index.html b/docs/documentation/series-methods/index.html
index 0cc6ec60..0cffadc9 100644
--- a/docs/documentation/series-methods/index.html
+++ b/docs/documentation/series-methods/index.html
@@ -5,7 +5,7 @@
Series Methods | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.count()/index.html b/docs/documentation/series-methods/ser.count()/index.html
index bb390d36..381c4ae8 100644
--- a/docs/documentation/series-methods/ser.count()/index.html
+++ b/docs/documentation/series-methods/ser.count()/index.html
@@ -5,7 +5,7 @@
ser.count() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.max()/index.html b/docs/documentation/series-methods/ser.max()/index.html
index 5f0e7c8b..8cc524bb 100644
--- a/docs/documentation/series-methods/ser.max()/index.html
+++ b/docs/documentation/series-methods/ser.max()/index.html
@@ -5,7 +5,7 @@
ser.max() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.mean()/index.html b/docs/documentation/series-methods/ser.mean()/index.html
index f6cc0ed3..9bee4b12 100644
--- a/docs/documentation/series-methods/ser.mean()/index.html
+++ b/docs/documentation/series-methods/ser.mean()/index.html
@@ -5,7 +5,7 @@
ser.mean() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.median()/index.html b/docs/documentation/series-methods/ser.median()/index.html
index 613c5081..7422fbe9 100644
--- a/docs/documentation/series-methods/ser.median()/index.html
+++ b/docs/documentation/series-methods/ser.median()/index.html
@@ -5,7 +5,7 @@
ser.median() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.min()/index.html b/docs/documentation/series-methods/ser.min()/index.html
index 2de42c6b..924d530a 100644
--- a/docs/documentation/series-methods/ser.min()/index.html
+++ b/docs/documentation/series-methods/ser.min()/index.html
@@ -5,7 +5,7 @@
ser.min() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.str.capitalize()/index.html b/docs/documentation/series-methods/ser.str.capitalize()/index.html
index 08e114a5..6ba1a149 100644
--- a/docs/documentation/series-methods/ser.str.capitalize()/index.html
+++ b/docs/documentation/series-methods/ser.str.capitalize()/index.html
@@ -5,7 +5,7 @@
ser.str.capitalize() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.str.contains()/index.html b/docs/documentation/series-methods/ser.str.contains()/index.html
index 51755278..c5ff8c26 100644
--- a/docs/documentation/series-methods/ser.str.contains()/index.html
+++ b/docs/documentation/series-methods/ser.str.contains()/index.html
@@ -5,7 +5,7 @@
ser.str.contains() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.str.len()/index.html b/docs/documentation/series-methods/ser.str.len()/index.html
index 636ecb03..a4e578ec 100644
--- a/docs/documentation/series-methods/ser.str.len()/index.html
+++ b/docs/documentation/series-methods/ser.str.len()/index.html
@@ -5,7 +5,7 @@
ser.str.len() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.str.lower()/index.html b/docs/documentation/series-methods/ser.str.lower()/index.html
index 1de14437..e22ab79c 100644
--- a/docs/documentation/series-methods/ser.str.lower()/index.html
+++ b/docs/documentation/series-methods/ser.str.lower()/index.html
@@ -5,7 +5,7 @@
ser.str.lower() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.str.replace()/index.html b/docs/documentation/series-methods/ser.str.replace()/index.html
index 2ac2a148..608cc378 100644
--- a/docs/documentation/series-methods/ser.str.replace()/index.html
+++ b/docs/documentation/series-methods/ser.str.replace()/index.html
@@ -5,7 +5,7 @@
ser.str.replace() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.str.split()/index.html b/docs/documentation/series-methods/ser.str.split()/index.html
index 49a27577..a92934a2 100644
--- a/docs/documentation/series-methods/ser.str.split()/index.html
+++ b/docs/documentation/series-methods/ser.str.split()/index.html
@@ -5,7 +5,7 @@
ser.str.split() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.str.strip()/index.html b/docs/documentation/series-methods/ser.str.strip()/index.html
index f6fc04c5..f53ba276 100644
--- a/docs/documentation/series-methods/ser.str.strip()/index.html
+++ b/docs/documentation/series-methods/ser.str.strip()/index.html
@@ -5,7 +5,7 @@
ser.str.strip() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.str.title()/index.html b/docs/documentation/series-methods/ser.str.title()/index.html
index 9e2adb6f..a24deac2 100644
--- a/docs/documentation/series-methods/ser.str.title()/index.html
+++ b/docs/documentation/series-methods/ser.str.title()/index.html
@@ -5,7 +5,7 @@
ser.str.title() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.str.upper()/index.html b/docs/documentation/series-methods/ser.str.upper()/index.html
index 1c76bc72..075f3935 100644
--- a/docs/documentation/series-methods/ser.str.upper()/index.html
+++ b/docs/documentation/series-methods/ser.str.upper()/index.html
@@ -5,7 +5,7 @@
ser.str.upper() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.sum()/index.html b/docs/documentation/series-methods/ser.sum()/index.html
index 524f5e07..31793092 100644
--- a/docs/documentation/series-methods/ser.sum()/index.html
+++ b/docs/documentation/series-methods/ser.sum()/index.html
@@ -5,7 +5,7 @@
ser.sum() | bpd
-
+
diff --git a/docs/documentation/series-methods/ser.unique()/index.html b/docs/documentation/series-methods/ser.unique()/index.html
index f5c80cef..ffab0d34 100644
--- a/docs/documentation/series-methods/ser.unique()/index.html
+++ b/docs/documentation/series-methods/ser.unique()/index.html
@@ -5,7 +5,7 @@
ser.unique() | bpd
-
+
diff --git a/docs/statistical-inference/intro/index.html b/docs/statistical-inference/intro/index.html
index 17849f69..f856b659 100644
--- a/docs/statistical-inference/intro/index.html
+++ b/docs/statistical-inference/intro/index.html
@@ -5,7 +5,7 @@
intro | bpd
-
+
diff --git a/index.html b/index.html
index 482ba7e9..594e5f7e 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 83cb26a7..868a3392 100644
--- a/markdown-page/index.html
+++ b/markdown-page/index.html
@@ -5,7 +5,7 @@
Markdown page example | bpd
-
+