explainx icon indicating copy to clipboard operation
explainx copied to clipboard

Type error occurs when there is no header in DataFrame

Open MisooKim opened this issue 4 years ago • 1 comments

When using example codes in README.md, I input the DataFrame without a header, so the columns' names set as an Integer type.

So the bugs occurred in the following codes in dashboard.py because the col is not String.

original_variables = [col for col in df.columns if '_impact' in col] self.callback_input = [Input(f + '_slider', 'value') for f in self.param["columns"]]

I fixed this bug by modifying the below code at 225 line in explain.py.

self.param["columns"] = df.columns.astype(str)

I fixed this bug by adding the below code at 230 line in explain.py. self.df_final.columns = self.df_final.columns.astype(str)

MisooKim avatar Feb 05 '21 08:02 MisooKim

@MisooKim Please update the code and create a Merge Request. It will be Merge with the master Branch after code review.

Thanks for pointing out the issue.

tawabshakeel avatar Feb 05 '21 12:02 tawabshakeel