Dynamic checkboxgroup

the issue is that: firstly the csv file(input) will be uploaded and then blow the dataframe(output), the checkboxgroup could show the columns of the dataframe. I have tried to use gr.checkboxgroup.change(), but it did not work.
Thanks for any advice!