Reputation: 381
I have some data (taken from a CSV file) in the format:
MyValues = [[2 2 2 1 1]
[2 2 2 2 1]
[1 2 2 1 1]
[2 1 2 1 2]
[2 1 2 1 2]
[2 1 2 1 2]
[2 1 2 1 2]
[2 2 2 1 1]
[1 2 2 1 1]]
I would like to split this data into 2/3 and 1/3 and be able to distinguish between them. For example
twoThirds = [[2 2 2 1 1]
[2 2 2 2 1]
[1 2 2 1 1]
[2 1 2 1 2]
[2 1 2 1 2]
[2 1 2 1 2]]
oneThird = [[2 1 2 1 2]
[2 2 2 1 1]
[1 2 2 1 1]]
I have tried to use the following code to achieve this, but am unsure if i have gone about this the correct way?
twoThirds = (MyValues * 2) / 3 #What does this code provide me?
Upvotes: 0
Views: 112