Skip to content

Commit 9e2d3fb

Browse files
authored
Amended docstrings for correct data types
1 parent 072217f commit 9e2d3fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

category_encoders/datasets/_base.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pandas as pd
77

88
def load_compass():
9-
"""Return a dataframe for target encoding with 100 UK postcodes and hierarchy.
9+
"""Return a dataframe for target encoding with 16 rows of compass directions.
1010
1111
Contains the following fields:
1212
index 16 non-null int64
@@ -16,8 +16,8 @@ def load_compass():
1616
1717
Returns
1818
-------
19-
X: A dataframe containing features
20-
y: A dataframe containing the target variable
19+
X: A pandas series containing features
20+
y: A pandas series containing the target variable
2121
2222
"""
2323
data_filename = "data/compass.csv"
@@ -51,8 +51,8 @@ def load_postcodes(target_type='binary'):
5151
5252
Returns
5353
-------
54-
X: A dataframe containing features
55-
y: A dataframe containing the target variable
54+
X: A pandas series containing features
55+
y: A pandas series containing the target variable
5656
5757
"""
5858
data_filename = "data/postcode_dataset_100.csv"
@@ -62,4 +62,4 @@ def load_postcodes(target_type='binary'):
6262
df = pd.read_csv(f, encoding='latin-1')
6363
X = df[df.columns[~df.columns.str.startswith('target')]]
6464
y = df[f'target_{target_type}']
65-
return X, y
65+
return X, y

0 commit comments

Comments
 (0)