Adding data to empty dataset object

I have an empty dataset object with fixed number of columns. How can I add row in this dataset?
I have tried list append method but it failed.

1 Like

Hi! You can append a new row with add_item.

2 Likes

I tried that but for some reasons it failed. i tried data.add_item({“col1”:“foo”,“col2”:“bar”}). is it the correct approach? thanks for your reply.

Could you please copy and paste the error stack trace you get?