如何使用UUID有效填充列?
我的猜测是:
df['uuid'] = pd.Series([uuid.uuid1() for i in range(len(df))])
但我想知道是否可以使用某种内置的pandas方法更有效地完成它。
干得好:
df['uuid'] = df.apply(lambda x: uuid.uuid1(), axis=1)