I’m using a large Crime database and trying to force one of the columns to be recognized as “categorical” - I need the “Type of Incident” column, i.e. robbery, vehicle thefts, etc., to be part of the correlation matrix. My code looks like this:
feature_config = sweetviz.FeatureConfig(force_cat=[“Type of Incident”])
my_report = sweetviz.analyze([incidents_cutdown_df,“DPD Incidents Since 2018”], feature_config)
The problem is that feature_config keeps getting recognized as the target variable rather than as a call to use the feature_config created in the line above. I’ve tried to insert different things like Target = None, but that doesn’t work, and I keep getting an error that says: “Feature ‘<sweetviz.feature_config.FeatureConfig object at 0x000001F9ED113B48>’ was specified as TARGET, but is NOT FOUND in the dataframe (watch case-sensitivity?).”
How can I run a simple analysis on a single dataframe, with no target, but with a custom feature_config? Thanks!