Dataframe insert Column with unique ID inside a <input>

  dataframe, html, python, range

I have a Dataframe and i want to add a new column to it with an unique ID.

This works perfectly fine:

df.insert(0,'A',range(1, 1 + len(df)))

The problem is, that i need to add a Checkbox and assign the ID to the name of the Checkbox.
I tried:

df.insert(0,'A','<input name=' + str(range(1, 1 + len(df))) + ' type="checkbox">')

The code is not executet so my HTML shows the following:

<input name="range(1", 103)="" type="checkbox">

Can someone help?

Source: Python Questions

LEAVE A COMMENT