Open parrt opened 1 year ago
When creating a data frame from a numpy, by default it converts all dtypes to object in case it contains different dtypes (float and str in our case)... https://stackoverflow.com/questions/61346021/create-a-mixed-type-pandas-dataframe-using-an-numpy-array-of-type-object
Solution:
df = pd.DataFrame(self.shadow_tree.X_train, columns=self.shadow_tree.feature_names).convert_dtypes() return df.iloc[node_samples[node_id]].describe(include='all')
I thought that you already made the fix :D
hahah. nope was working on the tutorial and now they want a blog post haha
When creating a data frame from a numpy, by default it converts all dtypes to object in case it contains different dtypes (float and str in our case)... https://stackoverflow.com/questions/61346021/create-a-mixed-type-pandas-dataframe-using-an-numpy-array-of-type-object
Solution: