MCPcopy Create free account
hub / github.com/apache/singa / encode

Function encode

examples/hfl/src/bank.py:30–38  ·  view source on GitHub ↗
(df)

Source from the content-addressed store, hash-verified

28
29
30def encode(df):
31 res = pd.DataFrame()
32 for col in df.columns.values:
33 if not is_numeric_dtype(df[col]):
34 tmp = pd.get_dummies(df[col], prefix=col)
35 else:
36 tmp = df[col]
37 res = pd.concat([res, tmp], axis=1)
38 return res
39
40
41def load(device_id):

Callers 1

splitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected