一个简单的DataFrame程序
程序员文章站
2024-01-31 13:37:46
...
import pandas as pd
import numpy as np
values_1 = np.random.randint(10, size=10)
values_2 = np.random.randint(10, size=10)
years = np.arange(2010, 2020)
groups = ['A','A','B','A','B','B','C','A','C','C']
df = pd.DataFrame({'group':groups, 'year':years, 'value_1':values_1, 'value_2':values_2})
print(df)
上一篇: 高级UI组件之对话框(Dialog)
下一篇: Java swing要点总结(三)