t6.py 471 B

12345678910111213141516
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @Auther :liuyuqi.gov@msn.cn
  5. @Time :2018/7/10 20:36
  6. @File :t6.py
  7. '''
  8. import datetime
  9. import pandas as pd
  10. df3 = pd.read_csv("../submit/submit_20180710_164012.csv", names=list(["instanceid", "machineid"]))
  11. df3["machineid"] = df3["machineid"].sort_index(ascending=False).values
  12. df3.to_csv(("../submit/submit_" + datetime.datetime.now().strftime('%Y%m%d_%H%M%S') + ".csv"), header=None,
  13. index=False)
  14. # print(df3)