How can I create a list (or a numpy array if possible) in python that takes datetime objects in the first column and other data types in other columns?
For example, the list would be something like this:
list = [[<datetime object>, 0, 0.]
[<datetime object>, 0, 0.]
[<datetime object>, 0, 0.]]
What is the best way to create and initialize a list like this?
So far, I have tried using np.empty, np.zeros, and a list comprehension, similar to this:
list = [[None for x in xrange(3)] for x in xrange(3)]
But if I do this, I would need a for loop to populate the first column and there doesn't seem to be a way to assign it in a simpler way like the following:
list[0][:] = another_list_same_length