I mean, as long as we’re golfing, you can also nest the comprehensions:
NewDict = {
'Data %s' % i: {
colName: value
for colName, value in zip(pyData.columnNames, list(row))
}
for i, row in enumerate(pyData)
}
I mean, as long as we’re golfing, you can also nest the comprehensions:
NewDict = {
'Data %s' % i: {
colName: value
for colName, value in zip(pyData.columnNames, list(row))
}
for i, row in enumerate(pyData)
}