data:pandas:allign
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| data:pandas:allign [2018/04/03 20:44] – aistis | data:pandas:allign [2018/04/03 20:45] (current) – aistis | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| start = time.time() | start = time.time() | ||
| for q in d: | for q in d: | ||
| - | df1.iloc[np.in1d(all_date, | + | df1.iloc[np.in1d(all_date, |
| + | df1.columns.get_loc(q.sidb)] = q.pnl | ||
| print (" | print (" | ||
| </ | </ | ||
| Line 11: | Line 12: | ||
| allign data in numpy array (3x faster) | allign data in numpy array (3x faster) | ||
| + | <code python> | ||
| # allign using numpy | # allign using numpy | ||
| start = time.time() | start = time.time() | ||
| Line 20: | Line 22: | ||
| i = i + 1 | i = i + 1 | ||
| print (" | print (" | ||
| + | </ | ||
data/pandas/allign.1522777475.txt.gz · Last modified: by aistis
