mpl.mlab.recs_join()¶
-
mpl.mlab.recs_join(key, name, recs, jointype=u'outer', missing=0.0, postfixes=None)[source]¶ Join a sequence of record arrays on single column key.
This function only joins a single column of the multiple record arrays
- key
- is the column name that acts as a key
- name
- is the name of the column that we want to join
- recs
- is a list of record arrays to join
- jointype
- is a string ‘inner’ or ‘outer’
- missing
- is what any missing field is replaced by
- postfixes
- if not None, a len recs sequence of postfixes
returns a record array with columns [rowkey, name0, name1, ... namen-1]. or if postfixes [PF0, PF1, ..., PFN-1] are supplied, [rowkey, namePF0, namePF1, ... namePFN-1].
Example:
r = recs_join("date", "close", recs=[r0, r1], missing=0.)