JS dataTables from pandas

前端 未结 4 1843
挽巷
挽巷 2020-12-15 23:14

I want to use pandas dataFrames with dataTables. I cannot figure out how to initialize the table without an id.

Is there any way to set the id in the table tag w

4条回答
  •  隐瞒了意图╮
    2020-12-16 00:14

    I took a sligthly different approach and decided to initialize by CSS class which had the benefit that all the pandas tables became DataTables. You can add another class if you want a more refined control with different options

    $(document).ready(function(){
        $('.dataframe').DataTable();
    });
    

提交回复
热议问题