def _full_merge_of_existing_data( self, new_futures_per_contract_prices, check_for_spike=False, keep_older: bool = True, ): """ Merges self with new data. Any Nan in the existing data will be replaced (be careful!) :param new_futures_per_contract_prices: the new data :param check_for_spike Checks for data spikes. :param keep_older: bool. Keep older data (default). :return: updated data, doesn't update self """ merged_data = full_merge_of_existing_data( self, new_futures_per_contract_prices, check_for_spike=check_for_spike, column_to_check=FINAL_COLUMN, keep_older=keep_older, ) if merged_data is spike_in_data: return spike_in_data return futuresContractPrices(merged_data)
def _full_merge_of_existing_data(self, new_fx_prices): """ Merges self with new data. Any Nan in the existing data will be replaced (be careful!) We make this private so not called accidentally :param new_fx_prices: the new data :return: updated data, doesn't update self """ merged_data = full_merge_of_existing_data(self, new_fx_prices) return fxPrices(merged_data)
def _full_merge_of_existing_data(self, new_futures_per_contract_prices): """ Merges self with new data. Any Nan in the existing data will be replaced (be careful!) :param new_futures_per_contract_prices: the new data :return: updated data, doesn't update self """ merged_data = full_merge_of_existing_data( self, new_futures_per_contract_prices) return futuresContractPrices(merged_data)