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

Function dataFrame

App/main.py:64–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63@app.route('/api-DataFrame', methods = ['POST', 'GET'])
64def dataFrame() :
65
66 if request.method == 'POST':
67
68 data = json.loads(str(request.data, 'utf-8'))
69
70 text = StringIO(data['dataSet'])
71
72 if ('sep' in data) : sep = data['sep']
73
74 df = read_csv(text, sep = sep)
75
76 if("Unnamed: 0" in df.columns) : df = dropColumns(df, columns = ["Unnamed: 0"])
77
78 print(df.columns)
79
80 res = DataFrame2Array(df)
81
82 return str(res)
83
84 return '<h1>请使用POST方法访问</h1>'
85
86@app.route('/api-pretreatment', methods = ['POST', 'GET'])
87def pretreatment() :

Callers

nothing calls this directly

Calls 2

dropColumnsFunction · 0.85
DataFrame2ArrayFunction · 0.85

Tested by

no test coverage detected