MCPcopy
hub / github.com/microsoft/qlib / cache_to_origin_data

Method cache_to_origin_data

qlib/data/cache.py:466–477  ·  view source on GitHub ↗

cache data to origin data :param data: pd.DataFrame, cache data. :param fields: feature fields. :return: pd.DataFrame.

(data, fields)

Source from the content-addressed store, hash-verified

464
465 @staticmethod
466 def cache_to_origin_data(data, fields):
467 """cache data to origin data
468
469 :param data: pd.DataFrame, cache data.
470 :param fields: feature fields.
471 :return: pd.DataFrame.
472 """
473 not_space_fields = remove_fields_space(fields)
474 data = data.loc[:, not_space_fields]
475 # set features fields
476 data.columns = [str(i) for i in fields]
477 return data
478
479 @staticmethod
480 def normalize_uri_args(instruments, fields, freq):

Callers 3

read_data_from_cacheMethod · 0.80
_datasetMethod · 0.80
dataset_processorMethod · 0.80

Calls 1

remove_fields_spaceFunction · 0.85

Tested by

no test coverage detected