Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(FutureWarnings): replace .append by pd.concat #191

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/preprocessing/test_target_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ def test_target_encoder_transform_new_category_linear_regression_median(self):
'neutral', 'positive'],
'target': [5, 4, -5, 0, -4, 5, -5, 0, 1, 0, 4]})

df_appended = df.append({"variable": "new", "target": 10},
ignore_index=True)

new_row = pd.DataFrame({"variable": ["new"], "target": [10]})
df_appended = pd.concat([df, new_row], ignore_index=True)
# inputs of TargetEncoder will be of dtype category
df["variable"] = df["variable"].astype("category")
df_appended["variable"] = df_appended["variable"].astype("category")
Expand All @@ -335,8 +335,8 @@ def test_target_encoder_transform_new_category_binary_classification_median(self
'neutral'],
'target': [1, 1, 0, 0, 1, 0, 0, 0, 1, 1]})

df_appended = df.append({"variable": "new", "target": 1},
ignore_index=True)
new_row = pd.DataFrame({"variable": ["new"], "target": [1]})
df_appended = pd.concat([df, new_row], ignore_index=True)

# inputs of TargetEncoder will be of dtype category
df["variable"] = df["variable"].astype("category")
Expand Down
Loading