这里主要应用到numpy.random.choice 可以根据需求,比如增加一列,A B C 为该列数据,随机概率生成 详见代码 import numpy as np import pandas as pd columns_user = ['number','gender','date'] columns_order = ['order_id','user_id','ispaid','price','paidtime'] user_info = pd.read_csv('user_info_ut