MCPcopy Index your code
hub / github.com/feast-dev/feast / _run_pyarrow_field_mapping

Function _run_pyarrow_field_mapping

sdk/python/feast/utils.py:308–318  ·  view source on GitHub ↗
(
    table: pyarrow.Table,
    field_mapping: Dict[str, str],
)

Source from the content-addressed store, hash-verified

306
307
308def _run_pyarrow_field_mapping(
309 table: pyarrow.Table,
310 field_mapping: Dict[str, str],
311) -> pyarrow.Table:
312 # run field mapping in the forward direction
313 cols = table.column_names
314 mapped_cols = [
315 field_mapping[col] if col in field_mapping.keys() else col for col in cols
316 ]
317 table = table.rename_columns(mapped_cols)
318 return table
319
320
321def _get_fields_with_aliases(

Callers 5

map_in_pandasFunction · 0.90
runMethod · 0.90
handlerFunction · 0.90

Calls 2

keysMethod · 0.80
rename_columnsMethod · 0.45

Tested by

no test coverage detected