Attempt to access dataframe column displays “<bound method NDFrame.xxx…”

前端 未结 3 527
你的背包
你的背包 2021-01-18 03:14

I create DataFrame object in Jupyter notebook:

data = {\'state\':[\'Ohio\',\'Ohio\',\'Ohio\',\'Nevada\',\'Nevada\'],
       \'year\':[2000, 2001, 2002, 2000,         


        
3条回答
  •  有刺的猬
    2021-01-18 03:35

    The way I am using ...eval

    frame.eval('pop')
    Out[108]: 
    0    1.5
    1    2.0
    2    3.6
    3    2.4
    4    2.9
    dtype: float64
    

提交回复
热议问题