How to select elements from subsequent numpy arrays stored in pandas series
问题 I've got a Series of numpy arrays: import pandas as pd import numpy as np pd.Series({10: np.array([[0.72260683, 0.27739317, 0. ], [0.7187053 , 0.2812947 , 0. ], [0.71435467, 0.28564533, 1. ], [0.3268072 , 0.6731928 , 0. ], [0.31941951, 0.68058049, 1. ], [0.31260015, 0.68739985, 0. ]]), 20: np.array([[0.7022099 , 0.2977901 , 0. ], [0.6983866 , 0.3016134 , 0. ], [0.69411673, 0.30588327, 1. ], [0.33857735, 0.66142265, 0. ], [0.33244109, 0.66755891, 1. ], [0.32675582, 0.67324418, 0. ]]), 38: np