修改1列的类型属性:
df[‘总金额‘] = pd.to_numeric(df[‘总金额‘]) #转变dataframe的1列为数值型
修改某列数值:
df[‘流通市值‘] = round(df[‘流通市值‘]/100000000,2)
删除指定多列:
x=[4,7,10,11,12,13,15] #列的序号,从0开始
df.drop(df.columns[x], axis=1, inplace=True)
总行情、总列数:
‘行数‘=sheet1.nrows,‘列数‘=sheet1.ncols
原文:https://www.cnblogs.com/sxinfo/p/10391069.html