摘要:
写 data = {'name': 'lin', 'email': 'xiaoqinglin2018@gmail.com'} with open('json_note.json', 'w') as f: # writing Json data json.dump(data, f,ensure_asc 阅读全文
摘要:
csv.read with open("test.csv", "r", encoding = "utf-8") as f: reader = csv.reader(f) rows = [row for row in reader] csv.write with open(file, 'w', new 阅读全文
摘要:
读取csv文件 data = pd.read_csv(f1,nrows =20) s = data.loc[:, :] s = s.loc[:, ['machine_id', 'question_id', 'answer_right']] s = s.values s = s.tolist() 读取 阅读全文