import os import sys import numpy as np import pandas as pd from sqlalchemy import create_engine ######################################################################################################## # 计算小米应该给我们结算的非小米支付的金额 ######################################################################################################## curr_path = os.path.dirname(os.path.abspath(__file__)) # 蓝色火焰后台数据 #my_path = os.path.join(curr_path,"out") my_path = os.path.join(curr_path,"data") print( my_path ) total = 0 for root,dirs,files in os.walk( my_path ): for file in files: file_item = os.path.join(root,file) print( file_item ) df = pd.read_csv( file_item ) for value in df.values: print( value[8] ) ''' if value[8] == 6: total += value[7] ''' total += value[6] print( total )