Вы можете сделать это, используя библиотеку Pandas;
from itertools import product
import pandas as pd
Survived = [1.0, 20.0, 39.0, 58.0, 77.0, 96.0]
PassengerId = [1.0, 179.0, 357.0, 535.0, 713.0]
Pclass = [1.0, 1.5, 2.0, 2.5]
result = pd.DataFrame(product(Survived, PassengerId, Pclass), columns=['Survived', 'PassengerId', 'Pclass'])
Получив переменную result
, вы должны получить кадр данных длиной 120;
>>> len(result) # this prints the length of the dataframe
120
>>> result.head() # this shows the first 5 records
Survived PassengerId Pclass
0 1.0 1.0 1.0
1 1.0 1.0 1.5
2 1.0 1.0 2.0
3 1.0 1.0 2.5
4 1.0 179.0 1.0