这是一个python脚本,可以随机生成测试数据,使用的时候根据自己的实际情况调整文件生成路径,另外,我这儿使用的是五列,每页不同数据类型
import pandas as pd
import numpy as np
# Creating a DataFrame with 500,000 rows and 5 columns with different data types
np.random.seed(0) # For reproducibility
data = {
"Integer": np.random.randint(1, 1000, size=500000),
"Float": np.random.uniform(1.0, 100.0, size=500000),
"String": np.random.choice(['Apple', 'Banana', 'Cherry', 'Date', 'Elderberry'], size=500000),
"Boolean": np.random.choice([True, False], size=500000),
"Date": pd.date_range(start='2022-01-01', periods=500000, freq='T') # Minutes frequency
}
df = pd.DataFrame(data)
# Save DataFrame to Excel file
file_path = '/mnt/data/sample_data.xlsx'
df.to_excel(file_path, index=False)
file_path