Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Combine the series into a frame which automatically aligns by the index</p> <pre><code>In [51]: index Out[51]: [datetime.datetime(2013, 8, 26, 18, 33, 48, 990974), datetime.datetime(2013, 8, 26, 18, 33, 49, 990974), datetime.datetime(2013, 8, 26, 18, 33, 50, 990974), datetime.datetime(2013, 8, 26, 18, 33, 51, 990974), datetime.datetime(2013, 8, 26, 18, 33, 52, 990974)] In [52]: a = pd.Series([1,4,5,7,8], index = index) In [53]: b = pd.Series([2,3,6,7,8], index = index) In [54]: a Out[54]: 2013-08-26 18:33:48.990974 1 2013-08-26 18:33:49.990974 4 2013-08-26 18:33:50.990974 5 2013-08-26 18:33:51.990974 7 2013-08-26 18:33:52.990974 8 dtype: int64 In [55]: b Out[55]: 2013-08-26 18:33:48.990974 2 2013-08-26 18:33:49.990974 3 2013-08-26 18:33:50.990974 6 2013-08-26 18:33:51.990974 7 2013-08-26 18:33:52.990974 8 dtype: int64 In [56]: df = DataFrame({ 'a' : a, 'b' : b }) In [57]: df Out[57]: a b 2013-08-26 18:33:48.990974 1 2 2013-08-26 18:33:49.990974 4 3 2013-08-26 18:33:50.990974 5 6 2013-08-26 18:33:51.990974 7 7 2013-08-26 18:33:52.990974 8 8 </code></pre> <p>Min/Max</p> <pre><code>In [9]: df.max(1) Out[9]: 2013-08-26 18:33:48.990974 2 2013-08-26 18:33:49.990974 4 2013-08-26 18:33:50.990974 6 2013-08-26 18:33:51.990974 7 2013-08-26 18:33:52.990974 8 Freq: S, dtype: int64 In [10]: df.min(1) Out[10]: 2013-08-26 18:33:48.990974 1 2013-08-26 18:33:49.990974 3 2013-08-26 18:33:50.990974 5 2013-08-26 18:33:51.990974 7 2013-08-26 18:33:52.990974 8 Freq: S, dtype: int64 </code></pre> <p>Index of min/max</p> <pre><code>In [11]: df.idxmax(1) Out[11]: 2013-08-26 18:33:48.990974 b 2013-08-26 18:33:49.990974 a 2013-08-26 18:33:50.990974 b 2013-08-26 18:33:51.990974 a 2013-08-26 18:33:52.990974 a Freq: S, dtype: object In [12]: df.idxmin(1) Out[12]: 2013-08-26 18:33:48.990974 a 2013-08-26 18:33:49.990974 b 2013-08-26 18:33:50.990974 a 2013-08-26 18:33:51.990974 a 2013-08-26 18:33:52.990974 a Freq: S, dtype: object </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload