# Dash Data\_Table keeps throwing error during debug

**URL:** <https://community.plotly.com/t/dash-data-table-keeps-throwing-error-during-debug/41819>\
**Category:** Dash Python\
**Created:** [July 1, 2020, 3:01am UTC](https://community.plotly.com/t/dash-data-table-keeps-throwing-error-during-debug/41819 "2020-07-01T03:01:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kozoria](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@kozoria](https://community.plotly.com/u/kozoria)\
**Post date:** [July 1, 2020, 3:01am UTC](https://community.plotly.com/t/dash-data-table-keeps-throwing-error-during-debug/41819/1 "2020-07-01T03:01:27Z")

</div>

A dash data table of mine keeps throwing the following error:

> Invalid argument `columns[1].name` passed into DataTable with ID “table3”

This error pops up with debug=True and prevents the table from populating within the div. When debug=False, the table populates and has the correct data and even changes using callbacks, so I think this is just a bug thta has to do with how I create the data frame used for that table. Below is the process and results for the creation of that table’s data frame, where df\_table\_3 is the dataframe I use for the table.

**TLDR of code below** : I create two dfs (one to determine grade level of each student, the other to determine how many classes that student is failing and both share the same index) then I combine both dfs into one df and use crosstab to create a table that tells me how many students in each grade are failing 1,2,3,4, or 5 classes.

```auto
studentgradelevel = dff[(dff['Quarter Grade']<70)][['Student ID','Grade']].groupby('Student ID').mean()

```

Result:  
Grade  
Student ID  
203350103 9  
203588009 11  
205186042 10  
206862567 12  
207667585 12

```auto
studentfails = dff[(dff['Quarter Grade']<70)].groupby('Student ID')['Course'].nunique()

```

Result:  
Student ID  
203350103 5  
203588009 1  
205186042 2  
206862567 5  
207667585 4

```auto
df_fail_nums_by_student = pd.concat([studentgradelevel,studentfails],axis=1)

```

Result:  
Student ID  
203350103 9 5  
203588009 11 1  
205186042 10 2  
206862567 12 5  
207667585 12 4

```auto
df_table_3 = pd.crosstab(df_fail_nums_by_student['Grade'],df_fail_nums_by_student['Course']).reset_index()

```

Result:  
Course Grade 1 2 3 4 5  
0 9 24 14 15 29 23  
1 10 12 16 12 15 35  
2 11 20 9 7 10 8  
3 12 9 9 8 12 12
