MCPcopy Index your code
hub / github.com/Giyn/DataMiningVisualizationSystem / DataFrame2Array

Function DataFrame2Array

App/utils.py:22–36  ·  view source on GitHub ↗
(df:DataFrame)

Source from the content-addressed store, hash-verified

20 return dataSet
21
22def DataFrame2Array(df:DataFrame) :
23
24 res = [['id']]
25
26 for i in range(0, len(df)) :
27 res.append([i])
28
29 for i in df.columns :
30
31 res[0].append(i)
32
33 for j in range(1, len(df) + 1):
34 res[j].append(str(df[i][j - 1]))
35
36 return res
37
38def Array2DataFrame(array:str) :
39

Callers 3

getDataSetFunction · 0.85
dataFrameFunction · 0.85
predictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected