I have a dataset and on that, I have performed OneHotEncoding and Standardization using standard scalar, Now that I have preprocessed data I have to visualize it, but on converting it to pandas dataframe it is showing error. What is the way to visualize preprocessed data?
steps that I have taken
df = pd.read_csv(filepath) categorical_features = [column names which are categorical in nature] numerical_features = [column names which are numerical in nature] one_hot = OneHotEncoder() scaler = StandardScaler() tranformer = ColumnTransformer([("one_hot", one_hot, categorial_features),("standard_scaler", scaler, numerical_features)], remainder = "passthrough") transformed_X = tranformer.fit_transform(X)
Now, how to view this
transformed_X in a tabular manner that we see using the
.head() function of pandas dataframe?