标签:color 增加 bsp 数值 生成 imp int john mat
生成一个 DataFrame
import pandas as pd name = [‘Cindy‘,‘John‘,‘Matt‘] point = [78,87,88] df_grade = pd.DataFrame(name, columns=[‘name‘]) df_grade = pd.concat([df_grade, pd.DataFrame(point,columns=[‘point‘])],axis=1)
新增一列
df_grade[‘gender‘] = ‘male‘ print(df_grade)
结果
name point gender 0 Cindy 78 male 1 John 87 male 2 Matt 88 male
标签:color 增加 bsp 数值 生成 imp int john mat
原文地址:https://www.cnblogs.com/ymsong/p/12305039.html