The snippet below should be something like: data[field] = pd.Series(integers, data.index).
|
data[field] = pd.Series(integers) |
As currently implemented, the transformed data will incorrectly map the values to the wrong data if the index in data is not the same as the default index in pd.Series.