I have an original array in python : t_array
t_array=(['META' , 'AAPL' , 'AMZN' , 'NFLX' , 'GOOG' ])
sample = random.sample (t_array, 3)
print=( 'sample')
and got this :
['AAPL', 'AMZN', 'META']
Now when I run the (1)
code again the sample refreshes to a new triple element array like the following :
['AMZN', 'META', 'NFLX']
or so
I wish to get all possible combinations without replacement from the original array t_array and print them at once in a dataframe format or series format so I can refer to them by index in my further code
How do I code that in python?
machine: currently using jupyter notebook on mac osx