使用tqdm给pandas显示进度条
def query_grading_result(df):
return df['result']
if __name__ == "__main__"
df = pd.read_csv('data/dab57f08-9fac-4ada-bf80-f72bf51bbc0a.csv')
from tqdm import tqdm
tqdm.pandas(desc='apply')
df['grading_result'] = df.progress_apply(query_grading_result, axis=1)
df.to_csv(f'output/grading_result_1102.csv')
时间会记录下一切。