MCPcopy Create free account
hub / github.com/feast-dev/feast / _drop_columns

Function _drop_columns

sdk/python/feast/infra/offline_stores/dask.py:1230–1247  ·  view source on GitHub ↗
(
    df_to_join: dd.DataFrame,
    features: List[str],
    timestamp_field: str,
    created_timestamp_column: str,
)

Source from the content-addressed store, hash-verified

1228
1229
1230def _drop_columns(
1231 df_to_join: dd.DataFrame,
1232 features: List[str],
1233 timestamp_field: str,
1234 created_timestamp_column: str,
1235) -> dd.DataFrame:
1236 entity_df_with_features = df_to_join
1237 timestamp_columns = [
1238 timestamp_field,
1239 created_timestamp_column,
1240 ]
1241 for column in timestamp_columns:
1242 if column and column not in features:
1243 entity_df_with_features = entity_df_with_features.drop(
1244 [column], axis=1
1245 ).persist()
1246
1247 return entity_df_with_features
1248
1249
1250def _df_column_uniquify(df: dd.DataFrame) -> Tuple[dd.DataFrame, List[str]]:

Callers 1

Calls 1

persistMethod · 0.45

Tested by

no test coverage detected