concate dataframe only if there are objects to concatenate pandas code example
Example: pandas concat and reset index
train_df = pd.concat(train_class_df_list, ignore_index=True)
train_df = pd.concat(train_class_df_list, ignore_index=True)