How to sort Panda table according to another Panda table

The following question appeared during my last round of my interview and unfortunately i couldn’t do it. I have the first table as: ticker AAPL MSFT WMT date 2015-12-31 101.696810 52.829107 58.379766 2016-01-04 101.783763 52.181598 58.532144 2016-01-05 99.233131 52.419653 59.922592 2016-01-06 97.291172 51.467434 60.522580 2016-01-07 93.185040 49.677262 61.932075 data = quandl.get_table(‘WIKI/PRICES’, ticker = [‘AAPL’, ‘MSFT’,…

Details

How to cache a Drupal’s main menu when load programmatically

I am having the below code to load the main menu tree. $tree = menu_tree_all_data(‘main-menu’); $parentMenu = array(); $index = 0; foreach($tree as $key => $value) { if (!empty($value[‘link’][‘hidden’])) { continue; } $submenu = array(); foreach($value[‘below’] as $subMenu) { if (!empty($subMenu[‘link’][‘hidden’])) { continue; } $tid = explode(‘/’, $subMenu[‘link’][‘link_path’]); $submenu[]= array( ‘link_title’ => $subMenu[‘link’][‘link_title’], ‘link_path’ =>…

Details