File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
category_encoders/datasets Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 66import pandas as pd
77
88def 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
You can’t perform that action at this time.
0 commit comments