Selaa lähdekoodia

author:dukun
describe: update app02.py: add total_frame

864633403@qq.com 5 vuotta sitten
vanhempi
commit
8260e552e6
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      Xiaomi/app02.py

+ 4 - 1
Xiaomi/app02.py

@@ -94,6 +94,7 @@ for root,dirs,files in os.walk( my_path ):
 
     success_frame = pd.DataFrame(f_success_value)
     fail_frame = pd.DataFrame(f_fail_value)
+    total_fram = success_frame.append(fail_frame)
 
     f_path = os.path.basename(file_item)
     print( f_path )
@@ -104,7 +105,9 @@ for root,dirs,files in os.walk( my_path ):
 
     write_success_path = os.path.join(out_path,f_success_path)
     write_fail_path = os.path.join(out_path,f_fail_path)
+    write_total_path = os.path.join(out_path,f_path)
     print(write_success_path)
 
     success_frame.to_csv(write_success_path, index=False, header=0, sep=',', encoding='utf-8-sig')
-    fail_frame.to_csv(write_fail_path, index=False, header=0, sep=',', encoding='utf-8-sig')
+    fail_frame.to_csv(write_fail_path, index=False, header=0, sep=',', encoding='utf-8-sig')
+    total_fram.to_csv(write_total_path, index=False, header=0, sep=',', encoding='utf-8-sig')