0

Error Screenshot I am trying to run setup function in pycaret==2.3.5 on python version 3.8.10 on databricks notebook and its showing the above error.

The same code is running fine on the local system but not on databricks. Can anyone help on this?

I tried changing the versions of pycaret and python but nothing worked.

Code used:

import pandas as pd
from pycaret.anomaly import *

df = pd.read_csv("global_master_data.csv")


df_copy = df.iloc[:,7:37].copy()
df_copy  = df_copy.drop(['Better For You Claim Text','First Selling OC','Manuf. Type','Private Label Brand - Desc'],axis = 1)


exp_name = setup(data = df_copy, silent = True)
  • hi @Gagan Saini, could you please provide the code, what you tried in local system. – B. B. Naga Sai Vamsi Dec 07 '22 at 09:24
  • Yeah Sure @SaiVamsi import pandas as pd from pycaret.anomaly import * df = pd.read_csv("global_master_data.csv") df_copy = df.iloc[:,7:37].copy() df_copy = df_copy.drop(['Better For You Claim Text','First Selling OC','Manuf. Type','Private Label Brand - Desc'],axis = 1) exp_name = setup(data = df_copy, silent = True) – Gagan Saini Dec 07 '22 at 10:12
  • directly upload csv file into databricks file store , then use `df = pd.read_csv("/dbfs/FileStore/gender_submission.csv")` file format: `/dbfs/FileStore/.csv` – B. B. Naga Sai Vamsi Dec 07 '22 at 10:35
  • I am uploading the file in filestore and reading it using spark command. Then converting it into pandas dataframe. Still it is showing the same error. – Gagan Saini Dec 07 '22 at 14:05

1 Answers1

0

I try to reproduce the same in my environment and got this output.

Install PyCaret library: Use this command pip install pycaret

I saved my dataset inside the file store. Using the below code I got the output.

import pandas as pd

df1 = pd.read_csv("/dbfs/FileStore/file_2.csv")

df_copy = df1.iloc[:,0:].copy()


df_copy  = df_copy.drop(['Name','subject'],axis = 1)

from pycaret.classification import *

exp_ano101 = setup(df_copy, normalize = True, session_id = 1, silent = True, html = False)

enter image description here

For more information refer this link1.

B. B. Naga Sai Vamsi
  • 2,386
  • 2
  • 3
  • 11