FeatureEnVi: Visual Analytics for Feature Engineering Using Stepwise Selection and Semi-Automatic Extraction Approaches
https://doi.org/10.1109/TVCG.2022.3141040
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
675 B
25 lines
675 B
4 years ago
|
#!/usr/bin/env python
|
||
|
import sys
|
||
|
import pandas as pd
|
||
|
import pymongo
|
||
|
import json
|
||
|
import os
|
||
|
|
||
|
|
||
|
def import_content(filepath):
|
||
|
mng_client = pymongo.MongoClient('localhost', 27017)
|
||
|
mng_db = mng_client['mydb']
|
||
|
#collection_name = 'StanceCTest'
|
||
|
collection_name = 'StanceC'
|
||
|
db_cm = mng_db[collection_name]
|
||
|
cdir = os.path.dirname(__file__)
|
||
|
file_res = os.path.join(cdir, filepath)
|
||
|
|
||
|
data = pd.read_csv(file_res)
|
||
|
data_json = json.loads(data.to_json(orient='records'))
|
||
|
db_cm.remove()
|
||
|
db_cm.insert(data_json)
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
filepath = '/Users/anchaa/Documents/Research/StackVis_code/StackVis/stance.csv'
|
||
|
import_content(filepath)
|