79661981

Date: 2025-06-11 12:22:35
Score: 1
Natty:
Report link

@MrBDude - check the dtype on your train dataset, it should be of type object. Converting it to string will solve the issue

Since you are using Bert embedding, you are dealing in text data:

# check the dtypes
df_balanced['body'].dtypes # this should be an Object, as its giving an error

#convert to string
df_balanced['body'] = df_balanced['body'].astype("string")

#Do a similar check for df_balanced['label'] as well
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @MrBDude
  • Low reputation (0.5):
Posted by: khari-sing