For some reason the function all_files_df() is executing twice in the code below. The len(data) should be 4, but it\'s returning 8.
I thought adding:
if _