I have a data text file which has the following format:
1 2 2 3 4 5 6
1 5 8 9 3 4 2
1 2 3 5 1 2 3
Timestamp 1
5 4 8 9 8 7 2
1 5 9 6 3 1 2
Timestamp 2
...
I wish to import the data in such a way that:
- I can ignore the timestamps first and process the data.
- AND I can also handle the timestamps later.
I have achieved 1 by
myData = np.genfromtxt('data.txt', comments='T')
By doing so, I have the following in Python
1 2 2 3 4 5 6
1 5 8 9 3 4 2
1 2 3 5 1 2 3
5 4 8 9 8 7 2
1 5 9 6 3 1 2
However, by doing this I simply have discarded all the timestamps.
But I need to process them later as well.
How may I import the timestamps into another list like below in Python?
Timestamp 1
Timestamp 2
...