OasisLMF / ReinsuranceTestTool

Test tool for new reinsurance functionality.
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

error in notebook in dev branch #68

Closed johcarter closed 5 years ago

johcarter commented 5 years ago

Step 2 gives this error


KeyError Traceback (most recent call last)

in () 21 ri_scope_df, 22 do_reinsurance ---> 23 ) = oed.load_oed_dfs(oed_dir, show_all=False) ~/src/oasislmf/oasislmf/exposures/oed.py in load_oed_dfs(oed_dir, show_all) 250 if do_reinsurance: 251 ri_info_df = ri_info_df[OED_REINS_INFO_FIELDS].copy() --> 252 ri_scope_df = ri_scope_df[OED_REINS_SCOPE_FIELDS].copy() 253 254 # Ensure Percent feilds are float /srv/conda/lib/python3.6/site-packages/pandas/core/frame.py in __getitem__(self, key) 2131 if isinstance(key, (Series, np.ndarray, Index, list)): 2132 # either boolean or fancy integer index -> 2133 return self._getitem_array(key) 2134 elif isinstance(key, DataFrame): 2135 return self._getitem_frame(key) /srv/conda/lib/python3.6/site-packages/pandas/core/frame.py in _getitem_array(self, key) 2175 return self._take(indexer, axis=0, convert=False) 2176 else: -> 2177 indexer = self.loc._convert_to_indexer(key, axis=1) 2178 return self._take(indexer, axis=1, convert=True) 2179 /srv/conda/lib/python3.6/site-packages/pandas/core/indexing.py in _convert_to_indexer(self, obj, axis, is_setter) 1267 if mask.any(): 1268 raise KeyError('{mask} not in index' -> 1269 .format(mask=objarr[mask])) 1270 1271 return _values_from_object(indexer) KeyError: "['LocGroup' 'ReinsTag'] not in index"