test_data.py 430 B

123456789101112131415161718192021
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. 测试数据准备,instance.py总共68219条数据,只取628条数据。
  5. @Auther :liuyuqi.gov@msn.cn
  6. @Time :2018/7/9 8:12
  7. @File :test_data.py
  8. '''
  9. import pandas as pd
  10. def prepareInstance():
  11. df3 = pd.read_csv("../data/instance.csv")
  12. df3 = df3.iloc[0:628, :]
  13. df3.to_csv("../data/test-instance.csv")
  14. print(df3.shape)
  15. def perpare():
  16. pass
  17. # prepareInstance()