From 2961150ba768023468863ac7c7ad53f8fb386047 Mon Sep 17 00:00:00 2001 From: Abhishek Thakur Date: Tue, 23 Apr 2024 09:49:23 +0200 Subject: [PATCH] .loc fix --- src/autotrain/__init__.py | 2 +- src/autotrain/preprocessor/text.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autotrain/__init__.py b/src/autotrain/__init__.py index cb13d5a460..9aa6b57255 100644 --- a/src/autotrain/__init__.py +++ b/src/autotrain/__init__.py @@ -41,4 +41,4 @@ logger = Logger().get_logger() -__version__ = "0.7.57.dev0" +__version__ = "0.7.58.dev0" diff --git a/src/autotrain/preprocessor/text.py b/src/autotrain/preprocessor/text.py index ad950bfede..e45951d6de 100644 --- a/src/autotrain/preprocessor/text.py +++ b/src/autotrain/preprocessor/text.py @@ -80,8 +80,8 @@ def prepare(self): train_df, valid_df = self.split() train_df, valid_df = self.prepare_columns(train_df, valid_df) - train_df[:, "autotrain_label"] = train_df["autotrain_label"].astype(str) - valid_df[:, "autotrain_label"] = valid_df["autotrain_label"].astype(str) + train_df.loc[:, "autotrain_label"] = train_df["autotrain_label"].astype(str) + valid_df.loc[:, "autotrain_label"] = valid_df["autotrain_label"].astype(str) label_names = sorted(set(train_df["autotrain_label"].unique().tolist()))